@typus/typus-sdk 1.5.3 → 1.5.5-a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (446) hide show
  1. package/dist/src/auto-bid/view-function.js +2 -2
  2. package/dist/src/constants/token.d.ts +5 -53
  3. package/dist/src/constants/token.js +174 -104
  4. package/dist/src/dice/api.js +2 -2
  5. package/dist/src/dice/fetch.js +2 -2
  6. package/dist/src/dice/user-entry.js +2 -2
  7. package/dist/src/typus/airdrop/authority-entry.js +2 -2
  8. package/dist/src/typus/airdrop/view-function.js +2 -2
  9. package/dist/src/typus/leaderboard/authority-entry.js +2 -2
  10. package/dist/src/typus/leaderboard/view-function.js +2 -2
  11. package/dist/src/typus/tails-staking/view-function.js +2 -2
  12. package/dist/src/typus/user/view-function.js +2 -2
  13. package/dist/src/typus-dov-single-v2/authority-entry.js +2 -2
  14. package/dist/src/typus-dov-single-v2/function/bidding.js +2 -2
  15. package/dist/src/typus-dov-single-v2/history/user-history.d.ts +3 -1
  16. package/dist/src/typus-dov-single-v2/history/user-history.js +35 -2
  17. package/dist/src/typus-dov-single-v2/history/vault-history.js +2 -2
  18. package/dist/src/typus-dov-single-v2/view-function.js +2 -2
  19. package/dist/src/typus-launch/airdrop/authority-entry.js +4 -4
  20. package/dist/src/typus-launch/airdrop/view-function.js +2 -2
  21. package/dist/src/typus-launch/auction/view-function.js +2 -2
  22. package/dist/src/typus-launch/funding-vault/view-function.js +2 -2
  23. package/dist/src/typus-launch/improvement-proposal/authority-entry.js +2 -2
  24. package/dist/src/typus-launch/improvement-proposal/view-function.js +2 -2
  25. package/dist/src/typus-launch/ve-typus/view-function.d.ts +7 -0
  26. package/dist/src/typus-launch/ve-typus/view-function.js +34 -2
  27. package/dist/src/typus-nft/fetch.js +2 -2
  28. package/dist/src/typus-nft/user-entry.js +2 -2
  29. package/dist/src/typus-safu/user-history.js +2 -2
  30. package/dist/src/typus-safu/view-function.js +2 -2
  31. package/dist/src/utils/api/defillama/tvl.js +2 -2
  32. package/dist/src/utils/api/price.js +2 -2
  33. package/dist/src/utils/api/sentio/events.js +2 -2
  34. package/dist/src/utils/api/sentio/leader-board.js +2 -2
  35. package/dist/src/utils/api/sentio/reward-generated.js +2 -2
  36. package/dist/src/utils/api/sentio/vault-history.js +2 -2
  37. package/dist/src/utils/mint.js +2 -2
  38. package/dist/src/utils/pyth/pythClient.js +2 -2
  39. package/dist/src/utils/typusConfig.js +26 -13
  40. package/package.json +6 -54
  41. package/dist/src/typus-perp/_dependencies/source/0x1/ascii/structs.d.ts +0 -92
  42. package/dist/src/typus-perp/_dependencies/source/0x1/ascii/structs.js +0 -396
  43. package/dist/src/typus-perp/_dependencies/source/0x1/bit-vector/structs.d.ts +0 -56
  44. package/dist/src/typus-perp/_dependencies/source/0x1/bit-vector/structs.js +0 -258
  45. package/dist/src/typus-perp/_dependencies/source/0x1/fixed-point32/structs.d.ts +0 -46
  46. package/dist/src/typus-perp/_dependencies/source/0x1/fixed-point32/structs.js +0 -228
  47. package/dist/src/typus-perp/_dependencies/source/0x1/index.d.ts +0 -3
  48. package/dist/src/typus-perp/_dependencies/source/0x1/index.js +0 -6
  49. package/dist/src/typus-perp/_dependencies/source/0x1/init.d.ts +0 -2
  50. package/dist/src/typus-perp/_dependencies/source/0x1/init.js +0 -45
  51. package/dist/src/typus-perp/_dependencies/source/0x1/option/structs.d.ts +0 -52
  52. package/dist/src/typus-perp/_dependencies/source/0x1/option/structs.js +0 -267
  53. package/dist/src/typus-perp/_dependencies/source/0x1/string/structs.d.ts +0 -50
  54. package/dist/src/typus-perp/_dependencies/source/0x1/string/structs.js +0 -252
  55. package/dist/src/typus-perp/_dependencies/source/0x1/type-name/structs.d.ts +0 -53
  56. package/dist/src/typus-perp/_dependencies/source/0x1/type-name/structs.js +0 -229
  57. package/dist/src/typus-perp/_dependencies/source/0x1/uq32-32/structs.d.ts +0 -46
  58. package/dist/src/typus-perp/_dependencies/source/0x1/uq32-32/structs.js +0 -228
  59. package/dist/src/typus-perp/_dependencies/source/0x1/uq64-64/structs.d.ts +0 -46
  60. package/dist/src/typus-perp/_dependencies/source/0x1/uq64-64/structs.js +0 -228
  61. package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/index.d.ts +0 -5
  62. package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/index.js +0 -8
  63. package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/init.d.ts +0 -2
  64. package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/init.js +0 -40
  65. package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/oracle/structs.d.ts +0 -350
  66. package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/oracle/structs.js +0 -793
  67. package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/pyth-parser/structs.d.ts +0 -111
  68. package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/pyth-parser/structs.js +0 -395
  69. package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/supra/structs.d.ts +0 -70
  70. package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/supra/structs.js +0 -252
  71. package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/switchboard-feed-parser/structs.d.ts +0 -70
  72. package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/switchboard-feed-parser/structs.js +0 -255
  73. package/dist/src/typus-perp/_dependencies/source/0x2/authenticator-state/structs.d.ts +0 -464
  74. package/dist/src/typus-perp/_dependencies/source/0x2/authenticator-state/structs.js +0 -894
  75. package/dist/src/typus-perp/_dependencies/source/0x2/bag/structs.d.ts +0 -61
  76. package/dist/src/typus-perp/_dependencies/source/0x2/bag/structs.js +0 -235
  77. package/dist/src/typus-perp/_dependencies/source/0x2/balance/structs.d.ts +0 -88
  78. package/dist/src/typus-perp/_dependencies/source/0x2/balance/structs.js +0 -398
  79. package/dist/src/typus-perp/_dependencies/source/0x2/bcs/structs.d.ts +0 -50
  80. package/dist/src/typus-perp/_dependencies/source/0x2/bcs/structs.js +0 -252
  81. package/dist/src/typus-perp/_dependencies/source/0x2/bls12381/structs.d.ts +0 -214
  82. package/dist/src/typus-perp/_dependencies/source/0x2/bls12381/structs.js +0 -820
  83. package/dist/src/typus-perp/_dependencies/source/0x2/borrow/structs.d.ts +0 -113
  84. package/dist/src/typus-perp/_dependencies/source/0x2/borrow/structs.js +0 -410
  85. package/dist/src/typus-perp/_dependencies/source/0x2/clock/structs.d.ts +0 -61
  86. package/dist/src/typus-perp/_dependencies/source/0x2/clock/structs.js +0 -235
  87. package/dist/src/typus-perp/_dependencies/source/0x2/coin/structs.d.ts +0 -460
  88. package/dist/src/typus-perp/_dependencies/source/0x2/coin/structs.js +0 -1259
  89. package/dist/src/typus-perp/_dependencies/source/0x2/config/structs.d.ts +0 -179
  90. package/dist/src/typus-perp/_dependencies/source/0x2/config/structs.js +0 -577
  91. package/dist/src/typus-perp/_dependencies/source/0x2/deny-list/structs.d.ts +0 -430
  92. package/dist/src/typus-perp/_dependencies/source/0x2/deny-list/structs.js +0 -1177
  93. package/dist/src/typus-perp/_dependencies/source/0x2/display/structs.d.ts +0 -241
  94. package/dist/src/typus-perp/_dependencies/source/0x2/display/structs.js +0 -584
  95. package/dist/src/typus-perp/_dependencies/source/0x2/dynamic-field/structs.d.ts +0 -68
  96. package/dist/src/typus-perp/_dependencies/source/0x2/dynamic-field/structs.js +0 -256
  97. package/dist/src/typus-perp/_dependencies/source/0x2/dynamic-object-field/structs.d.ts +0 -47
  98. package/dist/src/typus-perp/_dependencies/source/0x2/dynamic-object-field/structs.js +0 -242
  99. package/dist/src/typus-perp/_dependencies/source/0x2/groth16/structs.d.ts +0 -204
  100. package/dist/src/typus-perp/_dependencies/source/0x2/groth16/structs.js +0 -710
  101. package/dist/src/typus-perp/_dependencies/source/0x2/group-ops/structs.d.ts +0 -50
  102. package/dist/src/typus-perp/_dependencies/source/0x2/group-ops/structs.js +0 -263
  103. package/dist/src/typus-perp/_dependencies/source/0x2/index.d.ts +0 -3
  104. package/dist/src/typus-perp/_dependencies/source/0x2/index.js +0 -6
  105. package/dist/src/typus-perp/_dependencies/source/0x2/init.d.ts +0 -2
  106. package/dist/src/typus-perp/_dependencies/source/0x2/init.js +0 -161
  107. package/dist/src/typus-perp/_dependencies/source/0x2/kiosk/structs.d.ts +0 -606
  108. package/dist/src/typus-perp/_dependencies/source/0x2/kiosk/structs.js +0 -1724
  109. package/dist/src/typus-perp/_dependencies/source/0x2/kiosk-extension/structs.d.ts +0 -121
  110. package/dist/src/typus-perp/_dependencies/source/0x2/kiosk-extension/structs.js +0 -400
  111. package/dist/src/typus-perp/_dependencies/source/0x2/linked-table/structs.d.ts +0 -153
  112. package/dist/src/typus-perp/_dependencies/source/0x2/linked-table/structs.js +0 -438
  113. package/dist/src/typus-perp/_dependencies/source/0x2/object/structs.d.ts +0 -92
  114. package/dist/src/typus-perp/_dependencies/source/0x2/object/structs.js +0 -377
  115. package/dist/src/typus-perp/_dependencies/source/0x2/object-bag/structs.d.ts +0 -61
  116. package/dist/src/typus-perp/_dependencies/source/0x2/object-bag/structs.js +0 -235
  117. package/dist/src/typus-perp/_dependencies/source/0x2/object-table/structs.d.ts +0 -61
  118. package/dist/src/typus-perp/_dependencies/source/0x2/object-table/structs.js +0 -248
  119. package/dist/src/typus-perp/_dependencies/source/0x2/package/structs.d.ts +0 -280
  120. package/dist/src/typus-perp/_dependencies/source/0x2/package/structs.js +0 -752
  121. package/dist/src/typus-perp/_dependencies/source/0x2/priority-queue/structs.d.ts +0 -111
  122. package/dist/src/typus-perp/_dependencies/source/0x2/priority-queue/structs.js +0 -434
  123. package/dist/src/typus-perp/_dependencies/source/0x2/random/structs.d.ts +0 -204
  124. package/dist/src/typus-perp/_dependencies/source/0x2/random/structs.js +0 -586
  125. package/dist/src/typus-perp/_dependencies/source/0x2/sui/structs.d.ts +0 -46
  126. package/dist/src/typus-perp/_dependencies/source/0x2/sui/structs.js +0 -228
  127. package/dist/src/typus-perp/_dependencies/source/0x2/table/structs.d.ts +0 -61
  128. package/dist/src/typus-perp/_dependencies/source/0x2/table/structs.js +0 -248
  129. package/dist/src/typus-perp/_dependencies/source/0x2/table-vec/structs.d.ts +0 -68
  130. package/dist/src/typus-perp/_dependencies/source/0x2/table-vec/structs.js +0 -264
  131. package/dist/src/typus-perp/_dependencies/source/0x2/token/structs.d.ts +0 -449
  132. package/dist/src/typus-perp/_dependencies/source/0x2/token/structs.js +0 -1107
  133. package/dist/src/typus-perp/_dependencies/source/0x2/transfer/structs.d.ts +0 -57
  134. package/dist/src/typus-perp/_dependencies/source/0x2/transfer/structs.js +0 -246
  135. package/dist/src/typus-perp/_dependencies/source/0x2/transfer-policy/structs.d.ts +0 -370
  136. package/dist/src/typus-perp/_dependencies/source/0x2/transfer-policy/structs.js +0 -1099
  137. package/dist/src/typus-perp/_dependencies/source/0x2/tx-context/structs.d.ts +0 -74
  138. package/dist/src/typus-perp/_dependencies/source/0x2/tx-context/structs.js +0 -279
  139. package/dist/src/typus-perp/_dependencies/source/0x2/url/structs.d.ts +0 -53
  140. package/dist/src/typus-perp/_dependencies/source/0x2/url/structs.js +0 -229
  141. package/dist/src/typus-perp/_dependencies/source/0x2/vec-map/structs.d.ts +0 -111
  142. package/dist/src/typus-perp/_dependencies/source/0x2/vec-map/structs.js +0 -436
  143. package/dist/src/typus-perp/_dependencies/source/0x2/vec-set/structs.d.ts +0 -51
  144. package/dist/src/typus-perp/_dependencies/source/0x2/vec-set/structs.js +0 -266
  145. package/dist/src/typus-perp/_dependencies/source/0x2/versioned/structs.d.ts +0 -113
  146. package/dist/src/typus-perp/_dependencies/source/0x2/versioned/structs.js +0 -389
  147. package/dist/src/typus-perp/_dependencies/source/0x2/zklogin-verified-id/structs.d.ts +0 -110
  148. package/dist/src/typus-perp/_dependencies/source/0x2/zklogin-verified-id/structs.js +0 -263
  149. package/dist/src/typus-perp/_dependencies/source/0x2/zklogin-verified-issuer/structs.d.ts +0 -74
  150. package/dist/src/typus-perp/_dependencies/source/0x2/zklogin-verified-issuer/structs.js +0 -245
  151. package/dist/src/typus-perp/_dependencies/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/index.d.ts +0 -3
  152. package/dist/src/typus-perp/_dependencies/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/index.js +0 -6
  153. package/dist/src/typus-perp/_dependencies/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/init.d.ts +0 -2
  154. package/dist/src/typus-perp/_dependencies/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/init.js +0 -30
  155. package/dist/src/typus-perp/_dependencies/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/validator/structs.d.ts +0 -55
  156. package/dist/src/typus-perp/_dependencies/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/validator/structs.js +0 -229
  157. package/dist/src/typus-perp/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/index.d.ts +0 -4
  158. package/dist/src/typus-perp/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/index.js +0 -7
  159. package/dist/src/typus-perp/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/init.d.ts +0 -2
  160. package/dist/src/typus-perp/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/init.js +0 -33
  161. package/dist/src/typus-perp/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/price-data-pull/structs.d.ts +0 -46
  162. package/dist/src/typus-perp/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/price-data-pull/structs.js +0 -228
  163. package/dist/src/typus-perp/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/suprasvaluefeed/structs.d.ts +0 -121
  164. package/dist/src/typus-perp/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/suprasvaluefeed/structs.js +0 -401
  165. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/airdrop/structs.d.ts +0 -489
  166. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/airdrop/structs.js +0 -1092
  167. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/big-vector/structs.d.ts +0 -147
  168. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/big-vector/structs.js +0 -446
  169. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/critbit/structs.d.ts +0 -239
  170. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/critbit/structs.js +0 -643
  171. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/ecosystem/structs.d.ts +0 -405
  172. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/ecosystem/structs.js +0 -898
  173. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/index.d.ts +0 -8
  174. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/index.js +0 -11
  175. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/init.d.ts +0 -2
  176. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/init.js +0 -92
  177. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/keyed-big-vector/structs.d.ts +0 -227
  178. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/keyed-big-vector/structs.js +0 -622
  179. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/leaderboard/structs.d.ts +0 -699
  180. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/leaderboard/structs.js +0 -1476
  181. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/linked-object-table/structs.d.ts +0 -161
  182. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/linked-object-table/structs.js +0 -438
  183. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/linked-set/structs.d.ts +0 -147
  184. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/linked-set/structs.js +0 -430
  185. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/tails-staking/structs.d.ts +0 -1071
  186. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/tails-staking/structs.js +0 -2275
  187. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/tgld/structs.d.ts +0 -279
  188. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/tgld/structs.js +0 -732
  189. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/user/structs.d.ts +0 -328
  190. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/user/structs.js +0 -900
  191. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/discount-mint/structs.d.ts +0 -628
  192. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/discount-mint/structs.js +0 -1335
  193. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/index.d.ts +0 -9
  194. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/index.js +0 -12
  195. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/init.d.ts +0 -2
  196. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/init.js +0 -62
  197. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/royalty-rule/structs.d.ts +0 -94
  198. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/royalty-rule/structs.js +0 -382
  199. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/staking/structs.d.ts +0 -454
  200. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/staking/structs.js +0 -886
  201. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/table-vec/structs.d.ts +0 -68
  202. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/table-vec/structs.js +0 -264
  203. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/typus-nft/structs.d.ts +0 -1117
  204. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/typus-nft/structs.js +0 -2407
  205. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/auto-bid/structs.d.ts +0 -1524
  206. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/auto-bid/structs.js +0 -3052
  207. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/index.d.ts +0 -10
  208. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/index.js +0 -13
  209. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/init.d.ts +0 -2
  210. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/init.js +0 -135
  211. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tails-staking/structs.d.ts +0 -1267
  212. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tails-staking/structs.js +0 -2846
  213. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-authorized-entry/structs.d.ts +0 -1412
  214. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-authorized-entry/structs.js +0 -1669
  215. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-fee-pool-entry/structs.d.ts +0 -425
  216. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-fee-pool-entry/structs.js +0 -1249
  217. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-registry-authorized-entry/structs.d.ts +0 -1156
  218. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-registry-authorized-entry/structs.js +0 -1869
  219. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-view-function/structs.d.ts +0 -82
  220. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-view-function/structs.js +0 -264
  221. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/typus-dov-single/structs.d.ts +0 -5022
  222. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/typus-dov-single/structs.js +0 -7680
  223. package/dist/src/typus-perp/_dependencies/source/0x7237ec8436ef7e927c45470db6db3a834dd84cf903aedee3844e847fe4805399/index.d.ts +0 -3
  224. package/dist/src/typus-perp/_dependencies/source/0x7237ec8436ef7e927c45470db6db3a834dd84cf903aedee3844e847fe4805399/index.js +0 -6
  225. package/dist/src/typus-perp/_dependencies/source/0x7237ec8436ef7e927c45470db6db3a834dd84cf903aedee3844e847fe4805399/init.d.ts +0 -2
  226. package/dist/src/typus-perp/_dependencies/source/0x7237ec8436ef7e927c45470db6db3a834dd84cf903aedee3844e847fe4805399/init.js +0 -4
  227. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/authority/structs.d.ts +0 -88
  228. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/authority/structs.js +0 -256
  229. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/balance-pool/structs.d.ts +0 -347
  230. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/balance-pool/structs.js +0 -581
  231. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/big-vector/structs.d.ts +0 -73
  232. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/big-vector/structs.js +0 -258
  233. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/dutch/structs.d.ts +0 -876
  234. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/dutch/structs.js +0 -1735
  235. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/i64/structs.d.ts +0 -46
  236. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/i64/structs.js +0 -224
  237. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/index.d.ts +0 -3
  238. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/index.js +0 -6
  239. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/init.d.ts +0 -2
  240. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/init.js +0 -79
  241. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/linked-list/structs.d.ts +0 -155
  242. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/linked-list/structs.js +0 -444
  243. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/vault/structs.d.ts +0 -2386
  244. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/vault/structs.js +0 -5014
  245. package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/aggregator/structs.d.ts +0 -745
  246. package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/aggregator/structs.js +0 -1229
  247. package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/index.d.ts +0 -3
  248. package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/index.js +0 -6
  249. package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/init.d.ts +0 -2
  250. package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/init.js +0 -43
  251. package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/job/structs.d.ts +0 -87
  252. package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/job/structs.js +0 -277
  253. package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/math/structs.d.ts +0 -58
  254. package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/math/structs.js +0 -240
  255. package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/quote/structs.d.ts +0 -121
  256. package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/quote/structs.js +0 -322
  257. package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/switchboard/structs.d.ts +0 -55
  258. package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/switchboard/structs.js +0 -229
  259. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/batch-price-attestation/structs.d.ts +0 -289
  260. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/batch-price-attestation/structs.js +0 -443
  261. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/contract-upgrade/structs.d.ts +0 -114
  262. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/contract-upgrade/structs.js +0 -384
  263. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/data-source/structs.d.ts +0 -71
  264. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/data-source/structs.js +0 -235
  265. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/event/structs.d.ts +0 -209
  266. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/event/structs.js +0 -383
  267. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/governance/structs.d.ts +0 -73
  268. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/governance/structs.js +0 -265
  269. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/governance-action/structs.d.ts +0 -46
  270. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/governance-action/structs.js +0 -228
  271. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/governance-instruction/structs.d.ts +0 -77
  272. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/governance-instruction/structs.js +0 -271
  273. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/hot-potato-vector/structs.d.ts +0 -51
  274. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/hot-potato-vector/structs.js +0 -266
  275. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/i64/structs.d.ts +0 -52
  276. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/i64/structs.js +0 -234
  277. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/index.d.ts +0 -3
  278. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/index.js +0 -6
  279. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/init.d.ts +0 -2
  280. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/init.js +0 -85
  281. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/migrate/structs.d.ts +0 -51
  282. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/migrate/structs.js +0 -229
  283. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/price/structs.d.ts +0 -89
  284. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/price/structs.js +0 -247
  285. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/price-feed/structs.d.ts +0 -158
  286. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/price-feed/structs.js +0 -242
  287. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/price-identifier/structs.d.ts +0 -50
  288. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/price-identifier/structs.js +0 -252
  289. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/price-info/structs.d.ts +0 -360
  290. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/price-info/structs.js +0 -396
  291. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/price-status/structs.d.ts +0 -46
  292. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/price-status/structs.js +0 -228
  293. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/set/structs.d.ts +0 -120
  294. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/set/structs.js +0 -421
  295. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/set-data-sources/structs.d.ts +0 -81
  296. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/set-data-sources/structs.js +0 -253
  297. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/set-fee-recipient/structs.d.ts +0 -46
  298. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/set-fee-recipient/structs.js +0 -231
  299. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/set-governance-data-source/structs.d.ts +0 -77
  300. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/set-governance-data-source/structs.js +0 -241
  301. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/set-stale-price-threshold/structs.d.ts +0 -46
  302. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/set-stale-price-threshold/structs.js +0 -228
  303. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/set-update-fee/structs.d.ts +0 -52
  304. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/set-update-fee/structs.js +0 -234
  305. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/setup/structs.d.ts +0 -55
  306. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/setup/structs.js +0 -229
  307. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/state/structs.d.ts +0 -282
  308. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/state/structs.js +0 -573
  309. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/version-control/structs.d.ts +0 -130
  310. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/version-control/structs.js +0 -524
  311. package/dist/src/typus-perp/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/index.d.ts +0 -3
  312. package/dist/src/typus-perp/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/index.js +0 -6
  313. package/dist/src/typus-perp/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/init.d.ts +0 -2
  314. package/dist/src/typus-perp/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/init.js +0 -36
  315. package/dist/src/typus-perp/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/kiosk-lock-rule/structs.d.ts +0 -88
  316. package/dist/src/typus-perp/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/kiosk-lock-rule/structs.js +0 -376
  317. package/dist/src/typus-perp/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/royalty-rule/structs.d.ts +0 -94
  318. package/dist/src/typus-perp/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/royalty-rule/structs.js +0 -382
  319. package/dist/src/typus-perp/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/witness-rule/structs.d.ts +0 -46
  320. package/dist/src/typus-perp/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/witness-rule/structs.js +0 -239
  321. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/bytes20/structs.d.ts +0 -50
  322. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/bytes20/structs.js +0 -252
  323. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/bytes32/structs.d.ts +0 -50
  324. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/bytes32/structs.js +0 -252
  325. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/consumed-vaas/structs.d.ts +0 -77
  326. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/consumed-vaas/structs.js +0 -254
  327. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/cursor/structs.d.ts +0 -51
  328. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/cursor/structs.js +0 -266
  329. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/emitter/structs.d.ts +0 -153
  330. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/emitter/structs.js +0 -531
  331. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/external-address/structs.d.ts +0 -57
  332. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/external-address/structs.js +0 -229
  333. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/fee-collector/structs.d.ts +0 -63
  334. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/fee-collector/structs.js +0 -260
  335. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/governance-message/structs.d.ts +0 -168
  336. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/governance-message/structs.js +0 -460
  337. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/guardian/structs.d.ts +0 -57
  338. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/guardian/structs.js +0 -229
  339. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/guardian-set/structs.d.ts +0 -81
  340. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/guardian-set/structs.js +0 -265
  341. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/guardian-signature/structs.d.ts +0 -85
  342. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/guardian-signature/structs.js +0 -247
  343. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/index.d.ts +0 -3
  344. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/index.js +0 -6
  345. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/init.d.ts +0 -2
  346. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/init.js +0 -90
  347. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/migrate/structs.d.ts +0 -51
  348. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/migrate/structs.js +0 -229
  349. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/package-utils/structs.d.ts +0 -194
  350. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/package-utils/structs.js +0 -680
  351. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/publish-message/structs.d.ts +0 -151
  352. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/publish-message/structs.js +0 -449
  353. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/set/structs.d.ts +0 -110
  354. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/set/structs.js +0 -412
  355. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/set-fee/structs.d.ts +0 -88
  356. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/set-fee/structs.js +0 -376
  357. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/setup/structs.d.ts +0 -55
  358. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/setup/structs.js +0 -229
  359. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/state/structs.d.ts +0 -278
  360. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/state/structs.js +0 -455
  361. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/transfer-fee/structs.d.ts +0 -94
  362. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/transfer-fee/structs.js +0 -385
  363. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/update-guardian-set/structs.d.ts +0 -159
  364. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/update-guardian-set/structs.js +0 -555
  365. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/upgrade-contract/structs.d.ts +0 -156
  366. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/upgrade-contract/structs.js +0 -532
  367. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/vaa/structs.d.ts +0 -128
  368. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/vaa/structs.js +0 -302
  369. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/version-control/structs.d.ts +0 -88
  370. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/version-control/structs.js +0 -376
  371. package/dist/src/typus-perp/_framework/init-loader.d.ts +0 -2
  372. package/dist/src/typus-perp/_framework/init-loader.js +0 -63
  373. package/dist/src/typus-perp/_framework/loader.d.ts +0 -17
  374. package/dist/src/typus-perp/_framework/loader.js +0 -108
  375. package/dist/src/typus-perp/_framework/reified.d.ts +0 -108
  376. package/dist/src/typus-perp/_framework/reified.js +0 -237
  377. package/dist/src/typus-perp/_framework/util.d.ts +0 -35
  378. package/dist/src/typus-perp/_framework/util.js +0 -396
  379. package/dist/src/typus-perp/_framework/vector.d.ts +0 -35
  380. package/dist/src/typus-perp/_framework/vector.js +0 -112
  381. package/dist/src/typus-perp/fetch.d.ts +0 -17
  382. package/dist/src/typus-perp/fetch.js +0 -410
  383. package/dist/src/typus-perp/index.d.ts +0 -5
  384. package/dist/src/typus-perp/index.js +0 -29
  385. package/dist/src/typus-perp/readVec.d.ts +0 -3
  386. package/dist/src/typus-perp/readVec.js +0 -117
  387. package/dist/src/typus-perp/typus_perp/admin/functions.d.ts +0 -50
  388. package/dist/src/typus-perp/typus_perp/admin/functions.js +0 -116
  389. package/dist/src/typus-perp/typus_perp/admin/structs.d.ts +0 -447
  390. package/dist/src/typus-perp/typus_perp/admin/structs.js +0 -898
  391. package/dist/src/typus-perp/typus_perp/index.d.ts +0 -3
  392. package/dist/src/typus-perp/typus_perp/index.js +0 -6
  393. package/dist/src/typus-perp/typus_perp/init.d.ts +0 -2
  394. package/dist/src/typus-perp/typus_perp/init.js +0 -107
  395. package/dist/src/typus-perp/typus_perp/lp-pool/functions.d.ts +0 -342
  396. package/dist/src/typus-perp/typus_perp/lp-pool/functions.js +0 -517
  397. package/dist/src/typus-perp/typus_perp/lp-pool/structs.d.ts +0 -3088
  398. package/dist/src/typus-perp/typus_perp/lp-pool/structs.js +0 -4800
  399. package/dist/src/typus-perp/typus_perp/math/functions.d.ts +0 -18
  400. package/dist/src/typus-perp/typus_perp/math/functions.js +0 -49
  401. package/dist/src/typus-perp/typus_perp/oracle/functions.d.ts +0 -13
  402. package/dist/src/typus-perp/typus_perp/oracle/functions.js +0 -25
  403. package/dist/src/typus-perp/typus_perp/oracle/structs.d.ts +0 -111
  404. package/dist/src/typus-perp/typus_perp/oracle/structs.js +0 -395
  405. package/dist/src/typus-perp/typus_perp/position/functions.d.ts +0 -343
  406. package/dist/src/typus-perp/typus_perp/position/functions.js +0 -659
  407. package/dist/src/typus-perp/typus_perp/position/structs.d.ts +0 -1174
  408. package/dist/src/typus-perp/typus_perp/position/structs.js +0 -1624
  409. package/dist/src/typus-perp/typus_perp/symbol/functions.d.ts +0 -9
  410. package/dist/src/typus-perp/typus_perp/symbol/functions.js +0 -33
  411. package/dist/src/typus-perp/typus_perp/symbol/structs.d.ts +0 -81
  412. package/dist/src/typus-perp/typus_perp/symbol/structs.js +0 -235
  413. package/dist/src/typus-perp/typus_perp/tlp/functions.d.ts +0 -19
  414. package/dist/src/typus-perp/typus_perp/tlp/functions.js +0 -41
  415. package/dist/src/typus-perp/typus_perp/tlp/structs.d.ts +0 -97
  416. package/dist/src/typus-perp/typus_perp/tlp/structs.js +0 -377
  417. package/dist/src/typus-perp/typus_perp/token-interface/functions.d.ts +0 -11
  418. package/dist/src/typus-perp/typus_perp/token-interface/functions.js +0 -20
  419. package/dist/src/typus-perp/typus_perp/trading/functions.d.ts +0 -493
  420. package/dist/src/typus-perp/typus_perp/trading/functions.js +0 -711
  421. package/dist/src/typus-perp/typus_perp/trading/structs.d.ts +0 -2993
  422. package/dist/src/typus-perp/typus_perp/trading/structs.js +0 -5002
  423. package/dist/src/typus-perp/typus_perp/treasury-caps/functions.d.ts +0 -9
  424. package/dist/src/typus-perp/typus_perp/treasury-caps/functions.js +0 -35
  425. package/dist/src/typus-perp/typus_perp/treasury-caps/structs.d.ts +0 -55
  426. package/dist/src/typus-perp/typus_perp/treasury-caps/structs.js +0 -229
  427. package/dist/src/typus-perp/typus_stake_pool/admin/functions.d.ts +0 -50
  428. package/dist/src/typus-perp/typus_stake_pool/admin/functions.js +0 -116
  429. package/dist/src/typus-perp/typus_stake_pool/admin/structs.d.ts +0 -447
  430. package/dist/src/typus-perp/typus_stake_pool/admin/structs.js +0 -898
  431. package/dist/src/typus-perp/typus_stake_pool/index.d.ts +0 -3
  432. package/dist/src/typus-perp/typus_stake_pool/index.js +0 -6
  433. package/dist/src/typus-perp/typus_stake_pool/init.d.ts +0 -2
  434. package/dist/src/typus-perp/typus_stake_pool/init.js +0 -57
  435. package/dist/src/typus-perp/typus_stake_pool/stake-pool/functions.d.ts +0 -175
  436. package/dist/src/typus-perp/typus_stake_pool/stake-pool/functions.js +0 -275
  437. package/dist/src/typus-perp/typus_stake_pool/stake-pool/structs.d.ts +0 -2179
  438. package/dist/src/typus-perp/typus_stake_pool/stake-pool/structs.js +0 -3939
  439. package/dist/src/typus-perp/user/index.d.ts +0 -3
  440. package/dist/src/typus-perp/user/index.js +0 -19
  441. package/dist/src/typus-perp/user/order.d.ts +0 -29
  442. package/dist/src/typus-perp/user/order.js +0 -206
  443. package/dist/src/typus-perp/user/orderWithBidReceipt.d.ts +0 -22
  444. package/dist/src/typus-perp/user/orderWithBidReceipt.js +0 -144
  445. package/dist/src/typus-perp/user/tlp.d.ts +0 -32
  446. package/dist/src/typus-perp/user/tlp.js +0 -267
@@ -1,1724 +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 (mod) {
30
- if (mod && mod.__esModule) return mod;
31
- var result = {};
32
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
- __setModuleDefault(result, mod);
34
- return result;
35
- };
36
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
- return new (P || (P = Promise))(function (resolve, reject) {
39
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
- step((generator = generator.apply(thisArg, _arguments || [])).next());
43
- });
44
- };
45
- var __generator = (this && this.__generator) || function (thisArg, body) {
46
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
47
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
48
- function verb(n) { return function (v) { return step([n, v]); }; }
49
- function step(op) {
50
- if (f) throw new TypeError("Generator is already executing.");
51
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
52
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
53
- if (y = 0, t) op = [op[0] & 2, t.value];
54
- switch (op[0]) {
55
- case 0: case 1: t = op; break;
56
- case 4: _.label++; return { value: op[1], done: false };
57
- case 5: _.label++; y = op[1]; op = [0]; continue;
58
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
59
- default:
60
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
61
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
62
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
63
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
64
- if (t[2]) _.ops.pop();
65
- _.trys.pop(); continue;
66
- }
67
- op = body.call(thisArg, _);
68
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
69
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
70
- }
71
- };
72
- var __read = (this && this.__read) || function (o, n) {
73
- var m = typeof Symbol === "function" && o[Symbol.iterator];
74
- if (!m) return o;
75
- var i = m.call(o), r, ar = [], e;
76
- try {
77
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
78
- }
79
- catch (error) { e = { error: error }; }
80
- finally {
81
- try {
82
- if (r && !r.done && (m = i["return"])) m.call(i);
83
- }
84
- finally { if (e) throw e.error; }
85
- }
86
- return ar;
87
- };
88
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
89
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
90
- if (ar || !(i in from)) {
91
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
92
- ar[i] = from[i];
93
- }
94
- }
95
- return to.concat(ar || Array.prototype.slice.call(from));
96
- };
97
- Object.defineProperty(exports, "__esModule", { value: true });
98
- exports.PurchaseCap = exports.Lock = exports.Listing = exports.KioskOwnerCap = exports.Kiosk = exports.ItemPurchased = exports.ItemListed = exports.ItemDelisted = exports.Item = exports.Borrow = void 0;
99
- exports.isBorrow = isBorrow;
100
- exports.isItem = isItem;
101
- exports.isItemDelisted = isItemDelisted;
102
- exports.isItemListed = isItemListed;
103
- exports.isItemPurchased = isItemPurchased;
104
- exports.isKiosk = isKiosk;
105
- exports.isKioskOwnerCap = isKioskOwnerCap;
106
- exports.isListing = isListing;
107
- exports.isLock = isLock;
108
- exports.isPurchaseCap = isPurchaseCap;
109
- var reified = __importStar(require("../../../../_framework/reified"));
110
- var reified_1 = require("../../../../_framework/reified");
111
- var util_1 = require("../../../../_framework/util");
112
- var structs_1 = require("../balance/structs");
113
- var index_1 = require("../index");
114
- var structs_2 = require("../object/structs");
115
- var structs_3 = require("../sui/structs");
116
- var bcs_1 = require("@mysten/sui/bcs");
117
- var utils_1 = require("@mysten/sui/utils");
118
- /* ============================== Borrow =============================== */
119
- function isBorrow(type) {
120
- type = (0, util_1.compressSuiType)(type);
121
- return type === "".concat(index_1.PKG_V26, "::kiosk::Borrow");
122
- }
123
- var Borrow = /** @class */ (function () {
124
- function Borrow(typeArgs, fields) {
125
- this.__StructClass = true;
126
- this.$typeName = Borrow.$typeName;
127
- this.$isPhantom = Borrow.$isPhantom;
128
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Borrow.$typeName], __read(typeArgs), false));
129
- this.$typeArgs = typeArgs;
130
- this.kioskId = fields.kioskId;
131
- this.itemId = fields.itemId;
132
- }
133
- Borrow.reified = function () {
134
- var _this = this;
135
- return {
136
- typeName: Borrow.$typeName,
137
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Borrow.$typeName], [], false)),
138
- typeArgs: [],
139
- isPhantom: Borrow.$isPhantom,
140
- reifiedTypeArgs: [],
141
- fromFields: function (fields) { return Borrow.fromFields(fields); },
142
- fromFieldsWithTypes: function (item) { return Borrow.fromFieldsWithTypes(item); },
143
- fromBcs: function (data) { return Borrow.fromBcs(data); },
144
- bcs: Borrow.bcs,
145
- fromJSONField: function (field) { return Borrow.fromJSONField(field); },
146
- fromJSON: function (json) { return Borrow.fromJSON(json); },
147
- fromSuiParsedData: function (content) { return Borrow.fromSuiParsedData(content); },
148
- fromSuiObjectData: function (content) { return Borrow.fromSuiObjectData(content); },
149
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
150
- return [2 /*return*/, Borrow.fetch(client, id)];
151
- }); }); },
152
- new: function (fields) {
153
- return new Borrow([], fields);
154
- },
155
- kind: "StructClassReified",
156
- };
157
- };
158
- Object.defineProperty(Borrow, "r", {
159
- get: function () {
160
- return Borrow.reified();
161
- },
162
- enumerable: false,
163
- configurable: true
164
- });
165
- Borrow.phantom = function () {
166
- return (0, reified_1.phantom)(Borrow.reified());
167
- };
168
- Object.defineProperty(Borrow, "p", {
169
- get: function () {
170
- return Borrow.phantom();
171
- },
172
- enumerable: false,
173
- configurable: true
174
- });
175
- Object.defineProperty(Borrow, "bcs", {
176
- get: function () {
177
- return bcs_1.bcs.struct("Borrow", {
178
- kiosk_id: structs_2.ID.bcs,
179
- item_id: structs_2.ID.bcs,
180
- });
181
- },
182
- enumerable: false,
183
- configurable: true
184
- });
185
- Borrow.fromFields = function (fields) {
186
- return Borrow.reified().new({
187
- kioskId: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.kiosk_id),
188
- itemId: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.item_id),
189
- });
190
- };
191
- Borrow.fromFieldsWithTypes = function (item) {
192
- if (!isBorrow(item.type)) {
193
- throw new Error("not a Borrow type");
194
- }
195
- return Borrow.reified().new({
196
- kioskId: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.kiosk_id),
197
- itemId: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.item_id),
198
- });
199
- };
200
- Borrow.fromBcs = function (data) {
201
- return Borrow.fromFields(Borrow.bcs.parse(data));
202
- };
203
- Borrow.prototype.toJSONField = function () {
204
- return {
205
- kioskId: this.kioskId,
206
- itemId: this.itemId,
207
- };
208
- };
209
- Borrow.prototype.toJSON = function () {
210
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
211
- };
212
- Borrow.fromJSONField = function (field) {
213
- return Borrow.reified().new({
214
- kioskId: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.kioskId),
215
- itemId: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.itemId),
216
- });
217
- };
218
- Borrow.fromJSON = function (json) {
219
- if (json.$typeName !== Borrow.$typeName) {
220
- throw new Error("not a WithTwoGenerics json object");
221
- }
222
- return Borrow.fromJSONField(json);
223
- };
224
- Borrow.fromSuiParsedData = function (content) {
225
- if (content.dataType !== "moveObject") {
226
- throw new Error("not an object");
227
- }
228
- if (!isBorrow(content.type)) {
229
- throw new Error("object at ".concat(content.fields.id, " is not a Borrow object"));
230
- }
231
- return Borrow.fromFieldsWithTypes(content);
232
- };
233
- Borrow.fromSuiObjectData = function (data) {
234
- if (data.bcs) {
235
- if (data.bcs.dataType !== "moveObject" || !isBorrow(data.bcs.type)) {
236
- throw new Error("object at is not a Borrow object");
237
- }
238
- return Borrow.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
239
- }
240
- if (data.content) {
241
- return Borrow.fromSuiParsedData(data.content);
242
- }
243
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
244
- };
245
- Borrow.fetch = function (client, id) {
246
- return __awaiter(this, void 0, void 0, function () {
247
- var res;
248
- var _a, _b;
249
- return __generator(this, function (_c) {
250
- switch (_c.label) {
251
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
252
- case 1:
253
- res = _c.sent();
254
- if (res.error) {
255
- throw new Error("error fetching Borrow object at id ".concat(id, ": ").concat(res.error.code));
256
- }
257
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isBorrow(res.data.bcs.type)) {
258
- throw new Error("object at id ".concat(id, " is not a Borrow object"));
259
- }
260
- return [2 /*return*/, Borrow.fromSuiObjectData(res.data)];
261
- }
262
- });
263
- });
264
- };
265
- Borrow.$typeName = "".concat(index_1.PKG_V26, "::kiosk::Borrow");
266
- Borrow.$numTypeParams = 0;
267
- Borrow.$isPhantom = [];
268
- return Borrow;
269
- }());
270
- exports.Borrow = Borrow;
271
- /* ============================== Item =============================== */
272
- function isItem(type) {
273
- type = (0, util_1.compressSuiType)(type);
274
- return type === "".concat(index_1.PKG_V26, "::kiosk::Item");
275
- }
276
- var Item = /** @class */ (function () {
277
- function Item(typeArgs, fields) {
278
- this.__StructClass = true;
279
- this.$typeName = Item.$typeName;
280
- this.$isPhantom = Item.$isPhantom;
281
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Item.$typeName], __read(typeArgs), false));
282
- this.$typeArgs = typeArgs;
283
- this.id = fields.id;
284
- }
285
- Item.reified = function () {
286
- var _this = this;
287
- return {
288
- typeName: Item.$typeName,
289
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Item.$typeName], [], false)),
290
- typeArgs: [],
291
- isPhantom: Item.$isPhantom,
292
- reifiedTypeArgs: [],
293
- fromFields: function (fields) { return Item.fromFields(fields); },
294
- fromFieldsWithTypes: function (item) { return Item.fromFieldsWithTypes(item); },
295
- fromBcs: function (data) { return Item.fromBcs(data); },
296
- bcs: Item.bcs,
297
- fromJSONField: function (field) { return Item.fromJSONField(field); },
298
- fromJSON: function (json) { return Item.fromJSON(json); },
299
- fromSuiParsedData: function (content) { return Item.fromSuiParsedData(content); },
300
- fromSuiObjectData: function (content) { return Item.fromSuiObjectData(content); },
301
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
302
- return [2 /*return*/, Item.fetch(client, id)];
303
- }); }); },
304
- new: function (fields) {
305
- return new Item([], fields);
306
- },
307
- kind: "StructClassReified",
308
- };
309
- };
310
- Object.defineProperty(Item, "r", {
311
- get: function () {
312
- return Item.reified();
313
- },
314
- enumerable: false,
315
- configurable: true
316
- });
317
- Item.phantom = function () {
318
- return (0, reified_1.phantom)(Item.reified());
319
- };
320
- Object.defineProperty(Item, "p", {
321
- get: function () {
322
- return Item.phantom();
323
- },
324
- enumerable: false,
325
- configurable: true
326
- });
327
- Object.defineProperty(Item, "bcs", {
328
- get: function () {
329
- return bcs_1.bcs.struct("Item", {
330
- id: structs_2.ID.bcs,
331
- });
332
- },
333
- enumerable: false,
334
- configurable: true
335
- });
336
- Item.fromFields = function (fields) {
337
- return Item.reified().new({
338
- id: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.id),
339
- });
340
- };
341
- Item.fromFieldsWithTypes = function (item) {
342
- if (!isItem(item.type)) {
343
- throw new Error("not a Item type");
344
- }
345
- return Item.reified().new({
346
- id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.id),
347
- });
348
- };
349
- Item.fromBcs = function (data) {
350
- return Item.fromFields(Item.bcs.parse(data));
351
- };
352
- Item.prototype.toJSONField = function () {
353
- return {
354
- id: this.id,
355
- };
356
- };
357
- Item.prototype.toJSON = function () {
358
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
359
- };
360
- Item.fromJSONField = function (field) {
361
- return Item.reified().new({
362
- id: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.id),
363
- });
364
- };
365
- Item.fromJSON = function (json) {
366
- if (json.$typeName !== Item.$typeName) {
367
- throw new Error("not a WithTwoGenerics json object");
368
- }
369
- return Item.fromJSONField(json);
370
- };
371
- Item.fromSuiParsedData = function (content) {
372
- if (content.dataType !== "moveObject") {
373
- throw new Error("not an object");
374
- }
375
- if (!isItem(content.type)) {
376
- throw new Error("object at ".concat(content.fields.id, " is not a Item object"));
377
- }
378
- return Item.fromFieldsWithTypes(content);
379
- };
380
- Item.fromSuiObjectData = function (data) {
381
- if (data.bcs) {
382
- if (data.bcs.dataType !== "moveObject" || !isItem(data.bcs.type)) {
383
- throw new Error("object at is not a Item object");
384
- }
385
- return Item.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
386
- }
387
- if (data.content) {
388
- return Item.fromSuiParsedData(data.content);
389
- }
390
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
391
- };
392
- Item.fetch = function (client, id) {
393
- return __awaiter(this, void 0, void 0, function () {
394
- var res;
395
- var _a, _b;
396
- return __generator(this, function (_c) {
397
- switch (_c.label) {
398
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
399
- case 1:
400
- res = _c.sent();
401
- if (res.error) {
402
- throw new Error("error fetching Item object at id ".concat(id, ": ").concat(res.error.code));
403
- }
404
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isItem(res.data.bcs.type)) {
405
- throw new Error("object at id ".concat(id, " is not a Item object"));
406
- }
407
- return [2 /*return*/, Item.fromSuiObjectData(res.data)];
408
- }
409
- });
410
- });
411
- };
412
- Item.$typeName = "".concat(index_1.PKG_V26, "::kiosk::Item");
413
- Item.$numTypeParams = 0;
414
- Item.$isPhantom = [];
415
- return Item;
416
- }());
417
- exports.Item = Item;
418
- /* ============================== ItemDelisted =============================== */
419
- function isItemDelisted(type) {
420
- type = (0, util_1.compressSuiType)(type);
421
- return type.startsWith("".concat(index_1.PKG_V26, "::kiosk::ItemDelisted") + "<");
422
- }
423
- var ItemDelisted = /** @class */ (function () {
424
- function ItemDelisted(typeArgs, fields) {
425
- this.__StructClass = true;
426
- this.$typeName = ItemDelisted.$typeName;
427
- this.$isPhantom = ItemDelisted.$isPhantom;
428
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([ItemDelisted.$typeName], __read(typeArgs), false));
429
- this.$typeArgs = typeArgs;
430
- this.kiosk = fields.kiosk;
431
- this.id = fields.id;
432
- }
433
- ItemDelisted.reified = function (T) {
434
- var _this = this;
435
- return {
436
- typeName: ItemDelisted.$typeName,
437
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([ItemDelisted.$typeName], [(0, reified_1.extractType)(T)], false)),
438
- typeArgs: [(0, reified_1.extractType)(T)],
439
- isPhantom: ItemDelisted.$isPhantom,
440
- reifiedTypeArgs: [T],
441
- fromFields: function (fields) { return ItemDelisted.fromFields(T, fields); },
442
- fromFieldsWithTypes: function (item) { return ItemDelisted.fromFieldsWithTypes(T, item); },
443
- fromBcs: function (data) { return ItemDelisted.fromBcs(T, data); },
444
- bcs: ItemDelisted.bcs,
445
- fromJSONField: function (field) { return ItemDelisted.fromJSONField(T, field); },
446
- fromJSON: function (json) { return ItemDelisted.fromJSON(T, json); },
447
- fromSuiParsedData: function (content) { return ItemDelisted.fromSuiParsedData(T, content); },
448
- fromSuiObjectData: function (content) { return ItemDelisted.fromSuiObjectData(T, content); },
449
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
450
- return [2 /*return*/, ItemDelisted.fetch(client, T, id)];
451
- }); }); },
452
- new: function (fields) {
453
- return new ItemDelisted([(0, reified_1.extractType)(T)], fields);
454
- },
455
- kind: "StructClassReified",
456
- };
457
- };
458
- Object.defineProperty(ItemDelisted, "r", {
459
- get: function () {
460
- return ItemDelisted.reified;
461
- },
462
- enumerable: false,
463
- configurable: true
464
- });
465
- ItemDelisted.phantom = function (T) {
466
- return (0, reified_1.phantom)(ItemDelisted.reified(T));
467
- };
468
- Object.defineProperty(ItemDelisted, "p", {
469
- get: function () {
470
- return ItemDelisted.phantom;
471
- },
472
- enumerable: false,
473
- configurable: true
474
- });
475
- Object.defineProperty(ItemDelisted, "bcs", {
476
- get: function () {
477
- return bcs_1.bcs.struct("ItemDelisted", {
478
- kiosk: structs_2.ID.bcs,
479
- id: structs_2.ID.bcs,
480
- });
481
- },
482
- enumerable: false,
483
- configurable: true
484
- });
485
- ItemDelisted.fromFields = function (typeArg, fields) {
486
- return ItemDelisted.reified(typeArg).new({
487
- kiosk: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.kiosk),
488
- id: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.id),
489
- });
490
- };
491
- ItemDelisted.fromFieldsWithTypes = function (typeArg, item) {
492
- if (!isItemDelisted(item.type)) {
493
- throw new Error("not a ItemDelisted type");
494
- }
495
- (0, reified_1.assertFieldsWithTypesArgsMatch)(item, [typeArg]);
496
- return ItemDelisted.reified(typeArg).new({
497
- kiosk: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.kiosk),
498
- id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.id),
499
- });
500
- };
501
- ItemDelisted.fromBcs = function (typeArg, data) {
502
- return ItemDelisted.fromFields(typeArg, ItemDelisted.bcs.parse(data));
503
- };
504
- ItemDelisted.prototype.toJSONField = function () {
505
- return {
506
- kiosk: this.kiosk,
507
- id: this.id,
508
- };
509
- };
510
- ItemDelisted.prototype.toJSON = function () {
511
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
512
- };
513
- ItemDelisted.fromJSONField = function (typeArg, field) {
514
- return ItemDelisted.reified(typeArg).new({
515
- kiosk: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.kiosk),
516
- id: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.id),
517
- });
518
- };
519
- ItemDelisted.fromJSON = function (typeArg, json) {
520
- if (json.$typeName !== ItemDelisted.$typeName) {
521
- throw new Error("not a WithTwoGenerics json object");
522
- }
523
- (0, reified_1.assertReifiedTypeArgsMatch)((0, util_1.composeSuiType)(ItemDelisted.$typeName, (0, reified_1.extractType)(typeArg)), json.$typeArgs, [typeArg]);
524
- return ItemDelisted.fromJSONField(typeArg, json);
525
- };
526
- ItemDelisted.fromSuiParsedData = function (typeArg, content) {
527
- if (content.dataType !== "moveObject") {
528
- throw new Error("not an object");
529
- }
530
- if (!isItemDelisted(content.type)) {
531
- throw new Error("object at ".concat(content.fields.id, " is not a ItemDelisted object"));
532
- }
533
- return ItemDelisted.fromFieldsWithTypes(typeArg, content);
534
- };
535
- ItemDelisted.fromSuiObjectData = function (typeArg, data) {
536
- if (data.bcs) {
537
- if (data.bcs.dataType !== "moveObject" || !isItemDelisted(data.bcs.type)) {
538
- throw new Error("object at is not a ItemDelisted object");
539
- }
540
- var gotTypeArgs = (0, util_1.parseTypeName)(data.bcs.type).typeArgs;
541
- if (gotTypeArgs.length !== 1) {
542
- throw new Error("type argument mismatch: expected 1 type argument but got '".concat(gotTypeArgs.length, "'"));
543
- }
544
- var gotTypeArg = (0, util_1.compressSuiType)(gotTypeArgs[0]);
545
- var expectedTypeArg = (0, util_1.compressSuiType)((0, reified_1.extractType)(typeArg));
546
- if (gotTypeArg !== (0, util_1.compressSuiType)((0, reified_1.extractType)(typeArg))) {
547
- throw new Error("type argument mismatch: expected '".concat(expectedTypeArg, "' but got '").concat(gotTypeArg, "'"));
548
- }
549
- return ItemDelisted.fromBcs(typeArg, (0, utils_1.fromB64)(data.bcs.bcsBytes));
550
- }
551
- if (data.content) {
552
- return ItemDelisted.fromSuiParsedData(typeArg, data.content);
553
- }
554
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
555
- };
556
- ItemDelisted.fetch = function (client, typeArg, id) {
557
- return __awaiter(this, void 0, void 0, function () {
558
- var res;
559
- var _a, _b;
560
- return __generator(this, function (_c) {
561
- switch (_c.label) {
562
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
563
- case 1:
564
- res = _c.sent();
565
- if (res.error) {
566
- throw new Error("error fetching ItemDelisted object at id ".concat(id, ": ").concat(res.error.code));
567
- }
568
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isItemDelisted(res.data.bcs.type)) {
569
- throw new Error("object at id ".concat(id, " is not a ItemDelisted object"));
570
- }
571
- return [2 /*return*/, ItemDelisted.fromSuiObjectData(typeArg, res.data)];
572
- }
573
- });
574
- });
575
- };
576
- ItemDelisted.$typeName = "".concat(index_1.PKG_V26, "::kiosk::ItemDelisted");
577
- ItemDelisted.$numTypeParams = 1;
578
- ItemDelisted.$isPhantom = [true];
579
- return ItemDelisted;
580
- }());
581
- exports.ItemDelisted = ItemDelisted;
582
- /* ============================== ItemListed =============================== */
583
- function isItemListed(type) {
584
- type = (0, util_1.compressSuiType)(type);
585
- return type.startsWith("".concat(index_1.PKG_V26, "::kiosk::ItemListed") + "<");
586
- }
587
- var ItemListed = /** @class */ (function () {
588
- function ItemListed(typeArgs, fields) {
589
- this.__StructClass = true;
590
- this.$typeName = ItemListed.$typeName;
591
- this.$isPhantom = ItemListed.$isPhantom;
592
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([ItemListed.$typeName], __read(typeArgs), false));
593
- this.$typeArgs = typeArgs;
594
- this.kiosk = fields.kiosk;
595
- this.id = fields.id;
596
- this.price = fields.price;
597
- }
598
- ItemListed.reified = function (T) {
599
- var _this = this;
600
- return {
601
- typeName: ItemListed.$typeName,
602
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([ItemListed.$typeName], [(0, reified_1.extractType)(T)], false)),
603
- typeArgs: [(0, reified_1.extractType)(T)],
604
- isPhantom: ItemListed.$isPhantom,
605
- reifiedTypeArgs: [T],
606
- fromFields: function (fields) { return ItemListed.fromFields(T, fields); },
607
- fromFieldsWithTypes: function (item) { return ItemListed.fromFieldsWithTypes(T, item); },
608
- fromBcs: function (data) { return ItemListed.fromBcs(T, data); },
609
- bcs: ItemListed.bcs,
610
- fromJSONField: function (field) { return ItemListed.fromJSONField(T, field); },
611
- fromJSON: function (json) { return ItemListed.fromJSON(T, json); },
612
- fromSuiParsedData: function (content) { return ItemListed.fromSuiParsedData(T, content); },
613
- fromSuiObjectData: function (content) { return ItemListed.fromSuiObjectData(T, content); },
614
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
615
- return [2 /*return*/, ItemListed.fetch(client, T, id)];
616
- }); }); },
617
- new: function (fields) {
618
- return new ItemListed([(0, reified_1.extractType)(T)], fields);
619
- },
620
- kind: "StructClassReified",
621
- };
622
- };
623
- Object.defineProperty(ItemListed, "r", {
624
- get: function () {
625
- return ItemListed.reified;
626
- },
627
- enumerable: false,
628
- configurable: true
629
- });
630
- ItemListed.phantom = function (T) {
631
- return (0, reified_1.phantom)(ItemListed.reified(T));
632
- };
633
- Object.defineProperty(ItemListed, "p", {
634
- get: function () {
635
- return ItemListed.phantom;
636
- },
637
- enumerable: false,
638
- configurable: true
639
- });
640
- Object.defineProperty(ItemListed, "bcs", {
641
- get: function () {
642
- return bcs_1.bcs.struct("ItemListed", {
643
- kiosk: structs_2.ID.bcs,
644
- id: structs_2.ID.bcs,
645
- price: bcs_1.bcs.u64(),
646
- });
647
- },
648
- enumerable: false,
649
- configurable: true
650
- });
651
- ItemListed.fromFields = function (typeArg, fields) {
652
- return ItemListed.reified(typeArg).new({
653
- kiosk: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.kiosk),
654
- id: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.id),
655
- price: (0, reified_1.decodeFromFields)("u64", fields.price),
656
- });
657
- };
658
- ItemListed.fromFieldsWithTypes = function (typeArg, item) {
659
- if (!isItemListed(item.type)) {
660
- throw new Error("not a ItemListed type");
661
- }
662
- (0, reified_1.assertFieldsWithTypesArgsMatch)(item, [typeArg]);
663
- return ItemListed.reified(typeArg).new({
664
- kiosk: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.kiosk),
665
- id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.id),
666
- price: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.price),
667
- });
668
- };
669
- ItemListed.fromBcs = function (typeArg, data) {
670
- return ItemListed.fromFields(typeArg, ItemListed.bcs.parse(data));
671
- };
672
- ItemListed.prototype.toJSONField = function () {
673
- return {
674
- kiosk: this.kiosk,
675
- id: this.id,
676
- price: this.price.toString(),
677
- };
678
- };
679
- ItemListed.prototype.toJSON = function () {
680
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
681
- };
682
- ItemListed.fromJSONField = function (typeArg, field) {
683
- return ItemListed.reified(typeArg).new({
684
- kiosk: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.kiosk),
685
- id: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.id),
686
- price: (0, reified_1.decodeFromJSONField)("u64", field.price),
687
- });
688
- };
689
- ItemListed.fromJSON = function (typeArg, json) {
690
- if (json.$typeName !== ItemListed.$typeName) {
691
- throw new Error("not a WithTwoGenerics json object");
692
- }
693
- (0, reified_1.assertReifiedTypeArgsMatch)((0, util_1.composeSuiType)(ItemListed.$typeName, (0, reified_1.extractType)(typeArg)), json.$typeArgs, [typeArg]);
694
- return ItemListed.fromJSONField(typeArg, json);
695
- };
696
- ItemListed.fromSuiParsedData = function (typeArg, content) {
697
- if (content.dataType !== "moveObject") {
698
- throw new Error("not an object");
699
- }
700
- if (!isItemListed(content.type)) {
701
- throw new Error("object at ".concat(content.fields.id, " is not a ItemListed object"));
702
- }
703
- return ItemListed.fromFieldsWithTypes(typeArg, content);
704
- };
705
- ItemListed.fromSuiObjectData = function (typeArg, data) {
706
- if (data.bcs) {
707
- if (data.bcs.dataType !== "moveObject" || !isItemListed(data.bcs.type)) {
708
- throw new Error("object at is not a ItemListed object");
709
- }
710
- var gotTypeArgs = (0, util_1.parseTypeName)(data.bcs.type).typeArgs;
711
- if (gotTypeArgs.length !== 1) {
712
- throw new Error("type argument mismatch: expected 1 type argument but got '".concat(gotTypeArgs.length, "'"));
713
- }
714
- var gotTypeArg = (0, util_1.compressSuiType)(gotTypeArgs[0]);
715
- var expectedTypeArg = (0, util_1.compressSuiType)((0, reified_1.extractType)(typeArg));
716
- if (gotTypeArg !== (0, util_1.compressSuiType)((0, reified_1.extractType)(typeArg))) {
717
- throw new Error("type argument mismatch: expected '".concat(expectedTypeArg, "' but got '").concat(gotTypeArg, "'"));
718
- }
719
- return ItemListed.fromBcs(typeArg, (0, utils_1.fromB64)(data.bcs.bcsBytes));
720
- }
721
- if (data.content) {
722
- return ItemListed.fromSuiParsedData(typeArg, data.content);
723
- }
724
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
725
- };
726
- ItemListed.fetch = function (client, typeArg, id) {
727
- return __awaiter(this, void 0, void 0, function () {
728
- var res;
729
- var _a, _b;
730
- return __generator(this, function (_c) {
731
- switch (_c.label) {
732
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
733
- case 1:
734
- res = _c.sent();
735
- if (res.error) {
736
- throw new Error("error fetching ItemListed object at id ".concat(id, ": ").concat(res.error.code));
737
- }
738
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isItemListed(res.data.bcs.type)) {
739
- throw new Error("object at id ".concat(id, " is not a ItemListed object"));
740
- }
741
- return [2 /*return*/, ItemListed.fromSuiObjectData(typeArg, res.data)];
742
- }
743
- });
744
- });
745
- };
746
- ItemListed.$typeName = "".concat(index_1.PKG_V26, "::kiosk::ItemListed");
747
- ItemListed.$numTypeParams = 1;
748
- ItemListed.$isPhantom = [true];
749
- return ItemListed;
750
- }());
751
- exports.ItemListed = ItemListed;
752
- /* ============================== ItemPurchased =============================== */
753
- function isItemPurchased(type) {
754
- type = (0, util_1.compressSuiType)(type);
755
- return type.startsWith("".concat(index_1.PKG_V26, "::kiosk::ItemPurchased") + "<");
756
- }
757
- var ItemPurchased = /** @class */ (function () {
758
- function ItemPurchased(typeArgs, fields) {
759
- this.__StructClass = true;
760
- this.$typeName = ItemPurchased.$typeName;
761
- this.$isPhantom = ItemPurchased.$isPhantom;
762
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([ItemPurchased.$typeName], __read(typeArgs), false));
763
- this.$typeArgs = typeArgs;
764
- this.kiosk = fields.kiosk;
765
- this.id = fields.id;
766
- this.price = fields.price;
767
- }
768
- ItemPurchased.reified = function (T) {
769
- var _this = this;
770
- return {
771
- typeName: ItemPurchased.$typeName,
772
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([ItemPurchased.$typeName], [(0, reified_1.extractType)(T)], false)),
773
- typeArgs: [(0, reified_1.extractType)(T)],
774
- isPhantom: ItemPurchased.$isPhantom,
775
- reifiedTypeArgs: [T],
776
- fromFields: function (fields) { return ItemPurchased.fromFields(T, fields); },
777
- fromFieldsWithTypes: function (item) { return ItemPurchased.fromFieldsWithTypes(T, item); },
778
- fromBcs: function (data) { return ItemPurchased.fromBcs(T, data); },
779
- bcs: ItemPurchased.bcs,
780
- fromJSONField: function (field) { return ItemPurchased.fromJSONField(T, field); },
781
- fromJSON: function (json) { return ItemPurchased.fromJSON(T, json); },
782
- fromSuiParsedData: function (content) { return ItemPurchased.fromSuiParsedData(T, content); },
783
- fromSuiObjectData: function (content) { return ItemPurchased.fromSuiObjectData(T, content); },
784
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
785
- return [2 /*return*/, ItemPurchased.fetch(client, T, id)];
786
- }); }); },
787
- new: function (fields) {
788
- return new ItemPurchased([(0, reified_1.extractType)(T)], fields);
789
- },
790
- kind: "StructClassReified",
791
- };
792
- };
793
- Object.defineProperty(ItemPurchased, "r", {
794
- get: function () {
795
- return ItemPurchased.reified;
796
- },
797
- enumerable: false,
798
- configurable: true
799
- });
800
- ItemPurchased.phantom = function (T) {
801
- return (0, reified_1.phantom)(ItemPurchased.reified(T));
802
- };
803
- Object.defineProperty(ItemPurchased, "p", {
804
- get: function () {
805
- return ItemPurchased.phantom;
806
- },
807
- enumerable: false,
808
- configurable: true
809
- });
810
- Object.defineProperty(ItemPurchased, "bcs", {
811
- get: function () {
812
- return bcs_1.bcs.struct("ItemPurchased", {
813
- kiosk: structs_2.ID.bcs,
814
- id: structs_2.ID.bcs,
815
- price: bcs_1.bcs.u64(),
816
- });
817
- },
818
- enumerable: false,
819
- configurable: true
820
- });
821
- ItemPurchased.fromFields = function (typeArg, fields) {
822
- return ItemPurchased.reified(typeArg).new({
823
- kiosk: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.kiosk),
824
- id: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.id),
825
- price: (0, reified_1.decodeFromFields)("u64", fields.price),
826
- });
827
- };
828
- ItemPurchased.fromFieldsWithTypes = function (typeArg, item) {
829
- if (!isItemPurchased(item.type)) {
830
- throw new Error("not a ItemPurchased type");
831
- }
832
- (0, reified_1.assertFieldsWithTypesArgsMatch)(item, [typeArg]);
833
- return ItemPurchased.reified(typeArg).new({
834
- kiosk: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.kiosk),
835
- id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.id),
836
- price: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.price),
837
- });
838
- };
839
- ItemPurchased.fromBcs = function (typeArg, data) {
840
- return ItemPurchased.fromFields(typeArg, ItemPurchased.bcs.parse(data));
841
- };
842
- ItemPurchased.prototype.toJSONField = function () {
843
- return {
844
- kiosk: this.kiosk,
845
- id: this.id,
846
- price: this.price.toString(),
847
- };
848
- };
849
- ItemPurchased.prototype.toJSON = function () {
850
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
851
- };
852
- ItemPurchased.fromJSONField = function (typeArg, field) {
853
- return ItemPurchased.reified(typeArg).new({
854
- kiosk: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.kiosk),
855
- id: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.id),
856
- price: (0, reified_1.decodeFromJSONField)("u64", field.price),
857
- });
858
- };
859
- ItemPurchased.fromJSON = function (typeArg, json) {
860
- if (json.$typeName !== ItemPurchased.$typeName) {
861
- throw new Error("not a WithTwoGenerics json object");
862
- }
863
- (0, reified_1.assertReifiedTypeArgsMatch)((0, util_1.composeSuiType)(ItemPurchased.$typeName, (0, reified_1.extractType)(typeArg)), json.$typeArgs, [typeArg]);
864
- return ItemPurchased.fromJSONField(typeArg, json);
865
- };
866
- ItemPurchased.fromSuiParsedData = function (typeArg, content) {
867
- if (content.dataType !== "moveObject") {
868
- throw new Error("not an object");
869
- }
870
- if (!isItemPurchased(content.type)) {
871
- throw new Error("object at ".concat(content.fields.id, " is not a ItemPurchased object"));
872
- }
873
- return ItemPurchased.fromFieldsWithTypes(typeArg, content);
874
- };
875
- ItemPurchased.fromSuiObjectData = function (typeArg, data) {
876
- if (data.bcs) {
877
- if (data.bcs.dataType !== "moveObject" || !isItemPurchased(data.bcs.type)) {
878
- throw new Error("object at is not a ItemPurchased object");
879
- }
880
- var gotTypeArgs = (0, util_1.parseTypeName)(data.bcs.type).typeArgs;
881
- if (gotTypeArgs.length !== 1) {
882
- throw new Error("type argument mismatch: expected 1 type argument but got '".concat(gotTypeArgs.length, "'"));
883
- }
884
- var gotTypeArg = (0, util_1.compressSuiType)(gotTypeArgs[0]);
885
- var expectedTypeArg = (0, util_1.compressSuiType)((0, reified_1.extractType)(typeArg));
886
- if (gotTypeArg !== (0, util_1.compressSuiType)((0, reified_1.extractType)(typeArg))) {
887
- throw new Error("type argument mismatch: expected '".concat(expectedTypeArg, "' but got '").concat(gotTypeArg, "'"));
888
- }
889
- return ItemPurchased.fromBcs(typeArg, (0, utils_1.fromB64)(data.bcs.bcsBytes));
890
- }
891
- if (data.content) {
892
- return ItemPurchased.fromSuiParsedData(typeArg, data.content);
893
- }
894
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
895
- };
896
- ItemPurchased.fetch = function (client, typeArg, id) {
897
- return __awaiter(this, void 0, void 0, function () {
898
- var res;
899
- var _a, _b;
900
- return __generator(this, function (_c) {
901
- switch (_c.label) {
902
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
903
- case 1:
904
- res = _c.sent();
905
- if (res.error) {
906
- throw new Error("error fetching ItemPurchased object at id ".concat(id, ": ").concat(res.error.code));
907
- }
908
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isItemPurchased(res.data.bcs.type)) {
909
- throw new Error("object at id ".concat(id, " is not a ItemPurchased object"));
910
- }
911
- return [2 /*return*/, ItemPurchased.fromSuiObjectData(typeArg, res.data)];
912
- }
913
- });
914
- });
915
- };
916
- ItemPurchased.$typeName = "".concat(index_1.PKG_V26, "::kiosk::ItemPurchased");
917
- ItemPurchased.$numTypeParams = 1;
918
- ItemPurchased.$isPhantom = [true];
919
- return ItemPurchased;
920
- }());
921
- exports.ItemPurchased = ItemPurchased;
922
- /* ============================== Kiosk =============================== */
923
- function isKiosk(type) {
924
- type = (0, util_1.compressSuiType)(type);
925
- return type === "".concat(index_1.PKG_V26, "::kiosk::Kiosk");
926
- }
927
- var Kiosk = /** @class */ (function () {
928
- function Kiosk(typeArgs, fields) {
929
- this.__StructClass = true;
930
- this.$typeName = Kiosk.$typeName;
931
- this.$isPhantom = Kiosk.$isPhantom;
932
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Kiosk.$typeName], __read(typeArgs), false));
933
- this.$typeArgs = typeArgs;
934
- this.id = fields.id;
935
- this.profits = fields.profits;
936
- this.owner = fields.owner;
937
- this.itemCount = fields.itemCount;
938
- this.allowExtensions = fields.allowExtensions;
939
- }
940
- Kiosk.reified = function () {
941
- var _this = this;
942
- return {
943
- typeName: Kiosk.$typeName,
944
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Kiosk.$typeName], [], false)),
945
- typeArgs: [],
946
- isPhantom: Kiosk.$isPhantom,
947
- reifiedTypeArgs: [],
948
- fromFields: function (fields) { return Kiosk.fromFields(fields); },
949
- fromFieldsWithTypes: function (item) { return Kiosk.fromFieldsWithTypes(item); },
950
- fromBcs: function (data) { return Kiosk.fromBcs(data); },
951
- bcs: Kiosk.bcs,
952
- fromJSONField: function (field) { return Kiosk.fromJSONField(field); },
953
- fromJSON: function (json) { return Kiosk.fromJSON(json); },
954
- fromSuiParsedData: function (content) { return Kiosk.fromSuiParsedData(content); },
955
- fromSuiObjectData: function (content) { return Kiosk.fromSuiObjectData(content); },
956
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
957
- return [2 /*return*/, Kiosk.fetch(client, id)];
958
- }); }); },
959
- new: function (fields) {
960
- return new Kiosk([], fields);
961
- },
962
- kind: "StructClassReified",
963
- };
964
- };
965
- Object.defineProperty(Kiosk, "r", {
966
- get: function () {
967
- return Kiosk.reified();
968
- },
969
- enumerable: false,
970
- configurable: true
971
- });
972
- Kiosk.phantom = function () {
973
- return (0, reified_1.phantom)(Kiosk.reified());
974
- };
975
- Object.defineProperty(Kiosk, "p", {
976
- get: function () {
977
- return Kiosk.phantom();
978
- },
979
- enumerable: false,
980
- configurable: true
981
- });
982
- Object.defineProperty(Kiosk, "bcs", {
983
- get: function () {
984
- return bcs_1.bcs.struct("Kiosk", {
985
- id: structs_2.UID.bcs,
986
- profits: structs_1.Balance.bcs,
987
- owner: bcs_1.bcs.bytes(32).transform({
988
- input: function (val) { return (0, utils_1.fromHEX)(val); },
989
- output: function (val) { return (0, utils_1.toHEX)(val); },
990
- }),
991
- item_count: bcs_1.bcs.u32(),
992
- allow_extensions: bcs_1.bcs.bool(),
993
- });
994
- },
995
- enumerable: false,
996
- configurable: true
997
- });
998
- Kiosk.fromFields = function (fields) {
999
- return Kiosk.reified().new({
1000
- id: (0, reified_1.decodeFromFields)(structs_2.UID.reified(), fields.id),
1001
- profits: (0, reified_1.decodeFromFields)(structs_1.Balance.reified(reified.phantom(structs_3.SUI.reified())), fields.profits),
1002
- owner: (0, reified_1.decodeFromFields)("address", fields.owner),
1003
- itemCount: (0, reified_1.decodeFromFields)("u32", fields.item_count),
1004
- allowExtensions: (0, reified_1.decodeFromFields)("bool", fields.allow_extensions),
1005
- });
1006
- };
1007
- Kiosk.fromFieldsWithTypes = function (item) {
1008
- if (!isKiosk(item.type)) {
1009
- throw new Error("not a Kiosk type");
1010
- }
1011
- return Kiosk.reified().new({
1012
- id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.UID.reified(), item.fields.id),
1013
- profits: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.Balance.reified(reified.phantom(structs_3.SUI.reified())), item.fields.profits),
1014
- owner: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.owner),
1015
- itemCount: (0, reified_1.decodeFromFieldsWithTypes)("u32", item.fields.item_count),
1016
- allowExtensions: (0, reified_1.decodeFromFieldsWithTypes)("bool", item.fields.allow_extensions),
1017
- });
1018
- };
1019
- Kiosk.fromBcs = function (data) {
1020
- return Kiosk.fromFields(Kiosk.bcs.parse(data));
1021
- };
1022
- Kiosk.prototype.toJSONField = function () {
1023
- return {
1024
- id: this.id,
1025
- profits: this.profits.toJSONField(),
1026
- owner: this.owner,
1027
- itemCount: this.itemCount,
1028
- allowExtensions: this.allowExtensions,
1029
- };
1030
- };
1031
- Kiosk.prototype.toJSON = function () {
1032
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
1033
- };
1034
- Kiosk.fromJSONField = function (field) {
1035
- return Kiosk.reified().new({
1036
- id: (0, reified_1.decodeFromJSONField)(structs_2.UID.reified(), field.id),
1037
- profits: (0, reified_1.decodeFromJSONField)(structs_1.Balance.reified(reified.phantom(structs_3.SUI.reified())), field.profits),
1038
- owner: (0, reified_1.decodeFromJSONField)("address", field.owner),
1039
- itemCount: (0, reified_1.decodeFromJSONField)("u32", field.itemCount),
1040
- allowExtensions: (0, reified_1.decodeFromJSONField)("bool", field.allowExtensions),
1041
- });
1042
- };
1043
- Kiosk.fromJSON = function (json) {
1044
- if (json.$typeName !== Kiosk.$typeName) {
1045
- throw new Error("not a WithTwoGenerics json object");
1046
- }
1047
- return Kiosk.fromJSONField(json);
1048
- };
1049
- Kiosk.fromSuiParsedData = function (content) {
1050
- if (content.dataType !== "moveObject") {
1051
- throw new Error("not an object");
1052
- }
1053
- if (!isKiosk(content.type)) {
1054
- throw new Error("object at ".concat(content.fields.id, " is not a Kiosk object"));
1055
- }
1056
- return Kiosk.fromFieldsWithTypes(content);
1057
- };
1058
- Kiosk.fromSuiObjectData = function (data) {
1059
- if (data.bcs) {
1060
- if (data.bcs.dataType !== "moveObject" || !isKiosk(data.bcs.type)) {
1061
- throw new Error("object at is not a Kiosk object");
1062
- }
1063
- return Kiosk.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
1064
- }
1065
- if (data.content) {
1066
- return Kiosk.fromSuiParsedData(data.content);
1067
- }
1068
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
1069
- };
1070
- Kiosk.fetch = function (client, id) {
1071
- return __awaiter(this, void 0, void 0, function () {
1072
- var res;
1073
- var _a, _b;
1074
- return __generator(this, function (_c) {
1075
- switch (_c.label) {
1076
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
1077
- case 1:
1078
- res = _c.sent();
1079
- if (res.error) {
1080
- throw new Error("error fetching Kiosk object at id ".concat(id, ": ").concat(res.error.code));
1081
- }
1082
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isKiosk(res.data.bcs.type)) {
1083
- throw new Error("object at id ".concat(id, " is not a Kiosk object"));
1084
- }
1085
- return [2 /*return*/, Kiosk.fromSuiObjectData(res.data)];
1086
- }
1087
- });
1088
- });
1089
- };
1090
- Kiosk.$typeName = "".concat(index_1.PKG_V26, "::kiosk::Kiosk");
1091
- Kiosk.$numTypeParams = 0;
1092
- Kiosk.$isPhantom = [];
1093
- return Kiosk;
1094
- }());
1095
- exports.Kiosk = Kiosk;
1096
- /* ============================== KioskOwnerCap =============================== */
1097
- function isKioskOwnerCap(type) {
1098
- type = (0, util_1.compressSuiType)(type);
1099
- return type === "".concat(index_1.PKG_V26, "::kiosk::KioskOwnerCap");
1100
- }
1101
- var KioskOwnerCap = /** @class */ (function () {
1102
- function KioskOwnerCap(typeArgs, fields) {
1103
- this.__StructClass = true;
1104
- this.$typeName = KioskOwnerCap.$typeName;
1105
- this.$isPhantom = KioskOwnerCap.$isPhantom;
1106
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([KioskOwnerCap.$typeName], __read(typeArgs), false));
1107
- this.$typeArgs = typeArgs;
1108
- this.id = fields.id;
1109
- this.for = fields.for;
1110
- }
1111
- KioskOwnerCap.reified = function () {
1112
- var _this = this;
1113
- return {
1114
- typeName: KioskOwnerCap.$typeName,
1115
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([KioskOwnerCap.$typeName], [], false)),
1116
- typeArgs: [],
1117
- isPhantom: KioskOwnerCap.$isPhantom,
1118
- reifiedTypeArgs: [],
1119
- fromFields: function (fields) { return KioskOwnerCap.fromFields(fields); },
1120
- fromFieldsWithTypes: function (item) { return KioskOwnerCap.fromFieldsWithTypes(item); },
1121
- fromBcs: function (data) { return KioskOwnerCap.fromBcs(data); },
1122
- bcs: KioskOwnerCap.bcs,
1123
- fromJSONField: function (field) { return KioskOwnerCap.fromJSONField(field); },
1124
- fromJSON: function (json) { return KioskOwnerCap.fromJSON(json); },
1125
- fromSuiParsedData: function (content) { return KioskOwnerCap.fromSuiParsedData(content); },
1126
- fromSuiObjectData: function (content) { return KioskOwnerCap.fromSuiObjectData(content); },
1127
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
1128
- return [2 /*return*/, KioskOwnerCap.fetch(client, id)];
1129
- }); }); },
1130
- new: function (fields) {
1131
- return new KioskOwnerCap([], fields);
1132
- },
1133
- kind: "StructClassReified",
1134
- };
1135
- };
1136
- Object.defineProperty(KioskOwnerCap, "r", {
1137
- get: function () {
1138
- return KioskOwnerCap.reified();
1139
- },
1140
- enumerable: false,
1141
- configurable: true
1142
- });
1143
- KioskOwnerCap.phantom = function () {
1144
- return (0, reified_1.phantom)(KioskOwnerCap.reified());
1145
- };
1146
- Object.defineProperty(KioskOwnerCap, "p", {
1147
- get: function () {
1148
- return KioskOwnerCap.phantom();
1149
- },
1150
- enumerable: false,
1151
- configurable: true
1152
- });
1153
- Object.defineProperty(KioskOwnerCap, "bcs", {
1154
- get: function () {
1155
- return bcs_1.bcs.struct("KioskOwnerCap", {
1156
- id: structs_2.UID.bcs,
1157
- for: structs_2.ID.bcs,
1158
- });
1159
- },
1160
- enumerable: false,
1161
- configurable: true
1162
- });
1163
- KioskOwnerCap.fromFields = function (fields) {
1164
- return KioskOwnerCap.reified().new({
1165
- id: (0, reified_1.decodeFromFields)(structs_2.UID.reified(), fields.id),
1166
- for: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.for),
1167
- });
1168
- };
1169
- KioskOwnerCap.fromFieldsWithTypes = function (item) {
1170
- if (!isKioskOwnerCap(item.type)) {
1171
- throw new Error("not a KioskOwnerCap type");
1172
- }
1173
- return KioskOwnerCap.reified().new({
1174
- id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.UID.reified(), item.fields.id),
1175
- for: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.for),
1176
- });
1177
- };
1178
- KioskOwnerCap.fromBcs = function (data) {
1179
- return KioskOwnerCap.fromFields(KioskOwnerCap.bcs.parse(data));
1180
- };
1181
- KioskOwnerCap.prototype.toJSONField = function () {
1182
- return {
1183
- id: this.id,
1184
- for: this.for,
1185
- };
1186
- };
1187
- KioskOwnerCap.prototype.toJSON = function () {
1188
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
1189
- };
1190
- KioskOwnerCap.fromJSONField = function (field) {
1191
- return KioskOwnerCap.reified().new({
1192
- id: (0, reified_1.decodeFromJSONField)(structs_2.UID.reified(), field.id),
1193
- for: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.for),
1194
- });
1195
- };
1196
- KioskOwnerCap.fromJSON = function (json) {
1197
- if (json.$typeName !== KioskOwnerCap.$typeName) {
1198
- throw new Error("not a WithTwoGenerics json object");
1199
- }
1200
- return KioskOwnerCap.fromJSONField(json);
1201
- };
1202
- KioskOwnerCap.fromSuiParsedData = function (content) {
1203
- if (content.dataType !== "moveObject") {
1204
- throw new Error("not an object");
1205
- }
1206
- if (!isKioskOwnerCap(content.type)) {
1207
- throw new Error("object at ".concat(content.fields.id, " is not a KioskOwnerCap object"));
1208
- }
1209
- return KioskOwnerCap.fromFieldsWithTypes(content);
1210
- };
1211
- KioskOwnerCap.fromSuiObjectData = function (data) {
1212
- if (data.bcs) {
1213
- if (data.bcs.dataType !== "moveObject" || !isKioskOwnerCap(data.bcs.type)) {
1214
- throw new Error("object at is not a KioskOwnerCap object");
1215
- }
1216
- return KioskOwnerCap.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
1217
- }
1218
- if (data.content) {
1219
- return KioskOwnerCap.fromSuiParsedData(data.content);
1220
- }
1221
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
1222
- };
1223
- KioskOwnerCap.fetch = function (client, id) {
1224
- return __awaiter(this, void 0, void 0, function () {
1225
- var res;
1226
- var _a, _b;
1227
- return __generator(this, function (_c) {
1228
- switch (_c.label) {
1229
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
1230
- case 1:
1231
- res = _c.sent();
1232
- if (res.error) {
1233
- throw new Error("error fetching KioskOwnerCap object at id ".concat(id, ": ").concat(res.error.code));
1234
- }
1235
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isKioskOwnerCap(res.data.bcs.type)) {
1236
- throw new Error("object at id ".concat(id, " is not a KioskOwnerCap object"));
1237
- }
1238
- return [2 /*return*/, KioskOwnerCap.fromSuiObjectData(res.data)];
1239
- }
1240
- });
1241
- });
1242
- };
1243
- KioskOwnerCap.$typeName = "".concat(index_1.PKG_V26, "::kiosk::KioskOwnerCap");
1244
- KioskOwnerCap.$numTypeParams = 0;
1245
- KioskOwnerCap.$isPhantom = [];
1246
- return KioskOwnerCap;
1247
- }());
1248
- exports.KioskOwnerCap = KioskOwnerCap;
1249
- /* ============================== Listing =============================== */
1250
- function isListing(type) {
1251
- type = (0, util_1.compressSuiType)(type);
1252
- return type === "".concat(index_1.PKG_V26, "::kiosk::Listing");
1253
- }
1254
- var Listing = /** @class */ (function () {
1255
- function Listing(typeArgs, fields) {
1256
- this.__StructClass = true;
1257
- this.$typeName = Listing.$typeName;
1258
- this.$isPhantom = Listing.$isPhantom;
1259
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Listing.$typeName], __read(typeArgs), false));
1260
- this.$typeArgs = typeArgs;
1261
- this.id = fields.id;
1262
- this.isExclusive = fields.isExclusive;
1263
- }
1264
- Listing.reified = function () {
1265
- var _this = this;
1266
- return {
1267
- typeName: Listing.$typeName,
1268
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Listing.$typeName], [], false)),
1269
- typeArgs: [],
1270
- isPhantom: Listing.$isPhantom,
1271
- reifiedTypeArgs: [],
1272
- fromFields: function (fields) { return Listing.fromFields(fields); },
1273
- fromFieldsWithTypes: function (item) { return Listing.fromFieldsWithTypes(item); },
1274
- fromBcs: function (data) { return Listing.fromBcs(data); },
1275
- bcs: Listing.bcs,
1276
- fromJSONField: function (field) { return Listing.fromJSONField(field); },
1277
- fromJSON: function (json) { return Listing.fromJSON(json); },
1278
- fromSuiParsedData: function (content) { return Listing.fromSuiParsedData(content); },
1279
- fromSuiObjectData: function (content) { return Listing.fromSuiObjectData(content); },
1280
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
1281
- return [2 /*return*/, Listing.fetch(client, id)];
1282
- }); }); },
1283
- new: function (fields) {
1284
- return new Listing([], fields);
1285
- },
1286
- kind: "StructClassReified",
1287
- };
1288
- };
1289
- Object.defineProperty(Listing, "r", {
1290
- get: function () {
1291
- return Listing.reified();
1292
- },
1293
- enumerable: false,
1294
- configurable: true
1295
- });
1296
- Listing.phantom = function () {
1297
- return (0, reified_1.phantom)(Listing.reified());
1298
- };
1299
- Object.defineProperty(Listing, "p", {
1300
- get: function () {
1301
- return Listing.phantom();
1302
- },
1303
- enumerable: false,
1304
- configurable: true
1305
- });
1306
- Object.defineProperty(Listing, "bcs", {
1307
- get: function () {
1308
- return bcs_1.bcs.struct("Listing", {
1309
- id: structs_2.ID.bcs,
1310
- is_exclusive: bcs_1.bcs.bool(),
1311
- });
1312
- },
1313
- enumerable: false,
1314
- configurable: true
1315
- });
1316
- Listing.fromFields = function (fields) {
1317
- return Listing.reified().new({
1318
- id: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.id),
1319
- isExclusive: (0, reified_1.decodeFromFields)("bool", fields.is_exclusive),
1320
- });
1321
- };
1322
- Listing.fromFieldsWithTypes = function (item) {
1323
- if (!isListing(item.type)) {
1324
- throw new Error("not a Listing type");
1325
- }
1326
- return Listing.reified().new({
1327
- id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.id),
1328
- isExclusive: (0, reified_1.decodeFromFieldsWithTypes)("bool", item.fields.is_exclusive),
1329
- });
1330
- };
1331
- Listing.fromBcs = function (data) {
1332
- return Listing.fromFields(Listing.bcs.parse(data));
1333
- };
1334
- Listing.prototype.toJSONField = function () {
1335
- return {
1336
- id: this.id,
1337
- isExclusive: this.isExclusive,
1338
- };
1339
- };
1340
- Listing.prototype.toJSON = function () {
1341
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
1342
- };
1343
- Listing.fromJSONField = function (field) {
1344
- return Listing.reified().new({
1345
- id: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.id),
1346
- isExclusive: (0, reified_1.decodeFromJSONField)("bool", field.isExclusive),
1347
- });
1348
- };
1349
- Listing.fromJSON = function (json) {
1350
- if (json.$typeName !== Listing.$typeName) {
1351
- throw new Error("not a WithTwoGenerics json object");
1352
- }
1353
- return Listing.fromJSONField(json);
1354
- };
1355
- Listing.fromSuiParsedData = function (content) {
1356
- if (content.dataType !== "moveObject") {
1357
- throw new Error("not an object");
1358
- }
1359
- if (!isListing(content.type)) {
1360
- throw new Error("object at ".concat(content.fields.id, " is not a Listing object"));
1361
- }
1362
- return Listing.fromFieldsWithTypes(content);
1363
- };
1364
- Listing.fromSuiObjectData = function (data) {
1365
- if (data.bcs) {
1366
- if (data.bcs.dataType !== "moveObject" || !isListing(data.bcs.type)) {
1367
- throw new Error("object at is not a Listing object");
1368
- }
1369
- return Listing.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
1370
- }
1371
- if (data.content) {
1372
- return Listing.fromSuiParsedData(data.content);
1373
- }
1374
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
1375
- };
1376
- Listing.fetch = function (client, id) {
1377
- return __awaiter(this, void 0, void 0, function () {
1378
- var res;
1379
- var _a, _b;
1380
- return __generator(this, function (_c) {
1381
- switch (_c.label) {
1382
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
1383
- case 1:
1384
- res = _c.sent();
1385
- if (res.error) {
1386
- throw new Error("error fetching Listing object at id ".concat(id, ": ").concat(res.error.code));
1387
- }
1388
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isListing(res.data.bcs.type)) {
1389
- throw new Error("object at id ".concat(id, " is not a Listing object"));
1390
- }
1391
- return [2 /*return*/, Listing.fromSuiObjectData(res.data)];
1392
- }
1393
- });
1394
- });
1395
- };
1396
- Listing.$typeName = "".concat(index_1.PKG_V26, "::kiosk::Listing");
1397
- Listing.$numTypeParams = 0;
1398
- Listing.$isPhantom = [];
1399
- return Listing;
1400
- }());
1401
- exports.Listing = Listing;
1402
- /* ============================== Lock =============================== */
1403
- function isLock(type) {
1404
- type = (0, util_1.compressSuiType)(type);
1405
- return type === "".concat(index_1.PKG_V26, "::kiosk::Lock");
1406
- }
1407
- var Lock = /** @class */ (function () {
1408
- function Lock(typeArgs, fields) {
1409
- this.__StructClass = true;
1410
- this.$typeName = Lock.$typeName;
1411
- this.$isPhantom = Lock.$isPhantom;
1412
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Lock.$typeName], __read(typeArgs), false));
1413
- this.$typeArgs = typeArgs;
1414
- this.id = fields.id;
1415
- }
1416
- Lock.reified = function () {
1417
- var _this = this;
1418
- return {
1419
- typeName: Lock.$typeName,
1420
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Lock.$typeName], [], false)),
1421
- typeArgs: [],
1422
- isPhantom: Lock.$isPhantom,
1423
- reifiedTypeArgs: [],
1424
- fromFields: function (fields) { return Lock.fromFields(fields); },
1425
- fromFieldsWithTypes: function (item) { return Lock.fromFieldsWithTypes(item); },
1426
- fromBcs: function (data) { return Lock.fromBcs(data); },
1427
- bcs: Lock.bcs,
1428
- fromJSONField: function (field) { return Lock.fromJSONField(field); },
1429
- fromJSON: function (json) { return Lock.fromJSON(json); },
1430
- fromSuiParsedData: function (content) { return Lock.fromSuiParsedData(content); },
1431
- fromSuiObjectData: function (content) { return Lock.fromSuiObjectData(content); },
1432
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
1433
- return [2 /*return*/, Lock.fetch(client, id)];
1434
- }); }); },
1435
- new: function (fields) {
1436
- return new Lock([], fields);
1437
- },
1438
- kind: "StructClassReified",
1439
- };
1440
- };
1441
- Object.defineProperty(Lock, "r", {
1442
- get: function () {
1443
- return Lock.reified();
1444
- },
1445
- enumerable: false,
1446
- configurable: true
1447
- });
1448
- Lock.phantom = function () {
1449
- return (0, reified_1.phantom)(Lock.reified());
1450
- };
1451
- Object.defineProperty(Lock, "p", {
1452
- get: function () {
1453
- return Lock.phantom();
1454
- },
1455
- enumerable: false,
1456
- configurable: true
1457
- });
1458
- Object.defineProperty(Lock, "bcs", {
1459
- get: function () {
1460
- return bcs_1.bcs.struct("Lock", {
1461
- id: structs_2.ID.bcs,
1462
- });
1463
- },
1464
- enumerable: false,
1465
- configurable: true
1466
- });
1467
- Lock.fromFields = function (fields) {
1468
- return Lock.reified().new({
1469
- id: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.id),
1470
- });
1471
- };
1472
- Lock.fromFieldsWithTypes = function (item) {
1473
- if (!isLock(item.type)) {
1474
- throw new Error("not a Lock type");
1475
- }
1476
- return Lock.reified().new({
1477
- id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.id),
1478
- });
1479
- };
1480
- Lock.fromBcs = function (data) {
1481
- return Lock.fromFields(Lock.bcs.parse(data));
1482
- };
1483
- Lock.prototype.toJSONField = function () {
1484
- return {
1485
- id: this.id,
1486
- };
1487
- };
1488
- Lock.prototype.toJSON = function () {
1489
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
1490
- };
1491
- Lock.fromJSONField = function (field) {
1492
- return Lock.reified().new({
1493
- id: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.id),
1494
- });
1495
- };
1496
- Lock.fromJSON = function (json) {
1497
- if (json.$typeName !== Lock.$typeName) {
1498
- throw new Error("not a WithTwoGenerics json object");
1499
- }
1500
- return Lock.fromJSONField(json);
1501
- };
1502
- Lock.fromSuiParsedData = function (content) {
1503
- if (content.dataType !== "moveObject") {
1504
- throw new Error("not an object");
1505
- }
1506
- if (!isLock(content.type)) {
1507
- throw new Error("object at ".concat(content.fields.id, " is not a Lock object"));
1508
- }
1509
- return Lock.fromFieldsWithTypes(content);
1510
- };
1511
- Lock.fromSuiObjectData = function (data) {
1512
- if (data.bcs) {
1513
- if (data.bcs.dataType !== "moveObject" || !isLock(data.bcs.type)) {
1514
- throw new Error("object at is not a Lock object");
1515
- }
1516
- return Lock.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
1517
- }
1518
- if (data.content) {
1519
- return Lock.fromSuiParsedData(data.content);
1520
- }
1521
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
1522
- };
1523
- Lock.fetch = function (client, id) {
1524
- return __awaiter(this, void 0, void 0, function () {
1525
- var res;
1526
- var _a, _b;
1527
- return __generator(this, function (_c) {
1528
- switch (_c.label) {
1529
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
1530
- case 1:
1531
- res = _c.sent();
1532
- if (res.error) {
1533
- throw new Error("error fetching Lock object at id ".concat(id, ": ").concat(res.error.code));
1534
- }
1535
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isLock(res.data.bcs.type)) {
1536
- throw new Error("object at id ".concat(id, " is not a Lock object"));
1537
- }
1538
- return [2 /*return*/, Lock.fromSuiObjectData(res.data)];
1539
- }
1540
- });
1541
- });
1542
- };
1543
- Lock.$typeName = "".concat(index_1.PKG_V26, "::kiosk::Lock");
1544
- Lock.$numTypeParams = 0;
1545
- Lock.$isPhantom = [];
1546
- return Lock;
1547
- }());
1548
- exports.Lock = Lock;
1549
- /* ============================== PurchaseCap =============================== */
1550
- function isPurchaseCap(type) {
1551
- type = (0, util_1.compressSuiType)(type);
1552
- return type.startsWith("".concat(index_1.PKG_V26, "::kiosk::PurchaseCap") + "<");
1553
- }
1554
- var PurchaseCap = /** @class */ (function () {
1555
- function PurchaseCap(typeArgs, fields) {
1556
- this.__StructClass = true;
1557
- this.$typeName = PurchaseCap.$typeName;
1558
- this.$isPhantom = PurchaseCap.$isPhantom;
1559
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([PurchaseCap.$typeName], __read(typeArgs), false));
1560
- this.$typeArgs = typeArgs;
1561
- this.id = fields.id;
1562
- this.kioskId = fields.kioskId;
1563
- this.itemId = fields.itemId;
1564
- this.minPrice = fields.minPrice;
1565
- }
1566
- PurchaseCap.reified = function (T) {
1567
- var _this = this;
1568
- return {
1569
- typeName: PurchaseCap.$typeName,
1570
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([PurchaseCap.$typeName], [(0, reified_1.extractType)(T)], false)),
1571
- typeArgs: [(0, reified_1.extractType)(T)],
1572
- isPhantom: PurchaseCap.$isPhantom,
1573
- reifiedTypeArgs: [T],
1574
- fromFields: function (fields) { return PurchaseCap.fromFields(T, fields); },
1575
- fromFieldsWithTypes: function (item) { return PurchaseCap.fromFieldsWithTypes(T, item); },
1576
- fromBcs: function (data) { return PurchaseCap.fromBcs(T, data); },
1577
- bcs: PurchaseCap.bcs,
1578
- fromJSONField: function (field) { return PurchaseCap.fromJSONField(T, field); },
1579
- fromJSON: function (json) { return PurchaseCap.fromJSON(T, json); },
1580
- fromSuiParsedData: function (content) { return PurchaseCap.fromSuiParsedData(T, content); },
1581
- fromSuiObjectData: function (content) { return PurchaseCap.fromSuiObjectData(T, content); },
1582
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
1583
- return [2 /*return*/, PurchaseCap.fetch(client, T, id)];
1584
- }); }); },
1585
- new: function (fields) {
1586
- return new PurchaseCap([(0, reified_1.extractType)(T)], fields);
1587
- },
1588
- kind: "StructClassReified",
1589
- };
1590
- };
1591
- Object.defineProperty(PurchaseCap, "r", {
1592
- get: function () {
1593
- return PurchaseCap.reified;
1594
- },
1595
- enumerable: false,
1596
- configurable: true
1597
- });
1598
- PurchaseCap.phantom = function (T) {
1599
- return (0, reified_1.phantom)(PurchaseCap.reified(T));
1600
- };
1601
- Object.defineProperty(PurchaseCap, "p", {
1602
- get: function () {
1603
- return PurchaseCap.phantom;
1604
- },
1605
- enumerable: false,
1606
- configurable: true
1607
- });
1608
- Object.defineProperty(PurchaseCap, "bcs", {
1609
- get: function () {
1610
- return bcs_1.bcs.struct("PurchaseCap", {
1611
- id: structs_2.UID.bcs,
1612
- kiosk_id: structs_2.ID.bcs,
1613
- item_id: structs_2.ID.bcs,
1614
- min_price: bcs_1.bcs.u64(),
1615
- });
1616
- },
1617
- enumerable: false,
1618
- configurable: true
1619
- });
1620
- PurchaseCap.fromFields = function (typeArg, fields) {
1621
- return PurchaseCap.reified(typeArg).new({
1622
- id: (0, reified_1.decodeFromFields)(structs_2.UID.reified(), fields.id),
1623
- kioskId: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.kiosk_id),
1624
- itemId: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.item_id),
1625
- minPrice: (0, reified_1.decodeFromFields)("u64", fields.min_price),
1626
- });
1627
- };
1628
- PurchaseCap.fromFieldsWithTypes = function (typeArg, item) {
1629
- if (!isPurchaseCap(item.type)) {
1630
- throw new Error("not a PurchaseCap type");
1631
- }
1632
- (0, reified_1.assertFieldsWithTypesArgsMatch)(item, [typeArg]);
1633
- return PurchaseCap.reified(typeArg).new({
1634
- id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.UID.reified(), item.fields.id),
1635
- kioskId: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.kiosk_id),
1636
- itemId: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.item_id),
1637
- minPrice: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.min_price),
1638
- });
1639
- };
1640
- PurchaseCap.fromBcs = function (typeArg, data) {
1641
- return PurchaseCap.fromFields(typeArg, PurchaseCap.bcs.parse(data));
1642
- };
1643
- PurchaseCap.prototype.toJSONField = function () {
1644
- return {
1645
- id: this.id,
1646
- kioskId: this.kioskId,
1647
- itemId: this.itemId,
1648
- minPrice: this.minPrice.toString(),
1649
- };
1650
- };
1651
- PurchaseCap.prototype.toJSON = function () {
1652
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
1653
- };
1654
- PurchaseCap.fromJSONField = function (typeArg, field) {
1655
- return PurchaseCap.reified(typeArg).new({
1656
- id: (0, reified_1.decodeFromJSONField)(structs_2.UID.reified(), field.id),
1657
- kioskId: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.kioskId),
1658
- itemId: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.itemId),
1659
- minPrice: (0, reified_1.decodeFromJSONField)("u64", field.minPrice),
1660
- });
1661
- };
1662
- PurchaseCap.fromJSON = function (typeArg, json) {
1663
- if (json.$typeName !== PurchaseCap.$typeName) {
1664
- throw new Error("not a WithTwoGenerics json object");
1665
- }
1666
- (0, reified_1.assertReifiedTypeArgsMatch)((0, util_1.composeSuiType)(PurchaseCap.$typeName, (0, reified_1.extractType)(typeArg)), json.$typeArgs, [typeArg]);
1667
- return PurchaseCap.fromJSONField(typeArg, json);
1668
- };
1669
- PurchaseCap.fromSuiParsedData = function (typeArg, content) {
1670
- if (content.dataType !== "moveObject") {
1671
- throw new Error("not an object");
1672
- }
1673
- if (!isPurchaseCap(content.type)) {
1674
- throw new Error("object at ".concat(content.fields.id, " is not a PurchaseCap object"));
1675
- }
1676
- return PurchaseCap.fromFieldsWithTypes(typeArg, content);
1677
- };
1678
- PurchaseCap.fromSuiObjectData = function (typeArg, data) {
1679
- if (data.bcs) {
1680
- if (data.bcs.dataType !== "moveObject" || !isPurchaseCap(data.bcs.type)) {
1681
- throw new Error("object at is not a PurchaseCap object");
1682
- }
1683
- var gotTypeArgs = (0, util_1.parseTypeName)(data.bcs.type).typeArgs;
1684
- if (gotTypeArgs.length !== 1) {
1685
- throw new Error("type argument mismatch: expected 1 type argument but got '".concat(gotTypeArgs.length, "'"));
1686
- }
1687
- var gotTypeArg = (0, util_1.compressSuiType)(gotTypeArgs[0]);
1688
- var expectedTypeArg = (0, util_1.compressSuiType)((0, reified_1.extractType)(typeArg));
1689
- if (gotTypeArg !== (0, util_1.compressSuiType)((0, reified_1.extractType)(typeArg))) {
1690
- throw new Error("type argument mismatch: expected '".concat(expectedTypeArg, "' but got '").concat(gotTypeArg, "'"));
1691
- }
1692
- return PurchaseCap.fromBcs(typeArg, (0, utils_1.fromB64)(data.bcs.bcsBytes));
1693
- }
1694
- if (data.content) {
1695
- return PurchaseCap.fromSuiParsedData(typeArg, data.content);
1696
- }
1697
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
1698
- };
1699
- PurchaseCap.fetch = function (client, typeArg, id) {
1700
- return __awaiter(this, void 0, void 0, function () {
1701
- var res;
1702
- var _a, _b;
1703
- return __generator(this, function (_c) {
1704
- switch (_c.label) {
1705
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
1706
- case 1:
1707
- res = _c.sent();
1708
- if (res.error) {
1709
- throw new Error("error fetching PurchaseCap object at id ".concat(id, ": ").concat(res.error.code));
1710
- }
1711
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isPurchaseCap(res.data.bcs.type)) {
1712
- throw new Error("object at id ".concat(id, " is not a PurchaseCap object"));
1713
- }
1714
- return [2 /*return*/, PurchaseCap.fromSuiObjectData(typeArg, res.data)];
1715
- }
1716
- });
1717
- });
1718
- };
1719
- PurchaseCap.$typeName = "".concat(index_1.PKG_V26, "::kiosk::PurchaseCap");
1720
- PurchaseCap.$numTypeParams = 1;
1721
- PurchaseCap.$isPhantom = [true];
1722
- return PurchaseCap;
1723
- }());
1724
- exports.PurchaseCap = PurchaseCap;