@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,9 @@
1
+ import { Transaction, TransactionObjectInput } from "@mysten/sui/transactions";
2
+ export declare function getMutTreasuryCap(tx: Transaction, typeArg: string, treasuryCaps: TransactionObjectInput, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
3
+ export declare function init(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
4
+ export declare function removeTreasuryCap(tx: Transaction, typeArg: string, treasuryCaps: TransactionObjectInput, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
5
+ export interface StoreTreasuryCapArgs {
6
+ treasuryCaps: TransactionObjectInput;
7
+ treasuryCap: TransactionObjectInput;
8
+ }
9
+ export declare function storeTreasuryCap(tx: Transaction, typeArg: string, args: StoreTreasuryCapArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getMutTreasuryCap = getMutTreasuryCap;
4
+ exports.init = init;
5
+ exports.removeTreasuryCap = removeTreasuryCap;
6
+ exports.storeTreasuryCap = storeTreasuryCap;
7
+ var __1 = require("..");
8
+ var util_1 = require("../../_framework/util");
9
+ function getMutTreasuryCap(tx, typeArg, treasuryCaps, published_at) {
10
+ if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
11
+ return tx.moveCall({
12
+ target: "".concat(published_at, "::treasury_caps::get_mut_treasury_cap"),
13
+ typeArguments: [typeArg],
14
+ arguments: [(0, util_1.obj)(tx, treasuryCaps)],
15
+ });
16
+ }
17
+ function init(tx, published_at) {
18
+ if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
19
+ return tx.moveCall({ target: "".concat(published_at, "::treasury_caps::init"), arguments: [] });
20
+ }
21
+ function removeTreasuryCap(tx, typeArg, treasuryCaps, published_at) {
22
+ if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
23
+ return tx.moveCall({
24
+ target: "".concat(published_at, "::treasury_caps::remove_treasury_cap"),
25
+ typeArguments: [typeArg],
26
+ arguments: [(0, util_1.obj)(tx, treasuryCaps)],
27
+ });
28
+ }
29
+ function storeTreasuryCap(tx, typeArg, args, published_at) {
30
+ if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
31
+ return tx.moveCall({
32
+ target: "".concat(published_at, "::treasury_caps::store_treasury_cap"),
33
+ typeArguments: [typeArg],
34
+ arguments: [(0, util_1.obj)(tx, args.treasuryCaps), (0, util_1.obj)(tx, args.treasuryCap)],
35
+ });
36
+ }
@@ -0,0 +1,49 @@
1
+ import { UID } from "../../_dependencies/source/0x2/object/structs";
2
+ import { PhantomReified, Reified, StructClass, ToField, ToTypeStr } from "../../_framework/reified";
3
+ import { FieldsWithTypes } from "../../_framework/util";
4
+ import { PKG_V1 } from "../index";
5
+ import { SuiClient, SuiObjectData, SuiParsedData } from "@mysten/sui/client";
6
+ export declare function isTreasuryCaps(type: string): boolean;
7
+ export interface TreasuryCapsFields {
8
+ id: ToField<UID>;
9
+ }
10
+ export type TreasuryCapsReified = Reified<TreasuryCaps, TreasuryCapsFields>;
11
+ export declare class TreasuryCaps implements StructClass {
12
+ __StructClass: true;
13
+ static readonly $typeName: string;
14
+ static readonly $numTypeParams = 0;
15
+ static readonly $isPhantom: readonly [];
16
+ readonly $typeName: string;
17
+ readonly $fullTypeName: `${typeof PKG_V1}::treasury_caps::TreasuryCaps`;
18
+ readonly $typeArgs: [];
19
+ readonly $isPhantom: readonly [];
20
+ readonly id: ToField<UID>;
21
+ private constructor();
22
+ static reified(): TreasuryCapsReified;
23
+ static get r(): import("../../_framework/reified").StructClassReified<TreasuryCaps, TreasuryCapsFields>;
24
+ static phantom(): PhantomReified<ToTypeStr<TreasuryCaps>>;
25
+ static get p(): PhantomReified<"0xe27969a70f93034de9ce16e6ad661b480324574e68d15a64b513fd90eb2423e5::treasury_caps::TreasuryCaps" | "0x585924f160f83ef16f8927ec117e4d740abb6f4e571ecfa89ff3e973042cb1b9::treasury_caps::TreasuryCaps">;
26
+ static get bcs(): import("@mysten/sui/bcs").BcsStruct<{
27
+ id: import("@mysten/sui/bcs").BcsStruct<{
28
+ id: import("@mysten/sui/bcs").BcsStruct<{
29
+ bytes: import("@mysten/sui/bcs").BcsType<string, string, string>;
30
+ }, string>;
31
+ }, string>;
32
+ }, string>;
33
+ static fromFields(fields: Record<string, any>): TreasuryCaps;
34
+ static fromFieldsWithTypes(item: FieldsWithTypes): TreasuryCaps;
35
+ static fromBcs(data: Uint8Array): TreasuryCaps;
36
+ toJSONField(): {
37
+ id: string;
38
+ };
39
+ toJSON(): {
40
+ id: string;
41
+ $typeName: string;
42
+ $typeArgs: [];
43
+ };
44
+ static fromJSONField(field: any): TreasuryCaps;
45
+ static fromJSON(json: Record<string, any>): TreasuryCaps;
46
+ static fromSuiParsedData(content: SuiParsedData): TreasuryCaps;
47
+ static fromSuiObjectData(data: SuiObjectData): TreasuryCaps;
48
+ static fetch(client: SuiClient, id: string): Promise<TreasuryCaps>;
49
+ }
@@ -0,0 +1,223 @@
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
14
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
15
+ return new (P || (P = Promise))(function (resolve, reject) {
16
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
17
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
18
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
19
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
20
+ });
21
+ };
22
+ var __generator = (this && this.__generator) || function (thisArg, body) {
23
+ 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);
24
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
25
+ function verb(n) { return function (v) { return step([n, v]); }; }
26
+ function step(op) {
27
+ if (f) throw new TypeError("Generator is already executing.");
28
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
29
+ 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;
30
+ if (y = 0, t) op = [op[0] & 2, t.value];
31
+ switch (op[0]) {
32
+ case 0: case 1: t = op; break;
33
+ case 4: _.label++; return { value: op[1], done: false };
34
+ case 5: _.label++; y = op[1]; op = [0]; continue;
35
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
36
+ default:
37
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
38
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
39
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
40
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
41
+ if (t[2]) _.ops.pop();
42
+ _.trys.pop(); continue;
43
+ }
44
+ op = body.call(thisArg, _);
45
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
46
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
47
+ }
48
+ };
49
+ var __read = (this && this.__read) || function (o, n) {
50
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
51
+ if (!m) return o;
52
+ var i = m.call(o), r, ar = [], e;
53
+ try {
54
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
55
+ }
56
+ catch (error) { e = { error: error }; }
57
+ finally {
58
+ try {
59
+ if (r && !r.done && (m = i["return"])) m.call(i);
60
+ }
61
+ finally { if (e) throw e.error; }
62
+ }
63
+ return ar;
64
+ };
65
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
66
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
67
+ if (ar || !(i in from)) {
68
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
69
+ ar[i] = from[i];
70
+ }
71
+ }
72
+ return to.concat(ar || Array.prototype.slice.call(from));
73
+ };
74
+ Object.defineProperty(exports, "__esModule", { value: true });
75
+ exports.TreasuryCaps = void 0;
76
+ exports.isTreasuryCaps = isTreasuryCaps;
77
+ var structs_1 = require("../../_dependencies/source/0x2/object/structs");
78
+ var reified_1 = require("../../_framework/reified");
79
+ var util_1 = require("../../_framework/util");
80
+ var index_1 = require("../index");
81
+ var bcs_1 = require("@mysten/sui/bcs");
82
+ var utils_1 = require("@mysten/sui/utils");
83
+ /* ============================== TreasuryCaps =============================== */
84
+ function isTreasuryCaps(type) {
85
+ type = (0, util_1.compressSuiType)(type);
86
+ return type === "".concat(index_1.PKG_V1, "::treasury_caps::TreasuryCaps");
87
+ }
88
+ var TreasuryCaps = /** @class */ (function () {
89
+ function TreasuryCaps(typeArgs, fields) {
90
+ this.__StructClass = true;
91
+ this.$typeName = TreasuryCaps.$typeName;
92
+ this.$isPhantom = TreasuryCaps.$isPhantom;
93
+ this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([TreasuryCaps.$typeName], __read(typeArgs), false));
94
+ this.$typeArgs = typeArgs;
95
+ this.id = fields.id;
96
+ }
97
+ TreasuryCaps.reified = function () {
98
+ var _this = this;
99
+ return {
100
+ typeName: TreasuryCaps.$typeName,
101
+ fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([TreasuryCaps.$typeName], [], false)),
102
+ typeArgs: [],
103
+ isPhantom: TreasuryCaps.$isPhantom,
104
+ reifiedTypeArgs: [],
105
+ fromFields: function (fields) { return TreasuryCaps.fromFields(fields); },
106
+ fromFieldsWithTypes: function (item) { return TreasuryCaps.fromFieldsWithTypes(item); },
107
+ fromBcs: function (data) { return TreasuryCaps.fromBcs(data); },
108
+ bcs: TreasuryCaps.bcs,
109
+ fromJSONField: function (field) { return TreasuryCaps.fromJSONField(field); },
110
+ fromJSON: function (json) { return TreasuryCaps.fromJSON(json); },
111
+ fromSuiParsedData: function (content) { return TreasuryCaps.fromSuiParsedData(content); },
112
+ fromSuiObjectData: function (content) { return TreasuryCaps.fromSuiObjectData(content); },
113
+ fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
114
+ return [2 /*return*/, TreasuryCaps.fetch(client, id)];
115
+ }); }); },
116
+ new: function (fields) {
117
+ return new TreasuryCaps([], fields);
118
+ },
119
+ kind: "StructClassReified",
120
+ };
121
+ };
122
+ Object.defineProperty(TreasuryCaps, "r", {
123
+ get: function () {
124
+ return TreasuryCaps.reified();
125
+ },
126
+ enumerable: false,
127
+ configurable: true
128
+ });
129
+ TreasuryCaps.phantom = function () {
130
+ return (0, reified_1.phantom)(TreasuryCaps.reified());
131
+ };
132
+ Object.defineProperty(TreasuryCaps, "p", {
133
+ get: function () {
134
+ return TreasuryCaps.phantom();
135
+ },
136
+ enumerable: false,
137
+ configurable: true
138
+ });
139
+ Object.defineProperty(TreasuryCaps, "bcs", {
140
+ get: function () {
141
+ return bcs_1.bcs.struct("TreasuryCaps", {
142
+ id: structs_1.UID.bcs,
143
+ });
144
+ },
145
+ enumerable: false,
146
+ configurable: true
147
+ });
148
+ TreasuryCaps.fromFields = function (fields) {
149
+ return TreasuryCaps.reified().new({ id: (0, reified_1.decodeFromFields)(structs_1.UID.reified(), fields.id) });
150
+ };
151
+ TreasuryCaps.fromFieldsWithTypes = function (item) {
152
+ if (!isTreasuryCaps(item.type)) {
153
+ throw new Error("not a TreasuryCaps type");
154
+ }
155
+ return TreasuryCaps.reified().new({ id: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.UID.reified(), item.fields.id) });
156
+ };
157
+ TreasuryCaps.fromBcs = function (data) {
158
+ return TreasuryCaps.fromFields(TreasuryCaps.bcs.parse(data));
159
+ };
160
+ TreasuryCaps.prototype.toJSONField = function () {
161
+ return {
162
+ id: this.id,
163
+ };
164
+ };
165
+ TreasuryCaps.prototype.toJSON = function () {
166
+ return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
167
+ };
168
+ TreasuryCaps.fromJSONField = function (field) {
169
+ return TreasuryCaps.reified().new({ id: (0, reified_1.decodeFromJSONField)(structs_1.UID.reified(), field.id) });
170
+ };
171
+ TreasuryCaps.fromJSON = function (json) {
172
+ if (json.$typeName !== TreasuryCaps.$typeName) {
173
+ throw new Error("not a WithTwoGenerics json object");
174
+ }
175
+ return TreasuryCaps.fromJSONField(json);
176
+ };
177
+ TreasuryCaps.fromSuiParsedData = function (content) {
178
+ if (content.dataType !== "moveObject") {
179
+ throw new Error("not an object");
180
+ }
181
+ if (!isTreasuryCaps(content.type)) {
182
+ throw new Error("object at ".concat(content.fields.id, " is not a TreasuryCaps object"));
183
+ }
184
+ return TreasuryCaps.fromFieldsWithTypes(content);
185
+ };
186
+ TreasuryCaps.fromSuiObjectData = function (data) {
187
+ if (data.bcs) {
188
+ if (data.bcs.dataType !== "moveObject" || !isTreasuryCaps(data.bcs.type)) {
189
+ throw new Error("object at is not a TreasuryCaps object");
190
+ }
191
+ return TreasuryCaps.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
192
+ }
193
+ if (data.content) {
194
+ return TreasuryCaps.fromSuiParsedData(data.content);
195
+ }
196
+ throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
197
+ };
198
+ TreasuryCaps.fetch = function (client, id) {
199
+ return __awaiter(this, void 0, void 0, function () {
200
+ var res;
201
+ var _a, _b;
202
+ return __generator(this, function (_c) {
203
+ switch (_c.label) {
204
+ case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
205
+ case 1:
206
+ res = _c.sent();
207
+ if (res.error) {
208
+ throw new Error("error fetching TreasuryCaps object at id ".concat(id, ": ").concat(res.error.code));
209
+ }
210
+ if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isTreasuryCaps(res.data.bcs.type)) {
211
+ throw new Error("object at id ".concat(id, " is not a TreasuryCaps object"));
212
+ }
213
+ return [2 /*return*/, TreasuryCaps.fromSuiObjectData(res.data)];
214
+ }
215
+ });
216
+ });
217
+ };
218
+ TreasuryCaps.$typeName = "".concat(index_1.PKG_V1, "::treasury_caps::TreasuryCaps");
219
+ TreasuryCaps.$numTypeParams = 0;
220
+ TreasuryCaps.$isPhantom = [];
221
+ return TreasuryCaps;
222
+ }());
223
+ exports.TreasuryCaps = TreasuryCaps;
@@ -0,0 +1,36 @@
1
+ import { Transaction, TransactionArgument, TransactionObjectInput } from "@mysten/sui/transactions";
2
+ export interface AddDelegateUserArgs {
3
+ userAccount: TransactionObjectInput;
4
+ user: string | TransactionArgument;
5
+ }
6
+ export declare function addDelegateUser(tx: Transaction, args: AddDelegateUserArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
7
+ export declare function checkOwner(tx: Transaction, userAccount: TransactionObjectInput, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
8
+ export interface DepositArgs {
9
+ userAccount: TransactionObjectInput;
10
+ balance: TransactionObjectInput;
11
+ }
12
+ export declare function deposit(tx: Transaction, typeArg: string, args: DepositArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
13
+ export interface GetMutUserAccountArgs {
14
+ marketId: TransactionObjectInput;
15
+ user: string | TransactionArgument;
16
+ }
17
+ export declare function getMutUserAccount(tx: Transaction, args: GetMutUserAccountArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
18
+ export declare function getUserAccountOwner(tx: Transaction, userAccountCap: TransactionObjectInput, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
19
+ export interface HasUserAccountArgs {
20
+ marketId: TransactionObjectInput;
21
+ user: string | TransactionArgument;
22
+ }
23
+ export declare function hasUserAccount(tx: Transaction, args: HasUserAccountArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
24
+ export declare function newUserAccount(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
25
+ export interface RemoveUserAccountArgs {
26
+ marketId: TransactionObjectInput;
27
+ user: string | TransactionArgument;
28
+ userAccountCap: TransactionObjectInput;
29
+ }
30
+ export declare function removeUserAccount(tx: Transaction, args: RemoveUserAccountArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
31
+ export interface WithdrawArgs {
32
+ userAccount: TransactionObjectInput;
33
+ amount: bigint | TransactionArgument | TransactionArgument | null;
34
+ userAccountCap: TransactionObjectInput;
35
+ }
36
+ export declare function withdraw(tx: Transaction, typeArg: string, args: WithdrawArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addDelegateUser = addDelegateUser;
4
+ exports.checkOwner = checkOwner;
5
+ exports.deposit = deposit;
6
+ exports.getMutUserAccount = getMutUserAccount;
7
+ exports.getUserAccountOwner = getUserAccountOwner;
8
+ exports.hasUserAccount = hasUserAccount;
9
+ exports.newUserAccount = newUserAccount;
10
+ exports.removeUserAccount = removeUserAccount;
11
+ exports.withdraw = withdraw;
12
+ var __1 = require("..");
13
+ var structs_1 = require("../../_dependencies/source/0x1/option/structs");
14
+ var util_1 = require("../../_framework/util");
15
+ function addDelegateUser(tx, args, published_at) {
16
+ if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
17
+ return tx.moveCall({
18
+ target: "".concat(published_at, "::user_account::add_delegate_user"),
19
+ arguments: [(0, util_1.obj)(tx, args.userAccount), (0, util_1.pure)(tx, args.user, "address")],
20
+ });
21
+ }
22
+ function checkOwner(tx, userAccount, published_at) {
23
+ if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
24
+ return tx.moveCall({ target: "".concat(published_at, "::user_account::check_owner"), arguments: [(0, util_1.obj)(tx, userAccount)] });
25
+ }
26
+ function deposit(tx, typeArg, args, published_at) {
27
+ if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
28
+ return tx.moveCall({
29
+ target: "".concat(published_at, "::user_account::deposit"),
30
+ typeArguments: [typeArg],
31
+ arguments: [(0, util_1.obj)(tx, args.userAccount), (0, util_1.obj)(tx, args.balance)],
32
+ });
33
+ }
34
+ function getMutUserAccount(tx, args, published_at) {
35
+ if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
36
+ return tx.moveCall({
37
+ target: "".concat(published_at, "::user_account::get_mut_user_account"),
38
+ arguments: [(0, util_1.obj)(tx, args.marketId), (0, util_1.pure)(tx, args.user, "address")],
39
+ });
40
+ }
41
+ function getUserAccountOwner(tx, userAccountCap, published_at) {
42
+ if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
43
+ return tx.moveCall({ target: "".concat(published_at, "::user_account::get_user_account_owner"), arguments: [(0, util_1.obj)(tx, userAccountCap)] });
44
+ }
45
+ function hasUserAccount(tx, args, published_at) {
46
+ if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
47
+ return tx.moveCall({
48
+ target: "".concat(published_at, "::user_account::has_user_account"),
49
+ arguments: [(0, util_1.obj)(tx, args.marketId), (0, util_1.pure)(tx, args.user, "address")],
50
+ });
51
+ }
52
+ function newUserAccount(tx, published_at) {
53
+ if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
54
+ return tx.moveCall({ target: "".concat(published_at, "::user_account::new_user_account"), arguments: [] });
55
+ }
56
+ function removeUserAccount(tx, args, published_at) {
57
+ if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
58
+ return tx.moveCall({
59
+ target: "".concat(published_at, "::user_account::remove_user_account"),
60
+ arguments: [(0, util_1.obj)(tx, args.marketId), (0, util_1.pure)(tx, args.user, "address"), (0, util_1.obj)(tx, args.userAccountCap)],
61
+ });
62
+ }
63
+ function withdraw(tx, typeArg, args, published_at) {
64
+ if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
65
+ return tx.moveCall({
66
+ target: "".concat(published_at, "::user_account::withdraw"),
67
+ typeArguments: [typeArg],
68
+ arguments: [(0, util_1.obj)(tx, args.userAccount), (0, util_1.pure)(tx, args.amount, "".concat(structs_1.Option.$typeName, "<u64>")), (0, util_1.obj)(tx, args.userAccountCap)],
69
+ });
70
+ }
@@ -0,0 +1,148 @@
1
+ import * as reified from "../../_framework/reified";
2
+ import { TypeName } from "../../_dependencies/source/0x1/type-name/structs";
3
+ import { ID, UID } from "../../_dependencies/source/0x2/object/structs";
4
+ import { PhantomReified, Reified, StructClass, ToField, ToTypeStr } from "../../_framework/reified";
5
+ import { FieldsWithTypes } from "../../_framework/util";
6
+ import { Vector } from "../../_framework/vector";
7
+ import { PKG_V1 } from "../index";
8
+ import { SuiClient, SuiObjectData, SuiParsedData } from "@mysten/sui/client";
9
+ export declare function isUserAccount(type: string): boolean;
10
+ export interface UserAccountFields {
11
+ id: ToField<UID>;
12
+ owner: ToField<"address">;
13
+ delegateUser: ToField<Vector<"address">>;
14
+ symbols: ToField<Vector<TypeName>>;
15
+ u64Padding: ToField<Vector<"u64">>;
16
+ }
17
+ export type UserAccountReified = Reified<UserAccount, UserAccountFields>;
18
+ export declare class UserAccount implements StructClass {
19
+ __StructClass: true;
20
+ static readonly $typeName: string;
21
+ static readonly $numTypeParams = 0;
22
+ static readonly $isPhantom: readonly [];
23
+ readonly $typeName: string;
24
+ readonly $fullTypeName: `${typeof PKG_V1}::user_account::UserAccount`;
25
+ readonly $typeArgs: [];
26
+ readonly $isPhantom: readonly [];
27
+ readonly id: ToField<UID>;
28
+ readonly owner: ToField<"address">;
29
+ readonly delegateUser: ToField<Vector<"address">>;
30
+ readonly symbols: ToField<Vector<TypeName>>;
31
+ readonly u64Padding: ToField<Vector<"u64">>;
32
+ private constructor();
33
+ static reified(): UserAccountReified;
34
+ static get r(): reified.StructClassReified<UserAccount, UserAccountFields>;
35
+ static phantom(): PhantomReified<ToTypeStr<UserAccount>>;
36
+ static get p(): reified.PhantomReified<"0xe27969a70f93034de9ce16e6ad661b480324574e68d15a64b513fd90eb2423e5::user_account::UserAccount" | "0x585924f160f83ef16f8927ec117e4d740abb6f4e571ecfa89ff3e973042cb1b9::user_account::UserAccount">;
37
+ static get bcs(): import("@mysten/sui/bcs").BcsStruct<{
38
+ id: import("@mysten/sui/bcs").BcsStruct<{
39
+ id: import("@mysten/sui/bcs").BcsStruct<{
40
+ bytes: import("@mysten/sui/bcs").BcsType<string, string, string>;
41
+ }, string>;
42
+ }, string>;
43
+ owner: import("@mysten/sui/bcs").BcsType<string, string, string>;
44
+ delegate_user: import("@mysten/sui/bcs").BcsType<string[], Iterable<string> & {
45
+ length: number;
46
+ }, string>;
47
+ symbols: import("@mysten/sui/bcs").BcsType<{
48
+ name: {
49
+ bytes: number[];
50
+ };
51
+ }[], Iterable<{
52
+ name: {
53
+ bytes: Iterable<number> & {
54
+ length: number;
55
+ };
56
+ };
57
+ }> & {
58
+ length: number;
59
+ }, string>;
60
+ u64_padding: import("@mysten/sui/bcs").BcsType<string[], Iterable<string | number | bigint> & {
61
+ length: number;
62
+ }, string>;
63
+ }, string>;
64
+ static fromFields(fields: Record<string, any>): UserAccount;
65
+ static fromFieldsWithTypes(item: FieldsWithTypes): UserAccount;
66
+ static fromBcs(data: Uint8Array): UserAccount;
67
+ toJSONField(): {
68
+ id: string;
69
+ owner: string;
70
+ delegateUser: string[];
71
+ symbols: {
72
+ name: string;
73
+ }[];
74
+ u64Padding: string[];
75
+ };
76
+ toJSON(): {
77
+ id: string;
78
+ owner: string;
79
+ delegateUser: string[];
80
+ symbols: {
81
+ name: string;
82
+ }[];
83
+ u64Padding: string[];
84
+ $typeName: string;
85
+ $typeArgs: [];
86
+ };
87
+ static fromJSONField(field: any): UserAccount;
88
+ static fromJSON(json: Record<string, any>): UserAccount;
89
+ static fromSuiParsedData(content: SuiParsedData): UserAccount;
90
+ static fromSuiObjectData(data: SuiObjectData): UserAccount;
91
+ static fetch(client: SuiClient, id: string): Promise<UserAccount>;
92
+ }
93
+ export declare function isUserAccountCap(type: string): boolean;
94
+ export interface UserAccountCapFields {
95
+ id: ToField<UID>;
96
+ owner: ToField<"address">;
97
+ userAccountId: ToField<ID>;
98
+ }
99
+ export type UserAccountCapReified = Reified<UserAccountCap, UserAccountCapFields>;
100
+ export declare class UserAccountCap implements StructClass {
101
+ __StructClass: true;
102
+ static readonly $typeName: string;
103
+ static readonly $numTypeParams = 0;
104
+ static readonly $isPhantom: readonly [];
105
+ readonly $typeName: string;
106
+ readonly $fullTypeName: `${typeof PKG_V1}::user_account::UserAccountCap`;
107
+ readonly $typeArgs: [];
108
+ readonly $isPhantom: readonly [];
109
+ readonly id: ToField<UID>;
110
+ readonly owner: ToField<"address">;
111
+ readonly userAccountId: ToField<ID>;
112
+ private constructor();
113
+ static reified(): UserAccountCapReified;
114
+ static get r(): reified.StructClassReified<UserAccountCap, UserAccountCapFields>;
115
+ static phantom(): PhantomReified<ToTypeStr<UserAccountCap>>;
116
+ static get p(): reified.PhantomReified<"0xe27969a70f93034de9ce16e6ad661b480324574e68d15a64b513fd90eb2423e5::user_account::UserAccountCap" | "0x585924f160f83ef16f8927ec117e4d740abb6f4e571ecfa89ff3e973042cb1b9::user_account::UserAccountCap">;
117
+ static get bcs(): import("@mysten/sui/bcs").BcsStruct<{
118
+ id: import("@mysten/sui/bcs").BcsStruct<{
119
+ id: import("@mysten/sui/bcs").BcsStruct<{
120
+ bytes: import("@mysten/sui/bcs").BcsType<string, string, string>;
121
+ }, string>;
122
+ }, string>;
123
+ owner: import("@mysten/sui/bcs").BcsType<string, string, string>;
124
+ user_account_id: import("@mysten/sui/bcs").BcsStruct<{
125
+ bytes: import("@mysten/sui/bcs").BcsType<string, string, string>;
126
+ }, string>;
127
+ }, string>;
128
+ static fromFields(fields: Record<string, any>): UserAccountCap;
129
+ static fromFieldsWithTypes(item: FieldsWithTypes): UserAccountCap;
130
+ static fromBcs(data: Uint8Array): UserAccountCap;
131
+ toJSONField(): {
132
+ id: string;
133
+ owner: string;
134
+ userAccountId: string;
135
+ };
136
+ toJSON(): {
137
+ id: string;
138
+ owner: string;
139
+ userAccountId: string;
140
+ $typeName: string;
141
+ $typeArgs: [];
142
+ };
143
+ static fromJSONField(field: any): UserAccountCap;
144
+ static fromJSON(json: Record<string, any>): UserAccountCap;
145
+ static fromSuiParsedData(content: SuiParsedData): UserAccountCap;
146
+ static fromSuiObjectData(data: SuiObjectData): UserAccountCap;
147
+ static fetch(client: SuiClient, id: string): Promise<UserAccountCap>;
148
+ }