@typus/typus-perp-sdk 1.0.0

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