@typus/typus-perp-sdk 1.1.32-codegen-exp3 → 1.1.32-testnet-exp1

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 (249) hide show
  1. package/dist/src/_dependencies/source/0x1/ascii/structs.d.ts +88 -0
  2. package/dist/src/_dependencies/source/0x1/ascii/structs.js +398 -0
  3. package/dist/src/_dependencies/source/0x1/index.d.ts +3 -0
  4. package/dist/src/_dependencies/source/0x1/index.js +6 -0
  5. package/dist/src/_dependencies/source/0x1/option/structs.d.ts +50 -0
  6. package/dist/src/_dependencies/source/0x1/option/structs.js +271 -0
  7. package/dist/src/_dependencies/source/0x1/string/structs.d.ts +48 -0
  8. package/dist/src/_dependencies/source/0x1/string/structs.js +256 -0
  9. package/dist/src/_dependencies/source/0x1/type-name/structs.d.ts +49 -0
  10. package/dist/src/_dependencies/source/0x1/type-name/structs.js +223 -0
  11. package/dist/src/_dependencies/source/0x2/bag/structs.d.ts +54 -0
  12. package/dist/src/_dependencies/source/0x2/bag/structs.js +229 -0
  13. package/dist/src/_dependencies/source/0x2/balance/structs.d.ts +84 -0
  14. package/dist/src/_dependencies/source/0x2/balance/structs.js +386 -0
  15. package/dist/src/_dependencies/source/0x2/coin/structs.d.ts +406 -0
  16. package/dist/src/_dependencies/source/0x2/coin/structs.js +1247 -0
  17. package/dist/src/_dependencies/source/0x2/index.d.ts +3 -0
  18. package/dist/src/_dependencies/source/0x2/index.js +6 -0
  19. package/dist/src/_dependencies/source/0x2/linked-table/structs.d.ts +132 -0
  20. package/dist/src/_dependencies/source/0x2/linked-table/structs.js +438 -0
  21. package/dist/src/_dependencies/source/0x2/object/structs.d.ts +86 -0
  22. package/dist/src/_dependencies/source/0x2/object/structs.js +364 -0
  23. package/dist/src/_dependencies/source/0x2/object-table/structs.d.ts +54 -0
  24. package/dist/src/_dependencies/source/0x2/object-table/structs.js +248 -0
  25. package/dist/src/_dependencies/source/0x2/sui/structs.d.ts +44 -0
  26. package/dist/src/_dependencies/source/0x2/sui/structs.js +222 -0
  27. package/dist/src/_dependencies/source/0x2/table/structs.d.ts +54 -0
  28. package/dist/src/_dependencies/source/0x2/table/structs.js +248 -0
  29. package/dist/src/_dependencies/source/0x2/table-vec/structs.d.ts +59 -0
  30. package/dist/src/_dependencies/source/0x2/table-vec/structs.js +274 -0
  31. package/dist/src/_dependencies/source/0x2/token/structs.d.ts +421 -0
  32. package/dist/src/_dependencies/source/0x2/token/structs.js +1095 -0
  33. package/dist/src/_dependencies/source/0x2/transfer-policy/structs.d.ts +348 -0
  34. package/dist/src/_dependencies/source/0x2/transfer-policy/structs.js +1091 -0
  35. package/dist/src/_dependencies/source/0x2/url/structs.d.ts +49 -0
  36. package/dist/src/_dependencies/source/0x2/url/structs.js +223 -0
  37. package/dist/src/_dependencies/source/0x2/vec-map/structs.d.ts +106 -0
  38. package/dist/src/_dependencies/source/0x2/vec-map/structs.js +446 -0
  39. package/dist/src/_dependencies/source/0x2/vec-set/structs.d.ts +49 -0
  40. package/dist/src/_dependencies/source/0x2/vec-set/structs.js +270 -0
  41. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/airdrop/structs.d.ts +422 -0
  42. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/airdrop/structs.js +1084 -0
  43. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/big-vector/structs.d.ts +130 -0
  44. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/big-vector/structs.js +456 -0
  45. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/critbit/structs.d.ts +208 -0
  46. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/critbit/structs.js +653 -0
  47. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/ecosystem/structs.d.ts +362 -0
  48. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/ecosystem/structs.js +899 -0
  49. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/index.d.ts +8 -0
  50. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/index.js +11 -0
  51. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/init.d.ts +2 -0
  52. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/init.js +102 -0
  53. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/keyed-big-vector/structs.d.ts +202 -0
  54. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/keyed-big-vector/structs.js +632 -0
  55. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/leaderboard/structs.d.ts +600 -0
  56. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/leaderboard/structs.js +1459 -0
  57. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/linked-object-table/structs.d.ts +136 -0
  58. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/linked-object-table/structs.js +438 -0
  59. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/linked-set/structs.d.ts +127 -0
  60. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/linked-set/structs.js +430 -0
  61. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tails-staking/structs.d.ts +957 -0
  62. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tails-staking/structs.js +2261 -0
  63. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tgld/structs.d.ts +244 -0
  64. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tgld/structs.js +733 -0
  65. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/user/structs.d.ts +294 -0
  66. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/user/structs.js +892 -0
  67. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/authority/structs.d.ts +73 -0
  68. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/authority/structs.js +263 -0
  69. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/balance-pool/structs.d.ts +294 -0
  70. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/balance-pool/structs.js +591 -0
  71. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/big-vector/structs.d.ts +64 -0
  72. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/big-vector/structs.js +258 -0
  73. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/dutch/structs.d.ts +756 -0
  74. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/dutch/structs.js +1721 -0
  75. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/i64/structs.d.ts +44 -0
  76. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/i64/structs.js +222 -0
  77. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/index.d.ts +3 -0
  78. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/index.js +6 -0
  79. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/init.d.ts +2 -0
  80. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/init.js +89 -0
  81. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/linked-list/structs.d.ts +135 -0
  82. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/linked-list/structs.js +444 -0
  83. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/vault/structs.d.ts +2106 -0
  84. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/vault/structs.js +4952 -0
  85. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/discount-mint/structs.d.ts +390 -0
  86. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/discount-mint/structs.js +844 -0
  87. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/index.d.ts +6 -0
  88. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/index.js +9 -0
  89. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/init.d.ts +2 -0
  90. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/init.js +69 -0
  91. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/royalty-rule/structs.d.ts +89 -0
  92. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/royalty-rule/structs.js +376 -0
  93. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/staking/structs.d.ts +386 -0
  94. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/staking/structs.js +881 -0
  95. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/table-vec/structs.d.ts +59 -0
  96. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/table-vec/structs.js +274 -0
  97. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/typus-nft/structs.d.ts +974 -0
  98. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/typus-nft/structs.js +2387 -0
  99. package/dist/src/_framework/init-loader.d.ts +2 -0
  100. package/dist/src/{generated/typus_perp/treasury_caps.js → _framework/init-loader.js} +10 -17
  101. package/dist/src/_framework/loader.d.ts +17 -0
  102. package/dist/src/_framework/loader.js +108 -0
  103. package/dist/src/_framework/reified.d.ts +108 -0
  104. package/dist/src/_framework/reified.js +237 -0
  105. package/dist/src/_framework/util.d.ts +35 -0
  106. package/dist/src/_framework/util.js +396 -0
  107. package/dist/src/_framework/vector.d.ts +42 -0
  108. package/dist/src/_framework/vector.js +112 -0
  109. package/dist/src/api/sentio.js +538 -604
  110. package/dist/src/fetch.d.ts +36 -577
  111. package/dist/src/fetch.js +665 -367
  112. package/dist/src/index.d.ts +4 -0
  113. package/dist/src/index.js +39 -20
  114. package/dist/src/pyth.js +1 -0
  115. package/dist/src/typus_perp/admin/functions.d.ts +59 -0
  116. package/dist/src/typus_perp/admin/functions.js +122 -0
  117. package/dist/src/typus_perp/admin/structs.d.ts +467 -0
  118. package/dist/src/typus_perp/admin/structs.js +1065 -0
  119. package/dist/src/typus_perp/competition/functions.d.ts +24 -0
  120. package/dist/src/typus_perp/competition/functions.js +38 -0
  121. package/dist/src/typus_perp/competition/structs.d.ts +80 -0
  122. package/dist/src/typus_perp/competition/structs.js +288 -0
  123. package/dist/src/typus_perp/error/functions.d.ts +73 -0
  124. package/dist/src/typus_perp/error/functions.js +363 -0
  125. package/dist/src/typus_perp/escrow/functions.d.ts +17 -0
  126. package/dist/src/typus_perp/escrow/functions.js +36 -0
  127. package/dist/src/typus_perp/escrow/structs.d.ts +160 -0
  128. package/dist/src/typus_perp/escrow/structs.js +324 -0
  129. package/dist/src/typus_perp/index.d.ts +1 -0
  130. package/dist/src/typus_perp/index.js +7 -0
  131. package/dist/src/typus_perp/init.d.ts +2 -0
  132. package/dist/src/typus_perp/init.js +118 -0
  133. package/dist/src/typus_perp/lending/functions.d.ts +15 -0
  134. package/dist/src/typus_perp/lending/functions.js +22 -0
  135. package/dist/src/typus_perp/lp-pool/functions.d.ts +460 -0
  136. package/dist/src/typus_perp/lp-pool/functions.js +732 -0
  137. package/dist/src/typus_perp/lp-pool/structs.d.ts +3705 -0
  138. package/dist/src/typus_perp/lp-pool/structs.js +6789 -0
  139. package/dist/src/typus_perp/math/functions.d.ts +29 -0
  140. package/dist/src/typus_perp/math/functions.js +61 -0
  141. package/dist/src/typus_perp/position/functions.d.ts +379 -0
  142. package/dist/src/typus_perp/position/functions.js +713 -0
  143. package/dist/src/typus_perp/position/structs.d.ts +905 -0
  144. package/dist/src/typus_perp/position/structs.js +1450 -0
  145. package/dist/src/typus_perp/symbol/functions.d.ts +9 -0
  146. package/dist/src/typus_perp/symbol/functions.js +24 -0
  147. package/dist/src/typus_perp/symbol/structs.d.ts +70 -0
  148. package/dist/src/typus_perp/symbol/structs.js +235 -0
  149. package/dist/src/typus_perp/tlp/functions.d.ts +19 -0
  150. package/dist/src/typus_perp/tlp/functions.js +40 -0
  151. package/dist/src/typus_perp/tlp/structs.d.ts +89 -0
  152. package/dist/src/typus_perp/tlp/structs.js +365 -0
  153. package/dist/src/typus_perp/token-interface/functions.d.ts +11 -0
  154. package/dist/src/typus_perp/token-interface/functions.js +22 -0
  155. package/dist/src/typus_perp/trading/functions.d.ts +812 -0
  156. package/dist/src/typus_perp/trading/functions.js +1218 -0
  157. package/dist/src/typus_perp/trading/structs.d.ts +3060 -0
  158. package/dist/src/typus_perp/trading/structs.js +5813 -0
  159. package/dist/src/typus_perp/treasury-caps/functions.d.ts +9 -0
  160. package/dist/src/typus_perp/treasury-caps/functions.js +36 -0
  161. package/dist/src/typus_perp/treasury-caps/structs.d.ts +49 -0
  162. package/dist/src/typus_perp/treasury-caps/structs.js +223 -0
  163. package/dist/src/typus_perp/user-account/functions.d.ts +36 -0
  164. package/dist/src/typus_perp/user-account/functions.js +70 -0
  165. package/dist/src/typus_perp/user-account/structs.d.ts +148 -0
  166. package/dist/src/typus_perp/user-account/structs.js +448 -0
  167. package/dist/src/typus_stake_pool/admin/functions.d.ts +49 -0
  168. package/dist/src/typus_stake_pool/admin/functions.js +105 -0
  169. package/dist/src/typus_stake_pool/admin/structs.d.ts +365 -0
  170. package/dist/src/typus_stake_pool/admin/structs.js +789 -0
  171. package/dist/src/typus_stake_pool/index.d.ts +1 -0
  172. package/dist/src/typus_stake_pool/index.js +7 -0
  173. package/dist/src/typus_stake_pool/init.d.ts +2 -0
  174. package/dist/src/typus_stake_pool/init.js +69 -0
  175. package/dist/src/typus_stake_pool/stake-pool/functions.d.ts +229 -0
  176. package/dist/src/typus_stake_pool/stake-pool/functions.js +380 -0
  177. package/dist/src/typus_stake_pool/stake-pool/structs.d.ts +2199 -0
  178. package/dist/src/typus_stake_pool/stake-pool/structs.js +4653 -0
  179. package/dist/src/user/history.js +685 -614
  180. package/dist/src/user/order.d.ts +11 -16
  181. package/dist/src/user/order.js +302 -171
  182. package/dist/src/user/orderWithBidReceipt.d.ts +6 -8
  183. package/dist/src/user/orderWithBidReceipt.js +225 -127
  184. package/dist/src/user/tlp.d.ts +24 -25
  185. package/dist/src/user/tlp.js +468 -317
  186. package/package.json +3 -11
  187. package/dist/src/client.d.ts +0 -27
  188. package/dist/src/client.js +0 -108
  189. package/dist/src/generated/typus_perp/admin.d.ts +0 -117
  190. package/dist/src/generated/typus_perp/admin.js +0 -110
  191. package/dist/src/generated/typus_perp/competition.d.ts +0 -22
  192. package/dist/src/generated/typus_perp/competition.js +0 -58
  193. package/dist/src/generated/typus_perp/deps/std/type_name.d.ts +0 -17
  194. package/dist/src/generated/typus_perp/deps/std/type_name.js +0 -25
  195. package/dist/src/generated/typus_perp/deps/sui/balance.d.ts +0 -12
  196. package/dist/src/generated/typus_perp/deps/sui/balance.js +0 -20
  197. package/dist/src/generated/typus_perp/deps/sui/object.d.ts +0 -8
  198. package/dist/src/generated/typus_perp/deps/sui/object.js +0 -16
  199. package/dist/src/generated/typus_perp/deps/sui/object_table.d.ts +0 -19
  200. package/dist/src/generated/typus_perp/deps/sui/object_table.js +0 -59
  201. package/dist/src/generated/typus_perp/deps/sui/vec_set.d.ts +0 -18
  202. package/dist/src/generated/typus_perp/deps/sui/vec_set.js +0 -25
  203. package/dist/src/generated/typus_perp/deps/typus/keyed_big_vector.d.ts +0 -30
  204. package/dist/src/generated/typus_perp/deps/typus/keyed_big_vector.js +0 -67
  205. package/dist/src/generated/typus_perp/deps/typus/linked_object_table.d.ts +0 -32
  206. package/dist/src/generated/typus_perp/deps/typus/linked_object_table.js +0 -71
  207. package/dist/src/generated/typus_perp/deps/typus_framework/vault.d.ts +0 -23
  208. package/dist/src/generated/typus_perp/deps/typus_framework/vault.js +0 -61
  209. package/dist/src/generated/typus_perp/escrow.d.ts +0 -59
  210. package/dist/src/generated/typus_perp/escrow.js +0 -76
  211. package/dist/src/generated/typus_perp/lending.d.ts +0 -47
  212. package/dist/src/generated/typus_perp/lending.js +0 -50
  213. package/dist/src/generated/typus_perp/lp_pool.d.ts +0 -2327
  214. package/dist/src/generated/typus_perp/lp_pool.js +0 -1956
  215. package/dist/src/generated/typus_perp/math.d.ts +0 -95
  216. package/dist/src/generated/typus_perp/math.js +0 -97
  217. package/dist/src/generated/typus_perp/position.d.ts +0 -234
  218. package/dist/src/generated/typus_perp/position.js +0 -204
  219. package/dist/src/generated/typus_perp/symbol.d.ts +0 -18
  220. package/dist/src/generated/typus_perp/symbol.js +0 -55
  221. package/dist/src/generated/typus_perp/tlp.d.ts +0 -13
  222. package/dist/src/generated/typus_perp/tlp.js +0 -56
  223. package/dist/src/generated/typus_perp/trading.d.ts +0 -2486
  224. package/dist/src/generated/typus_perp/trading.js +0 -2476
  225. package/dist/src/generated/typus_perp/treasury_caps.d.ts +0 -13
  226. package/dist/src/generated/typus_perp/user_account.d.ts +0 -40
  227. package/dist/src/generated/typus_perp/user_account.js +0 -72
  228. package/dist/src/generated/typus_stake_pool/admin.d.ts +0 -234
  229. package/dist/src/generated/typus_stake_pool/admin.js +0 -272
  230. package/dist/src/generated/typus_stake_pool/deps/std/type_name.d.ts +0 -17
  231. package/dist/src/generated/typus_stake_pool/deps/std/type_name.js +0 -25
  232. package/dist/src/generated/typus_stake_pool/deps/sui/object.d.ts +0 -8
  233. package/dist/src/generated/typus_stake_pool/deps/sui/object.js +0 -16
  234. package/dist/src/generated/typus_stake_pool/deps/sui/vec_map.d.ts +0 -30
  235. package/dist/src/generated/typus_stake_pool/deps/sui/vec_map.js +0 -37
  236. package/dist/src/generated/typus_stake_pool/deps/sui/vec_set.d.ts +0 -18
  237. package/dist/src/generated/typus_stake_pool/deps/sui/vec_set.js +0 -25
  238. package/dist/src/generated/typus_stake_pool/stake_pool.d.ts +0 -986
  239. package/dist/src/generated/typus_stake_pool/stake_pool.js +0 -874
  240. package/dist/src/generated/utils/index.d.ts +0 -11
  241. package/dist/src/generated/utils/index.js +0 -135
  242. package/dist/src/grpc/graphql.d.ts +0 -26
  243. package/dist/src/grpc/graphql.js +0 -126
  244. package/dist/src/grpc/grpc.d.ts +0 -1
  245. package/dist/src/grpc/grpc.js +0 -38
  246. package/dist/src/grpc/ledgerService.js +0 -64
  247. package/dist/src/grpc/liveDataService.d.ts +0 -0
  248. package/dist/src/grpc/liveDataService.js +0 -49
  249. /package/dist/src/{grpc/ledgerService.d.ts → pyth.d.ts} +0 -0
@@ -0,0 +1,591 @@
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.SharedBalancePool = exports.BalancePool = exports.BalanceInfo = void 0;
109
+ exports.isBalanceInfo = isBalanceInfo;
110
+ exports.isBalancePool = isBalancePool;
111
+ exports.isSharedBalancePool = isSharedBalancePool;
112
+ var reified = __importStar(require("../../../../_framework/reified"));
113
+ var reified_1 = require("../../../../_framework/reified");
114
+ var util_1 = require("../../../../_framework/util");
115
+ var structs_1 = require("../../0x1/type-name/structs");
116
+ var structs_2 = require("../../0x2/object/structs");
117
+ var structs_3 = require("../authority/structs");
118
+ var index_1 = require("../index");
119
+ var bcs_1 = require("@mysten/sui/bcs");
120
+ var utils_1 = require("@mysten/sui/utils");
121
+ /* ============================== BalanceInfo =============================== */
122
+ function isBalanceInfo(type) {
123
+ type = (0, util_1.compressSuiType)(type);
124
+ return type === "".concat(index_1.PKG_V1, "::balance_pool::BalanceInfo");
125
+ }
126
+ var BalanceInfo = /** @class */ (function () {
127
+ function BalanceInfo(typeArgs, fields) {
128
+ this.__StructClass = true;
129
+ this.$typeName = BalanceInfo.$typeName;
130
+ this.$isPhantom = BalanceInfo.$isPhantom;
131
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([BalanceInfo.$typeName], __read(typeArgs), false));
132
+ this.$typeArgs = typeArgs;
133
+ this.token = fields.token;
134
+ this.value = fields.value;
135
+ }
136
+ BalanceInfo.reified = function () {
137
+ var _this = this;
138
+ return {
139
+ typeName: BalanceInfo.$typeName,
140
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([BalanceInfo.$typeName], [], false)),
141
+ typeArgs: [],
142
+ isPhantom: BalanceInfo.$isPhantom,
143
+ reifiedTypeArgs: [],
144
+ fromFields: function (fields) { return BalanceInfo.fromFields(fields); },
145
+ fromFieldsWithTypes: function (item) { return BalanceInfo.fromFieldsWithTypes(item); },
146
+ fromBcs: function (data) { return BalanceInfo.fromBcs(data); },
147
+ bcs: BalanceInfo.bcs,
148
+ fromJSONField: function (field) { return BalanceInfo.fromJSONField(field); },
149
+ fromJSON: function (json) { return BalanceInfo.fromJSON(json); },
150
+ fromSuiParsedData: function (content) { return BalanceInfo.fromSuiParsedData(content); },
151
+ fromSuiObjectData: function (content) { return BalanceInfo.fromSuiObjectData(content); },
152
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
153
+ return [2 /*return*/, BalanceInfo.fetch(client, id)];
154
+ }); }); },
155
+ new: function (fields) {
156
+ return new BalanceInfo([], fields);
157
+ },
158
+ kind: "StructClassReified",
159
+ };
160
+ };
161
+ Object.defineProperty(BalanceInfo, "r", {
162
+ get: function () {
163
+ return BalanceInfo.reified();
164
+ },
165
+ enumerable: false,
166
+ configurable: true
167
+ });
168
+ BalanceInfo.phantom = function () {
169
+ return (0, reified_1.phantom)(BalanceInfo.reified());
170
+ };
171
+ Object.defineProperty(BalanceInfo, "p", {
172
+ get: function () {
173
+ return BalanceInfo.phantom();
174
+ },
175
+ enumerable: false,
176
+ configurable: true
177
+ });
178
+ Object.defineProperty(BalanceInfo, "bcs", {
179
+ get: function () {
180
+ return bcs_1.bcs.struct("BalanceInfo", {
181
+ token: structs_1.TypeName.bcs,
182
+ value: bcs_1.bcs.u64(),
183
+ });
184
+ },
185
+ enumerable: false,
186
+ configurable: true
187
+ });
188
+ BalanceInfo.fromFields = function (fields) {
189
+ return BalanceInfo.reified().new({
190
+ token: (0, reified_1.decodeFromFields)(structs_1.TypeName.reified(), fields.token),
191
+ value: (0, reified_1.decodeFromFields)("u64", fields.value),
192
+ });
193
+ };
194
+ BalanceInfo.fromFieldsWithTypes = function (item) {
195
+ if (!isBalanceInfo(item.type)) {
196
+ throw new Error("not a BalanceInfo type");
197
+ }
198
+ return BalanceInfo.reified().new({
199
+ token: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.TypeName.reified(), item.fields.token),
200
+ value: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.value),
201
+ });
202
+ };
203
+ BalanceInfo.fromBcs = function (data) {
204
+ return BalanceInfo.fromFields(BalanceInfo.bcs.parse(data));
205
+ };
206
+ BalanceInfo.prototype.toJSONField = function () {
207
+ return {
208
+ token: this.token.toJSONField(),
209
+ value: this.value.toString(),
210
+ };
211
+ };
212
+ BalanceInfo.prototype.toJSON = function () {
213
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
214
+ };
215
+ BalanceInfo.fromJSONField = function (field) {
216
+ return BalanceInfo.reified().new({
217
+ token: (0, reified_1.decodeFromJSONField)(structs_1.TypeName.reified(), field.token),
218
+ value: (0, reified_1.decodeFromJSONField)("u64", field.value),
219
+ });
220
+ };
221
+ BalanceInfo.fromJSON = function (json) {
222
+ if (json.$typeName !== BalanceInfo.$typeName) {
223
+ throw new Error("not a WithTwoGenerics json object");
224
+ }
225
+ return BalanceInfo.fromJSONField(json);
226
+ };
227
+ BalanceInfo.fromSuiParsedData = function (content) {
228
+ if (content.dataType !== "moveObject") {
229
+ throw new Error("not an object");
230
+ }
231
+ if (!isBalanceInfo(content.type)) {
232
+ throw new Error("object at ".concat(content.fields.id, " is not a BalanceInfo object"));
233
+ }
234
+ return BalanceInfo.fromFieldsWithTypes(content);
235
+ };
236
+ BalanceInfo.fromSuiObjectData = function (data) {
237
+ if (data.bcs) {
238
+ if (data.bcs.dataType !== "moveObject" || !isBalanceInfo(data.bcs.type)) {
239
+ throw new Error("object at is not a BalanceInfo object");
240
+ }
241
+ return BalanceInfo.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
242
+ }
243
+ if (data.content) {
244
+ return BalanceInfo.fromSuiParsedData(data.content);
245
+ }
246
+ throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
247
+ };
248
+ BalanceInfo.fetch = function (client, id) {
249
+ return __awaiter(this, void 0, void 0, function () {
250
+ var res;
251
+ var _a, _b;
252
+ return __generator(this, function (_c) {
253
+ switch (_c.label) {
254
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
255
+ case 1:
256
+ res = _c.sent();
257
+ if (res.error) {
258
+ throw new Error("error fetching BalanceInfo object at id ".concat(id, ": ").concat(res.error.code));
259
+ }
260
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isBalanceInfo(res.data.bcs.type)) {
261
+ throw new Error("object at id ".concat(id, " is not a BalanceInfo object"));
262
+ }
263
+ return [2 /*return*/, BalanceInfo.fromSuiObjectData(res.data)];
264
+ }
265
+ });
266
+ });
267
+ };
268
+ BalanceInfo.$typeName = "".concat(index_1.PKG_V1, "::balance_pool::BalanceInfo");
269
+ BalanceInfo.$numTypeParams = 0;
270
+ BalanceInfo.$isPhantom = [];
271
+ return BalanceInfo;
272
+ }());
273
+ exports.BalanceInfo = BalanceInfo;
274
+ /* ============================== BalancePool =============================== */
275
+ function isBalancePool(type) {
276
+ type = (0, util_1.compressSuiType)(type);
277
+ return type === "".concat(index_1.PKG_V1, "::balance_pool::BalancePool");
278
+ }
279
+ var BalancePool = /** @class */ (function () {
280
+ function BalancePool(typeArgs, fields) {
281
+ this.__StructClass = true;
282
+ this.$typeName = BalancePool.$typeName;
283
+ this.$isPhantom = BalancePool.$isPhantom;
284
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([BalancePool.$typeName], __read(typeArgs), false));
285
+ this.$typeArgs = typeArgs;
286
+ this.id = fields.id;
287
+ this.balanceInfos = fields.balanceInfos;
288
+ this.authority = fields.authority;
289
+ }
290
+ BalancePool.reified = function () {
291
+ var _this = this;
292
+ return {
293
+ typeName: BalancePool.$typeName,
294
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([BalancePool.$typeName], [], false)),
295
+ typeArgs: [],
296
+ isPhantom: BalancePool.$isPhantom,
297
+ reifiedTypeArgs: [],
298
+ fromFields: function (fields) { return BalancePool.fromFields(fields); },
299
+ fromFieldsWithTypes: function (item) { return BalancePool.fromFieldsWithTypes(item); },
300
+ fromBcs: function (data) { return BalancePool.fromBcs(data); },
301
+ bcs: BalancePool.bcs,
302
+ fromJSONField: function (field) { return BalancePool.fromJSONField(field); },
303
+ fromJSON: function (json) { return BalancePool.fromJSON(json); },
304
+ fromSuiParsedData: function (content) { return BalancePool.fromSuiParsedData(content); },
305
+ fromSuiObjectData: function (content) { return BalancePool.fromSuiObjectData(content); },
306
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
307
+ return [2 /*return*/, BalancePool.fetch(client, id)];
308
+ }); }); },
309
+ new: function (fields) {
310
+ return new BalancePool([], fields);
311
+ },
312
+ kind: "StructClassReified",
313
+ };
314
+ };
315
+ Object.defineProperty(BalancePool, "r", {
316
+ get: function () {
317
+ return BalancePool.reified();
318
+ },
319
+ enumerable: false,
320
+ configurable: true
321
+ });
322
+ BalancePool.phantom = function () {
323
+ return (0, reified_1.phantom)(BalancePool.reified());
324
+ };
325
+ Object.defineProperty(BalancePool, "p", {
326
+ get: function () {
327
+ return BalancePool.phantom();
328
+ },
329
+ enumerable: false,
330
+ configurable: true
331
+ });
332
+ Object.defineProperty(BalancePool, "bcs", {
333
+ get: function () {
334
+ return bcs_1.bcs.struct("BalancePool", {
335
+ id: structs_2.UID.bcs,
336
+ balance_infos: bcs_1.bcs.vector(BalanceInfo.bcs),
337
+ authority: structs_3.Authority.bcs,
338
+ });
339
+ },
340
+ enumerable: false,
341
+ configurable: true
342
+ });
343
+ BalancePool.fromFields = function (fields) {
344
+ return BalancePool.reified().new({
345
+ id: (0, reified_1.decodeFromFields)(structs_2.UID.reified(), fields.id),
346
+ balanceInfos: (0, reified_1.decodeFromFields)(reified.vector(BalanceInfo.reified()), fields.balance_infos),
347
+ authority: (0, reified_1.decodeFromFields)(structs_3.Authority.reified(), fields.authority),
348
+ });
349
+ };
350
+ BalancePool.fromFieldsWithTypes = function (item) {
351
+ if (!isBalancePool(item.type)) {
352
+ throw new Error("not a BalancePool type");
353
+ }
354
+ return BalancePool.reified().new({
355
+ id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.UID.reified(), item.fields.id),
356
+ balanceInfos: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector(BalanceInfo.reified()), item.fields.balance_infos),
357
+ authority: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.Authority.reified(), item.fields.authority),
358
+ });
359
+ };
360
+ BalancePool.fromBcs = function (data) {
361
+ return BalancePool.fromFields(BalancePool.bcs.parse(data));
362
+ };
363
+ BalancePool.prototype.toJSONField = function () {
364
+ return {
365
+ id: this.id,
366
+ balanceInfos: (0, reified_1.fieldToJSON)("vector<".concat(BalanceInfo.$typeName, ">"), this.balanceInfos),
367
+ authority: this.authority.toJSONField(),
368
+ };
369
+ };
370
+ BalancePool.prototype.toJSON = function () {
371
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
372
+ };
373
+ BalancePool.fromJSONField = function (field) {
374
+ return BalancePool.reified().new({
375
+ id: (0, reified_1.decodeFromJSONField)(structs_2.UID.reified(), field.id),
376
+ balanceInfos: (0, reified_1.decodeFromJSONField)(reified.vector(BalanceInfo.reified()), field.balanceInfos),
377
+ authority: (0, reified_1.decodeFromJSONField)(structs_3.Authority.reified(), field.authority),
378
+ });
379
+ };
380
+ BalancePool.fromJSON = function (json) {
381
+ if (json.$typeName !== BalancePool.$typeName) {
382
+ throw new Error("not a WithTwoGenerics json object");
383
+ }
384
+ return BalancePool.fromJSONField(json);
385
+ };
386
+ BalancePool.fromSuiParsedData = function (content) {
387
+ if (content.dataType !== "moveObject") {
388
+ throw new Error("not an object");
389
+ }
390
+ if (!isBalancePool(content.type)) {
391
+ throw new Error("object at ".concat(content.fields.id, " is not a BalancePool object"));
392
+ }
393
+ return BalancePool.fromFieldsWithTypes(content);
394
+ };
395
+ BalancePool.fromSuiObjectData = function (data) {
396
+ if (data.bcs) {
397
+ if (data.bcs.dataType !== "moveObject" || !isBalancePool(data.bcs.type)) {
398
+ throw new Error("object at is not a BalancePool object");
399
+ }
400
+ return BalancePool.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
401
+ }
402
+ if (data.content) {
403
+ return BalancePool.fromSuiParsedData(data.content);
404
+ }
405
+ throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
406
+ };
407
+ BalancePool.fetch = function (client, id) {
408
+ return __awaiter(this, void 0, void 0, function () {
409
+ var res;
410
+ var _a, _b;
411
+ return __generator(this, function (_c) {
412
+ switch (_c.label) {
413
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
414
+ case 1:
415
+ res = _c.sent();
416
+ if (res.error) {
417
+ throw new Error("error fetching BalancePool object at id ".concat(id, ": ").concat(res.error.code));
418
+ }
419
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isBalancePool(res.data.bcs.type)) {
420
+ throw new Error("object at id ".concat(id, " is not a BalancePool object"));
421
+ }
422
+ return [2 /*return*/, BalancePool.fromSuiObjectData(res.data)];
423
+ }
424
+ });
425
+ });
426
+ };
427
+ BalancePool.$typeName = "".concat(index_1.PKG_V1, "::balance_pool::BalancePool");
428
+ BalancePool.$numTypeParams = 0;
429
+ BalancePool.$isPhantom = [];
430
+ return BalancePool;
431
+ }());
432
+ exports.BalancePool = BalancePool;
433
+ /* ============================== SharedBalancePool =============================== */
434
+ function isSharedBalancePool(type) {
435
+ type = (0, util_1.compressSuiType)(type);
436
+ return type === "".concat(index_1.PKG_V1, "::balance_pool::SharedBalancePool");
437
+ }
438
+ var SharedBalancePool = /** @class */ (function () {
439
+ function SharedBalancePool(typeArgs, fields) {
440
+ this.__StructClass = true;
441
+ this.$typeName = SharedBalancePool.$typeName;
442
+ this.$isPhantom = SharedBalancePool.$isPhantom;
443
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([SharedBalancePool.$typeName], __read(typeArgs), false));
444
+ this.$typeArgs = typeArgs;
445
+ this.id = fields.id;
446
+ this.balanceInfos = fields.balanceInfos;
447
+ this.authority = fields.authority;
448
+ }
449
+ SharedBalancePool.reified = function () {
450
+ var _this = this;
451
+ return {
452
+ typeName: SharedBalancePool.$typeName,
453
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([SharedBalancePool.$typeName], [], false)),
454
+ typeArgs: [],
455
+ isPhantom: SharedBalancePool.$isPhantom,
456
+ reifiedTypeArgs: [],
457
+ fromFields: function (fields) { return SharedBalancePool.fromFields(fields); },
458
+ fromFieldsWithTypes: function (item) { return SharedBalancePool.fromFieldsWithTypes(item); },
459
+ fromBcs: function (data) { return SharedBalancePool.fromBcs(data); },
460
+ bcs: SharedBalancePool.bcs,
461
+ fromJSONField: function (field) { return SharedBalancePool.fromJSONField(field); },
462
+ fromJSON: function (json) { return SharedBalancePool.fromJSON(json); },
463
+ fromSuiParsedData: function (content) { return SharedBalancePool.fromSuiParsedData(content); },
464
+ fromSuiObjectData: function (content) { return SharedBalancePool.fromSuiObjectData(content); },
465
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
466
+ return [2 /*return*/, SharedBalancePool.fetch(client, id)];
467
+ }); }); },
468
+ new: function (fields) {
469
+ return new SharedBalancePool([], fields);
470
+ },
471
+ kind: "StructClassReified",
472
+ };
473
+ };
474
+ Object.defineProperty(SharedBalancePool, "r", {
475
+ get: function () {
476
+ return SharedBalancePool.reified();
477
+ },
478
+ enumerable: false,
479
+ configurable: true
480
+ });
481
+ SharedBalancePool.phantom = function () {
482
+ return (0, reified_1.phantom)(SharedBalancePool.reified());
483
+ };
484
+ Object.defineProperty(SharedBalancePool, "p", {
485
+ get: function () {
486
+ return SharedBalancePool.phantom();
487
+ },
488
+ enumerable: false,
489
+ configurable: true
490
+ });
491
+ Object.defineProperty(SharedBalancePool, "bcs", {
492
+ get: function () {
493
+ return bcs_1.bcs.struct("SharedBalancePool", {
494
+ id: structs_2.UID.bcs,
495
+ balance_infos: bcs_1.bcs.vector(BalanceInfo.bcs),
496
+ authority: structs_3.Authority.bcs,
497
+ });
498
+ },
499
+ enumerable: false,
500
+ configurable: true
501
+ });
502
+ SharedBalancePool.fromFields = function (fields) {
503
+ return SharedBalancePool.reified().new({
504
+ id: (0, reified_1.decodeFromFields)(structs_2.UID.reified(), fields.id),
505
+ balanceInfos: (0, reified_1.decodeFromFields)(reified.vector(BalanceInfo.reified()), fields.balance_infos),
506
+ authority: (0, reified_1.decodeFromFields)(structs_3.Authority.reified(), fields.authority),
507
+ });
508
+ };
509
+ SharedBalancePool.fromFieldsWithTypes = function (item) {
510
+ if (!isSharedBalancePool(item.type)) {
511
+ throw new Error("not a SharedBalancePool type");
512
+ }
513
+ return SharedBalancePool.reified().new({
514
+ id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.UID.reified(), item.fields.id),
515
+ balanceInfos: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector(BalanceInfo.reified()), item.fields.balance_infos),
516
+ authority: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.Authority.reified(), item.fields.authority),
517
+ });
518
+ };
519
+ SharedBalancePool.fromBcs = function (data) {
520
+ return SharedBalancePool.fromFields(SharedBalancePool.bcs.parse(data));
521
+ };
522
+ SharedBalancePool.prototype.toJSONField = function () {
523
+ return {
524
+ id: this.id,
525
+ balanceInfos: (0, reified_1.fieldToJSON)("vector<".concat(BalanceInfo.$typeName, ">"), this.balanceInfos),
526
+ authority: this.authority.toJSONField(),
527
+ };
528
+ };
529
+ SharedBalancePool.prototype.toJSON = function () {
530
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
531
+ };
532
+ SharedBalancePool.fromJSONField = function (field) {
533
+ return SharedBalancePool.reified().new({
534
+ id: (0, reified_1.decodeFromJSONField)(structs_2.UID.reified(), field.id),
535
+ balanceInfos: (0, reified_1.decodeFromJSONField)(reified.vector(BalanceInfo.reified()), field.balanceInfos),
536
+ authority: (0, reified_1.decodeFromJSONField)(structs_3.Authority.reified(), field.authority),
537
+ });
538
+ };
539
+ SharedBalancePool.fromJSON = function (json) {
540
+ if (json.$typeName !== SharedBalancePool.$typeName) {
541
+ throw new Error("not a WithTwoGenerics json object");
542
+ }
543
+ return SharedBalancePool.fromJSONField(json);
544
+ };
545
+ SharedBalancePool.fromSuiParsedData = function (content) {
546
+ if (content.dataType !== "moveObject") {
547
+ throw new Error("not an object");
548
+ }
549
+ if (!isSharedBalancePool(content.type)) {
550
+ throw new Error("object at ".concat(content.fields.id, " is not a SharedBalancePool object"));
551
+ }
552
+ return SharedBalancePool.fromFieldsWithTypes(content);
553
+ };
554
+ SharedBalancePool.fromSuiObjectData = function (data) {
555
+ if (data.bcs) {
556
+ if (data.bcs.dataType !== "moveObject" || !isSharedBalancePool(data.bcs.type)) {
557
+ throw new Error("object at is not a SharedBalancePool object");
558
+ }
559
+ return SharedBalancePool.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
560
+ }
561
+ if (data.content) {
562
+ return SharedBalancePool.fromSuiParsedData(data.content);
563
+ }
564
+ throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
565
+ };
566
+ SharedBalancePool.fetch = function (client, id) {
567
+ return __awaiter(this, void 0, void 0, function () {
568
+ var res;
569
+ var _a, _b;
570
+ return __generator(this, function (_c) {
571
+ switch (_c.label) {
572
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
573
+ case 1:
574
+ res = _c.sent();
575
+ if (res.error) {
576
+ throw new Error("error fetching SharedBalancePool object at id ".concat(id, ": ").concat(res.error.code));
577
+ }
578
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isSharedBalancePool(res.data.bcs.type)) {
579
+ throw new Error("object at id ".concat(id, " is not a SharedBalancePool object"));
580
+ }
581
+ return [2 /*return*/, SharedBalancePool.fromSuiObjectData(res.data)];
582
+ }
583
+ });
584
+ });
585
+ };
586
+ SharedBalancePool.$typeName = "".concat(index_1.PKG_V1, "::balance_pool::SharedBalancePool");
587
+ SharedBalancePool.$numTypeParams = 0;
588
+ SharedBalancePool.$isPhantom = [];
589
+ return SharedBalancePool;
590
+ }());
591
+ exports.SharedBalancePool = SharedBalancePool;
@@ -0,0 +1,64 @@
1
+ import { PhantomReified, PhantomToTypeStr, PhantomTypeArgument, Reified, StructClass, ToField, ToPhantomTypeArgument, ToTypeStr } from "../../../../_framework/reified";
2
+ import { FieldsWithTypes } from "../../../../_framework/util";
3
+ import { UID } from "../../0x2/object/structs";
4
+ import { PKG_V1 } from "../index";
5
+ import { SuiClient, SuiObjectData, SuiParsedData } from "@mysten/sui/client";
6
+ export declare function isBigVector(type: string): boolean;
7
+ export interface BigVectorFields<Element extends PhantomTypeArgument> {
8
+ id: ToField<UID>;
9
+ sliceCount: ToField<"u64">;
10
+ sliceSize: ToField<"u64">;
11
+ length: ToField<"u64">;
12
+ }
13
+ export type BigVectorReified<Element extends PhantomTypeArgument> = Reified<BigVector<Element>, BigVectorFields<Element>>;
14
+ export declare class BigVector<Element extends PhantomTypeArgument> implements StructClass {
15
+ __StructClass: true;
16
+ static readonly $typeName = "0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274::big_vector::BigVector";
17
+ static readonly $numTypeParams = 1;
18
+ static readonly $isPhantom: readonly [true];
19
+ readonly $typeName = "0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274::big_vector::BigVector";
20
+ readonly $fullTypeName: `${typeof PKG_V1}::big_vector::BigVector<${PhantomToTypeStr<Element>}>`;
21
+ readonly $typeArgs: [PhantomToTypeStr<Element>];
22
+ readonly $isPhantom: readonly [true];
23
+ readonly id: ToField<UID>;
24
+ readonly sliceCount: ToField<"u64">;
25
+ readonly sliceSize: ToField<"u64">;
26
+ readonly length: ToField<"u64">;
27
+ private constructor();
28
+ static reified<Element extends PhantomReified<PhantomTypeArgument>>(Element: Element): BigVectorReified<ToPhantomTypeArgument<Element>>;
29
+ static get r(): typeof BigVector.reified;
30
+ static phantom<Element extends PhantomReified<PhantomTypeArgument>>(Element: Element): PhantomReified<ToTypeStr<BigVector<ToPhantomTypeArgument<Element>>>>;
31
+ static get p(): typeof BigVector.phantom;
32
+ static get bcs(): import("@mysten/sui/bcs").BcsStruct<{
33
+ id: import("@mysten/sui/bcs").BcsStruct<{
34
+ id: import("@mysten/sui/bcs").BcsStruct<{
35
+ bytes: import("@mysten/sui/bcs").BcsType<string, string, string>;
36
+ }, string>;
37
+ }, string>;
38
+ slice_count: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
39
+ slice_size: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
40
+ length: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
41
+ }, string>;
42
+ static fromFields<Element extends PhantomReified<PhantomTypeArgument>>(typeArg: Element, fields: Record<string, any>): BigVector<ToPhantomTypeArgument<Element>>;
43
+ static fromFieldsWithTypes<Element extends PhantomReified<PhantomTypeArgument>>(typeArg: Element, item: FieldsWithTypes): BigVector<ToPhantomTypeArgument<Element>>;
44
+ static fromBcs<Element extends PhantomReified<PhantomTypeArgument>>(typeArg: Element, data: Uint8Array): BigVector<ToPhantomTypeArgument<Element>>;
45
+ toJSONField(): {
46
+ id: string;
47
+ sliceCount: string;
48
+ sliceSize: string;
49
+ length: string;
50
+ };
51
+ toJSON(): {
52
+ id: string;
53
+ sliceCount: string;
54
+ sliceSize: string;
55
+ length: string;
56
+ $typeName: string;
57
+ $typeArgs: [PhantomToTypeStr<Element>];
58
+ };
59
+ static fromJSONField<Element extends PhantomReified<PhantomTypeArgument>>(typeArg: Element, field: any): BigVector<ToPhantomTypeArgument<Element>>;
60
+ static fromJSON<Element extends PhantomReified<PhantomTypeArgument>>(typeArg: Element, json: Record<string, any>): BigVector<ToPhantomTypeArgument<Element>>;
61
+ static fromSuiParsedData<Element extends PhantomReified<PhantomTypeArgument>>(typeArg: Element, content: SuiParsedData): BigVector<ToPhantomTypeArgument<Element>>;
62
+ static fromSuiObjectData<Element extends PhantomReified<PhantomTypeArgument>>(typeArg: Element, data: SuiObjectData): BigVector<ToPhantomTypeArgument<Element>>;
63
+ static fetch<Element extends PhantomReified<PhantomTypeArgument>>(client: SuiClient, typeArg: Element, id: string): Promise<BigVector<ToPhantomTypeArgument<Element>>>;
64
+ }