@typus/typus-perp-sdk 1.1.32 → 1.1.33

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 (253) hide show
  1. package/dist/src/api/sentio.d.ts +5 -5
  2. package/dist/src/api/sentio.js +690 -541
  3. package/dist/src/client.d.ts +28 -0
  4. package/dist/src/client.js +171 -0
  5. package/dist/src/fetch.d.ts +554 -36
  6. package/dist/src/fetch.js +545 -661
  7. package/dist/src/generated/typus_perp/admin.d.ts +274 -0
  8. package/dist/src/generated/typus_perp/admin.js +321 -0
  9. package/dist/src/generated/typus_perp/competition.d.ts +60 -0
  10. package/dist/src/generated/typus_perp/competition.js +104 -0
  11. package/dist/src/generated/typus_perp/deps/std/type_name.d.ts +17 -0
  12. package/dist/src/generated/typus_perp/deps/std/type_name.js +25 -0
  13. package/dist/src/generated/typus_perp/deps/sui/balance.d.ts +12 -0
  14. package/dist/src/generated/typus_perp/deps/sui/balance.js +20 -0
  15. package/dist/src/generated/typus_perp/deps/sui/object.d.ts +8 -0
  16. package/dist/src/generated/typus_perp/deps/sui/object.js +16 -0
  17. package/dist/src/generated/typus_perp/deps/sui/object_table.d.ts +19 -0
  18. package/dist/src/generated/typus_perp/deps/sui/object_table.js +59 -0
  19. package/dist/src/generated/typus_perp/deps/sui/table.d.ts +31 -0
  20. package/dist/src/generated/typus_perp/deps/sui/table.js +71 -0
  21. package/dist/src/generated/typus_perp/deps/sui/vec_set.d.ts +18 -0
  22. package/dist/src/generated/typus_perp/deps/sui/vec_set.js +25 -0
  23. package/dist/src/generated/typus_perp/deps/typus/keyed_big_vector.d.ts +30 -0
  24. package/dist/src/generated/typus_perp/deps/typus/keyed_big_vector.js +67 -0
  25. package/dist/src/generated/typus_perp/deps/typus/linked_object_table.d.ts +32 -0
  26. package/dist/src/generated/typus_perp/deps/typus/linked_object_table.js +71 -0
  27. package/dist/src/generated/typus_perp/deps/typus_framework/vault.d.ts +15 -0
  28. package/dist/src/{_framework/init-loader.js → generated/typus_perp/deps/typus_framework/vault.js} +18 -10
  29. package/dist/src/generated/typus_perp/error.d.ts +443 -0
  30. package/dist/src/generated/typus_perp/error.js +788 -0
  31. package/dist/src/generated/typus_perp/escrow.d.ts +109 -0
  32. package/dist/src/generated/typus_perp/escrow.js +139 -0
  33. package/dist/src/generated/typus_perp/lp_pool.d.ts +1853 -0
  34. package/dist/src/generated/typus_perp/lp_pool.js +1483 -0
  35. package/dist/src/generated/typus_perp/math.d.ts +95 -0
  36. package/dist/src/generated/typus_perp/math.js +97 -0
  37. package/dist/src/generated/typus_perp/position.d.ts +1251 -0
  38. package/dist/src/generated/typus_perp/position.js +1393 -0
  39. package/dist/src/generated/typus_perp/profit_vault.d.ts +272 -0
  40. package/dist/src/generated/typus_perp/profit_vault.js +321 -0
  41. package/dist/src/generated/typus_perp/symbol.d.ts +47 -0
  42. package/dist/src/generated/typus_perp/symbol.js +97 -0
  43. package/dist/src/generated/typus_perp/trading.d.ts +2134 -0
  44. package/dist/src/generated/typus_perp/trading.js +2050 -0
  45. package/dist/src/generated/typus_perp/treasury_caps.d.ts +44 -0
  46. package/dist/src/generated/typus_perp/treasury_caps.js +92 -0
  47. package/dist/src/generated/typus_perp/user_account.d.ts +146 -0
  48. package/dist/src/generated/typus_perp/user_account.js +221 -0
  49. package/dist/src/generated/typus_stake_pool/admin.d.ts +218 -0
  50. package/dist/src/generated/typus_stake_pool/admin.js +247 -0
  51. package/dist/src/generated/typus_stake_pool/deps/std/type_name.d.ts +17 -0
  52. package/dist/src/generated/typus_stake_pool/deps/std/type_name.js +25 -0
  53. package/dist/src/generated/typus_stake_pool/deps/sui/object.d.ts +8 -0
  54. package/dist/src/generated/typus_stake_pool/deps/sui/object.js +16 -0
  55. package/dist/src/generated/typus_stake_pool/deps/sui/vec_map.d.ts +30 -0
  56. package/dist/src/generated/typus_stake_pool/deps/sui/vec_map.js +37 -0
  57. package/dist/src/generated/typus_stake_pool/deps/sui/vec_set.d.ts +18 -0
  58. package/dist/src/generated/typus_stake_pool/deps/sui/vec_set.js +25 -0
  59. package/dist/src/generated/typus_stake_pool/stake_pool.d.ts +1038 -0
  60. package/dist/src/generated/typus_stake_pool/stake_pool.js +938 -0
  61. package/dist/src/generated/utils/index.d.ts +11 -0
  62. package/dist/src/generated/utils/index.js +138 -0
  63. package/dist/src/grpc/graphql.d.ts +26 -0
  64. package/dist/src/grpc/graphql.js +126 -0
  65. package/dist/src/grpc/grpc.d.ts +1 -0
  66. package/dist/src/grpc/grpc.js +38 -0
  67. package/dist/src/grpc/ledgerService.js +64 -0
  68. package/dist/src/grpc/liveDataService.d.ts +0 -0
  69. package/dist/src/grpc/liveDataService.js +49 -0
  70. package/dist/src/index.d.ts +2 -8
  71. package/dist/src/index.js +30 -56
  72. package/dist/src/user/history.d.ts +1 -1
  73. package/dist/src/user/history.js +649 -679
  74. package/dist/src/user/order.d.ts +21 -11
  75. package/dist/src/user/order.js +204 -301
  76. package/dist/src/user/orderWithBidReceipt.d.ts +17 -6
  77. package/dist/src/user/orderWithBidReceipt.js +164 -224
  78. package/dist/src/user/tlp.d.ts +25 -25
  79. package/dist/src/user/tlp.js +317 -468
  80. package/package.json +11 -2
  81. package/dist/src/_dependencies/source/0x1/ascii/structs.d.ts +0 -88
  82. package/dist/src/_dependencies/source/0x1/ascii/structs.js +0 -398
  83. package/dist/src/_dependencies/source/0x1/index.d.ts +0 -3
  84. package/dist/src/_dependencies/source/0x1/index.js +0 -6
  85. package/dist/src/_dependencies/source/0x1/option/structs.d.ts +0 -50
  86. package/dist/src/_dependencies/source/0x1/option/structs.js +0 -271
  87. package/dist/src/_dependencies/source/0x1/string/structs.d.ts +0 -48
  88. package/dist/src/_dependencies/source/0x1/string/structs.js +0 -256
  89. package/dist/src/_dependencies/source/0x1/type-name/structs.d.ts +0 -49
  90. package/dist/src/_dependencies/source/0x1/type-name/structs.js +0 -223
  91. package/dist/src/_dependencies/source/0x2/bag/structs.d.ts +0 -54
  92. package/dist/src/_dependencies/source/0x2/bag/structs.js +0 -229
  93. package/dist/src/_dependencies/source/0x2/balance/structs.d.ts +0 -84
  94. package/dist/src/_dependencies/source/0x2/balance/structs.js +0 -386
  95. package/dist/src/_dependencies/source/0x2/coin/structs.d.ts +0 -406
  96. package/dist/src/_dependencies/source/0x2/coin/structs.js +0 -1247
  97. package/dist/src/_dependencies/source/0x2/index.d.ts +0 -3
  98. package/dist/src/_dependencies/source/0x2/index.js +0 -6
  99. package/dist/src/_dependencies/source/0x2/linked-table/structs.d.ts +0 -132
  100. package/dist/src/_dependencies/source/0x2/linked-table/structs.js +0 -438
  101. package/dist/src/_dependencies/source/0x2/object/structs.d.ts +0 -86
  102. package/dist/src/_dependencies/source/0x2/object/structs.js +0 -364
  103. package/dist/src/_dependencies/source/0x2/object-table/structs.d.ts +0 -54
  104. package/dist/src/_dependencies/source/0x2/object-table/structs.js +0 -248
  105. package/dist/src/_dependencies/source/0x2/sui/structs.d.ts +0 -44
  106. package/dist/src/_dependencies/source/0x2/sui/structs.js +0 -222
  107. package/dist/src/_dependencies/source/0x2/table/structs.d.ts +0 -54
  108. package/dist/src/_dependencies/source/0x2/table/structs.js +0 -248
  109. package/dist/src/_dependencies/source/0x2/table-vec/structs.d.ts +0 -59
  110. package/dist/src/_dependencies/source/0x2/table-vec/structs.js +0 -274
  111. package/dist/src/_dependencies/source/0x2/token/structs.d.ts +0 -421
  112. package/dist/src/_dependencies/source/0x2/token/structs.js +0 -1095
  113. package/dist/src/_dependencies/source/0x2/transfer-policy/structs.d.ts +0 -348
  114. package/dist/src/_dependencies/source/0x2/transfer-policy/structs.js +0 -1091
  115. package/dist/src/_dependencies/source/0x2/url/structs.d.ts +0 -49
  116. package/dist/src/_dependencies/source/0x2/url/structs.js +0 -223
  117. package/dist/src/_dependencies/source/0x2/vec-map/structs.d.ts +0 -106
  118. package/dist/src/_dependencies/source/0x2/vec-map/structs.js +0 -446
  119. package/dist/src/_dependencies/source/0x2/vec-set/structs.d.ts +0 -49
  120. package/dist/src/_dependencies/source/0x2/vec-set/structs.js +0 -270
  121. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/airdrop/structs.d.ts +0 -422
  122. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/airdrop/structs.js +0 -1084
  123. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/big-vector/structs.d.ts +0 -130
  124. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/big-vector/structs.js +0 -456
  125. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/critbit/structs.d.ts +0 -208
  126. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/critbit/structs.js +0 -653
  127. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/ecosystem/structs.d.ts +0 -362
  128. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/ecosystem/structs.js +0 -899
  129. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/index.d.ts +0 -8
  130. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/index.js +0 -11
  131. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/init.d.ts +0 -2
  132. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/init.js +0 -102
  133. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/keyed-big-vector/structs.d.ts +0 -202
  134. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/keyed-big-vector/structs.js +0 -632
  135. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/leaderboard/structs.d.ts +0 -600
  136. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/leaderboard/structs.js +0 -1459
  137. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/linked-object-table/structs.d.ts +0 -136
  138. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/linked-object-table/structs.js +0 -438
  139. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/linked-set/structs.d.ts +0 -127
  140. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/linked-set/structs.js +0 -430
  141. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tails-staking/structs.d.ts +0 -957
  142. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tails-staking/structs.js +0 -2261
  143. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tgld/structs.d.ts +0 -244
  144. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tgld/structs.js +0 -733
  145. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/user/structs.d.ts +0 -294
  146. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/user/structs.js +0 -892
  147. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/authority/structs.d.ts +0 -73
  148. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/authority/structs.js +0 -263
  149. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/balance-pool/structs.d.ts +0 -294
  150. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/balance-pool/structs.js +0 -591
  151. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/big-vector/structs.d.ts +0 -64
  152. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/big-vector/structs.js +0 -258
  153. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/dutch/structs.d.ts +0 -756
  154. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/dutch/structs.js +0 -1721
  155. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/i64/structs.d.ts +0 -44
  156. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/i64/structs.js +0 -222
  157. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/index.d.ts +0 -3
  158. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/index.js +0 -6
  159. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/init.d.ts +0 -2
  160. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/init.js +0 -89
  161. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/linked-list/structs.d.ts +0 -135
  162. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/linked-list/structs.js +0 -444
  163. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/vault/structs.d.ts +0 -2106
  164. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/vault/structs.js +0 -4952
  165. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/discount-mint/structs.d.ts +0 -390
  166. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/discount-mint/structs.js +0 -844
  167. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/index.d.ts +0 -6
  168. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/index.js +0 -9
  169. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/init.d.ts +0 -2
  170. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/init.js +0 -69
  171. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/royalty-rule/structs.d.ts +0 -89
  172. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/royalty-rule/structs.js +0 -376
  173. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/staking/structs.d.ts +0 -386
  174. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/staking/structs.js +0 -881
  175. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/table-vec/structs.d.ts +0 -59
  176. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/table-vec/structs.js +0 -274
  177. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/typus-nft/structs.d.ts +0 -974
  178. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/typus-nft/structs.js +0 -2387
  179. package/dist/src/_framework/init-loader.d.ts +0 -2
  180. package/dist/src/_framework/loader.d.ts +0 -17
  181. package/dist/src/_framework/loader.js +0 -108
  182. package/dist/src/_framework/reified.d.ts +0 -108
  183. package/dist/src/_framework/reified.js +0 -237
  184. package/dist/src/_framework/util.d.ts +0 -35
  185. package/dist/src/_framework/util.js +0 -396
  186. package/dist/src/_framework/vector.d.ts +0 -42
  187. package/dist/src/_framework/vector.js +0 -112
  188. package/dist/src/pyth.js +0 -1
  189. package/dist/src/typus_perp/admin/functions.d.ts +0 -59
  190. package/dist/src/typus_perp/admin/functions.js +0 -122
  191. package/dist/src/typus_perp/admin/structs.d.ts +0 -467
  192. package/dist/src/typus_perp/admin/structs.js +0 -1065
  193. package/dist/src/typus_perp/competition/functions.d.ts +0 -24
  194. package/dist/src/typus_perp/competition/functions.js +0 -38
  195. package/dist/src/typus_perp/competition/structs.d.ts +0 -80
  196. package/dist/src/typus_perp/competition/structs.js +0 -288
  197. package/dist/src/typus_perp/error/functions.d.ts +0 -73
  198. package/dist/src/typus_perp/error/functions.js +0 -363
  199. package/dist/src/typus_perp/escrow/functions.d.ts +0 -17
  200. package/dist/src/typus_perp/escrow/functions.js +0 -36
  201. package/dist/src/typus_perp/escrow/structs.d.ts +0 -160
  202. package/dist/src/typus_perp/escrow/structs.js +0 -324
  203. package/dist/src/typus_perp/index.d.ts +0 -1
  204. package/dist/src/typus_perp/index.js +0 -7
  205. package/dist/src/typus_perp/init.d.ts +0 -2
  206. package/dist/src/typus_perp/init.js +0 -118
  207. package/dist/src/typus_perp/lending/functions.d.ts +0 -15
  208. package/dist/src/typus_perp/lending/functions.js +0 -22
  209. package/dist/src/typus_perp/lp-pool/functions.d.ts +0 -460
  210. package/dist/src/typus_perp/lp-pool/functions.js +0 -732
  211. package/dist/src/typus_perp/lp-pool/structs.d.ts +0 -3705
  212. package/dist/src/typus_perp/lp-pool/structs.js +0 -6789
  213. package/dist/src/typus_perp/math/functions.d.ts +0 -29
  214. package/dist/src/typus_perp/math/functions.js +0 -61
  215. package/dist/src/typus_perp/position/functions.d.ts +0 -379
  216. package/dist/src/typus_perp/position/functions.js +0 -713
  217. package/dist/src/typus_perp/position/structs.d.ts +0 -905
  218. package/dist/src/typus_perp/position/structs.js +0 -1450
  219. package/dist/src/typus_perp/symbol/functions.d.ts +0 -9
  220. package/dist/src/typus_perp/symbol/functions.js +0 -24
  221. package/dist/src/typus_perp/symbol/structs.d.ts +0 -70
  222. package/dist/src/typus_perp/symbol/structs.js +0 -235
  223. package/dist/src/typus_perp/tlp/functions.d.ts +0 -19
  224. package/dist/src/typus_perp/tlp/functions.js +0 -40
  225. package/dist/src/typus_perp/tlp/structs.d.ts +0 -89
  226. package/dist/src/typus_perp/tlp/structs.js +0 -365
  227. package/dist/src/typus_perp/token-interface/functions.d.ts +0 -11
  228. package/dist/src/typus_perp/token-interface/functions.js +0 -22
  229. package/dist/src/typus_perp/trading/functions.d.ts +0 -812
  230. package/dist/src/typus_perp/trading/functions.js +0 -1218
  231. package/dist/src/typus_perp/trading/structs.d.ts +0 -3060
  232. package/dist/src/typus_perp/trading/structs.js +0 -5813
  233. package/dist/src/typus_perp/treasury-caps/functions.d.ts +0 -9
  234. package/dist/src/typus_perp/treasury-caps/functions.js +0 -36
  235. package/dist/src/typus_perp/treasury-caps/structs.d.ts +0 -49
  236. package/dist/src/typus_perp/treasury-caps/structs.js +0 -223
  237. package/dist/src/typus_perp/user-account/functions.d.ts +0 -36
  238. package/dist/src/typus_perp/user-account/functions.js +0 -70
  239. package/dist/src/typus_perp/user-account/structs.d.ts +0 -148
  240. package/dist/src/typus_perp/user-account/structs.js +0 -448
  241. package/dist/src/typus_stake_pool/admin/functions.d.ts +0 -49
  242. package/dist/src/typus_stake_pool/admin/functions.js +0 -105
  243. package/dist/src/typus_stake_pool/admin/structs.d.ts +0 -365
  244. package/dist/src/typus_stake_pool/admin/structs.js +0 -789
  245. package/dist/src/typus_stake_pool/index.d.ts +0 -1
  246. package/dist/src/typus_stake_pool/index.js +0 -7
  247. package/dist/src/typus_stake_pool/init.d.ts +0 -2
  248. package/dist/src/typus_stake_pool/init.js +0 -69
  249. package/dist/src/typus_stake_pool/stake-pool/functions.d.ts +0 -229
  250. package/dist/src/typus_stake_pool/stake-pool/functions.js +0 -380
  251. package/dist/src/typus_stake_pool/stake-pool/structs.d.ts +0 -2199
  252. package/dist/src/typus_stake_pool/stake-pool/structs.js +0 -4653
  253. /package/dist/src/{pyth.d.ts → grpc/ledgerService.d.ts} +0 -0
@@ -1,235 +1,175 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- 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);
13
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
- 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;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- var __values = (this && this.__values) || function(o) {
39
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
40
- if (m) return m.call(o);
41
- if (o && typeof o.length === "number") return {
42
- next: function () {
43
- if (o && i >= o.length) o = void 0;
44
- return { value: o && o[i++], done: !o };
45
- }
46
- };
47
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
48
- };
49
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.splitBidReceiptTx = splitBidReceiptTx;
50
4
  exports.createTradingOrderWithBidReceiptByAutoBid = createTradingOrderWithBidReceiptByAutoBid;
51
5
  exports.createTradingOrderWithBidReceipt = createTradingOrderWithBidReceipt;
52
6
  exports.reduceOptionCollateralPositionSize = reduceOptionCollateralPositionSize;
53
- var functions_1 = require("../typus_perp/trading/functions");
54
- var utils_1 = require("@typus/typus-sdk/dist/src/utils");
55
- var constants_1 = require("@typus/typus-sdk/dist/src/constants");
56
- var typus_dov_single_v2_1 = require("@typus/typus-sdk/dist/src/typus-dov-single-v2");
57
- var user_entry_1 = require("@typus/typus-sdk/dist/src/auto-bid/user-entry");
58
- var __1 = require("..");
59
- function createTradingOrderWithBidReceiptByAutoBid(config, tx, pythClient, input) {
60
- return __awaiter(this, void 0, void 0, function () {
61
- var TOKEN, BASE_TOKEN, tokens, suiCoin, tokens_1, tokens_1_1, token, collateralBidReceipt, cToken, bToken, baseToken;
62
- var e_1, _a;
63
- return __generator(this, function (_b) {
64
- switch (_b.label) {
65
- case 0:
66
- TOKEN = input.cToken;
67
- BASE_TOKEN = input.tradingToken;
68
- tokens = Array.from(new Set([TOKEN, BASE_TOKEN]));
69
- if (config.sponsored) {
70
- suiCoin = (0, utils_1.splitCoin)(tx, constants_1.tokenType.MAINNET.SUI, input.suiCoins, tokens.length.toString(), config.sponsored);
71
- }
72
- return [4 /*yield*/, (0, utils_1.updatePyth)(pythClient, tx, tokens, suiCoin)];
73
- case 1:
74
- _b.sent();
75
- try {
76
- for (tokens_1 = __values(tokens), tokens_1_1 = tokens_1.next(); !tokens_1_1.done; tokens_1_1 = tokens_1.next()) {
77
- token = tokens_1_1.value;
78
- (0, utils_1.updateOracleWithPythUsd)(pythClient, tx, config.package.oracle, token);
79
- }
80
- }
81
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
82
- finally {
83
- try {
84
- if (tokens_1_1 && !tokens_1_1.done && (_a = tokens_1.return)) _a.call(tokens_1);
85
- }
86
- finally { if (e_1) throw e_1.error; }
87
- }
88
- collateralBidReceipt = (0, user_entry_1.getWithdrawBidReceiptTx)(config, tx, {
89
- vaultIndex: input.index,
90
- signalIndex: input.signalIndex,
91
- strategyIndex: input.strategyIndex,
92
- user: input.user,
93
- });
94
- cToken = constants_1.tokenType[__1.NETWORK][TOKEN];
95
- bToken = constants_1.tokenType[__1.NETWORK][input.bToken];
96
- baseToken = constants_1.tokenType[__1.NETWORK][BASE_TOKEN];
97
- (0, functions_1.createTradingOrderWithBidReceiptV3)(tx, [cToken, bToken, baseToken], {
98
- version: __1.PERP_VERSION,
99
- registry: __1.MARKET,
100
- poolRegistry: __1.LP_POOL,
101
- marketIndex: BigInt(0),
102
- poolIndex: BigInt(0),
103
- typusOracleCToken: constants_1.oracle[__1.NETWORK][TOKEN],
104
- typusOracleTradingSymbol: constants_1.oracle[__1.NETWORK][BASE_TOKEN],
105
- clock: constants_1.CLOCK,
106
- typusEcosystemVersion: config.version.typus,
107
- typusUserRegistry: config.registry.typus.user,
108
- typusLeaderboardRegistry: config.registry.typus.leaderboard,
109
- isLong: input.isLong,
110
- dovRegistry: config.registry.dov.dovSingle,
111
- collateralBidReceipt: collateralBidReceipt,
112
- tailsStakingRegistry: config.registry.typus.tailsStaking,
113
- competitionConfig: __1.COMPETITION_CONFIG,
114
- });
115
- return [2 /*return*/, tx];
116
- }
117
- });
7
+ const trading_1 = require("../../src/generated/typus_perp/trading");
8
+ const utils_1 = require("@typus/typus-sdk/dist/src/utils");
9
+ const constants_1 = require("@typus/typus-sdk/dist/src/constants");
10
+ const typus_dov_single_v2_1 = require("@typus/typus-sdk/dist/src/typus-dov-single-v2");
11
+ const user_entry_1 = require("@typus/typus-sdk/dist/src/auto-bid/user-entry");
12
+ const __1 = require("..");
13
+ function splitBidReceiptTx(client, tx, input) {
14
+ let result = tx.moveCall({
15
+ target: `${client.config.package.dovSingle}::tds_user_entry::simple_split_bid_receipt`,
16
+ typeArguments: [],
17
+ arguments: [
18
+ tx.object(client.config.registry.dov.dovSingle),
19
+ tx.pure.u64(input.index),
20
+ tx.makeMoveVec({
21
+ type: `${client.config.packageOrigin.framework}::vault::TypusBidReceipt`,
22
+ elements: input.receipts.map((receipt) => tx.object(receipt)),
23
+ }),
24
+ tx.pure.option("u64", input.share),
25
+ ],
118
26
  });
119
- }
120
- function createTradingOrderWithBidReceipt(config, tx, pythClient, input) {
121
- return __awaiter(this, void 0, void 0, function () {
122
- var TOKEN, BASE_TOKEN, tokens, suiCoin, tokens_2, tokens_2_1, token, collateralBidReceipt, cToken, bToken, baseToken;
123
- var e_2, _a;
124
- return __generator(this, function (_b) {
125
- switch (_b.label) {
126
- case 0:
127
- TOKEN = input.cToken;
128
- BASE_TOKEN = input.tradingToken;
129
- tokens = Array.from(new Set([TOKEN, BASE_TOKEN]));
130
- if (config.sponsored) {
131
- suiCoin = (0, utils_1.splitCoin)(tx, constants_1.tokenType.MAINNET.SUI, input.suiCoins, tokens.length.toString(), config.sponsored);
132
- }
133
- return [4 /*yield*/, (0, utils_1.updatePyth)(pythClient, tx, tokens, suiCoin)];
134
- case 1:
135
- _b.sent();
136
- try {
137
- for (tokens_2 = __values(tokens), tokens_2_1 = tokens_2.next(); !tokens_2_1.done; tokens_2_1 = tokens_2.next()) {
138
- token = tokens_2_1.value;
139
- (0, utils_1.updateOracleWithPythUsd)(pythClient, tx, config.package.oracle, token);
140
- }
141
- }
142
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
143
- finally {
144
- try {
145
- if (tokens_2_1 && !tokens_2_1.done && (_a = tokens_2.return)) _a.call(tokens_2);
146
- }
147
- finally { if (e_2) throw e_2.error; }
148
- }
149
- collateralBidReceipt = (0, typus_dov_single_v2_1.getSplitBidReceiptTx)(config, tx, {
150
- index: input.index,
151
- receipts: input.bidReceipts,
152
- share: input.share, // if undefined, merge all receipts
153
- recipient: input.user,
154
- });
155
- cToken = constants_1.tokenType[__1.NETWORK][TOKEN];
156
- bToken = constants_1.tokenType[__1.NETWORK][input.bToken];
157
- baseToken = constants_1.tokenType[__1.NETWORK][BASE_TOKEN];
158
- (0, functions_1.createTradingOrderWithBidReceiptV3)(tx, [cToken, bToken, baseToken], {
159
- version: __1.PERP_VERSION,
160
- registry: __1.MARKET,
161
- poolRegistry: __1.LP_POOL,
162
- marketIndex: BigInt(0),
163
- poolIndex: BigInt(0),
164
- typusOracleCToken: constants_1.oracle[__1.NETWORK][TOKEN],
165
- typusOracleTradingSymbol: constants_1.oracle[__1.NETWORK][BASE_TOKEN],
166
- clock: constants_1.CLOCK,
167
- typusEcosystemVersion: config.version.typus,
168
- typusUserRegistry: config.registry.typus.user,
169
- typusLeaderboardRegistry: config.registry.typus.leaderboard,
170
- isLong: input.isLong,
171
- dovRegistry: config.registry.dov.dovSingle,
172
- collateralBidReceipt: collateralBidReceipt,
173
- tailsStakingRegistry: config.registry.typus.tailsStaking,
174
- competitionConfig: __1.COMPETITION_CONFIG,
175
- });
176
- return [2 /*return*/, tx];
177
- }
178
- });
27
+ let unwrap0 = tx.moveCall({
28
+ target: `0x1::option::destroy_some`,
29
+ typeArguments: [`${client.config.packageOrigin.framework}::vault::TypusBidReceipt`],
30
+ arguments: [tx.object(result[0])],
31
+ });
32
+ tx.moveCall({
33
+ target: `${client.config.package.framework}::vault::transfer_bid_receipt`,
34
+ typeArguments: [],
35
+ arguments: [tx.object(result[1]), tx.pure.address(input.recipient)],
179
36
  });
37
+ return unwrap0;
180
38
  }
181
- function reduceOptionCollateralPositionSize(config, tx, pythClient, input) {
182
- return __awaiter(this, void 0, void 0, function () {
183
- var TOKEN, BASE_TOKEN, tokens, suiCoin, tokens_3, tokens_3_1, token, cToken, bToken, baseToken;
184
- var e_3, _a;
185
- return __generator(this, function (_b) {
186
- switch (_b.label) {
187
- case 0:
188
- TOKEN = input.cToken;
189
- BASE_TOKEN = input.tradingToken;
190
- tokens = Array.from(new Set([TOKEN, BASE_TOKEN]));
191
- if (config.sponsored) {
192
- suiCoin = (0, utils_1.splitCoin)(tx, constants_1.tokenType.MAINNET.SUI, input.suiCoins, tokens.length.toString(), config.sponsored);
193
- }
194
- return [4 /*yield*/, (0, utils_1.updatePyth)(pythClient, tx, tokens, suiCoin)];
195
- case 1:
196
- _b.sent();
197
- try {
198
- for (tokens_3 = __values(tokens), tokens_3_1 = tokens_3.next(); !tokens_3_1.done; tokens_3_1 = tokens_3.next()) {
199
- token = tokens_3_1.value;
200
- (0, utils_1.updateOracleWithPythUsd)(pythClient, tx, config.package.oracle, token);
201
- }
202
- }
203
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
204
- finally {
205
- try {
206
- if (tokens_3_1 && !tokens_3_1.done && (_a = tokens_3.return)) _a.call(tokens_3);
207
- }
208
- finally { if (e_3) throw e_3.error; }
209
- }
210
- cToken = constants_1.tokenType[__1.NETWORK][TOKEN];
211
- bToken = constants_1.tokenType[__1.NETWORK][input.bToken];
212
- baseToken = constants_1.tokenType[__1.NETWORK][BASE_TOKEN];
213
- (0, functions_1.reduceOptionCollateralPositionSizeV2)(tx, [cToken, bToken, baseToken], {
214
- version: __1.PERP_VERSION,
215
- registry: __1.MARKET,
216
- poolRegistry: __1.LP_POOL,
217
- marketIndex: BigInt(0),
218
- poolIndex: BigInt(0),
219
- typusOracleCToken: constants_1.oracle[__1.NETWORK][TOKEN],
220
- typusOracleTradingSymbol: constants_1.oracle[__1.NETWORK][BASE_TOKEN],
221
- clock: constants_1.CLOCK,
222
- typusEcosystemVersion: config.version.typus,
223
- typusUserRegistry: config.registry.typus.user,
224
- typusLeaderboardRegistry: config.registry.typus.leaderboard,
225
- dovRegistry: config.registry.dov.dovSingle,
226
- positionId: BigInt(input.positionId),
227
- orderSize: input.orderSize ? BigInt(input.orderSize) : null,
228
- tailsStakingRegistry: config.registry.typus.tailsStaking,
229
- competitionConfig: __1.COMPETITION_CONFIG,
230
- });
231
- return [2 /*return*/, tx];
232
- }
39
+ async function createTradingOrderWithBidReceiptByAutoBid(client, tx, input) {
40
+ // INPUTS
41
+ let TOKEN = input.cToken;
42
+ let BASE_TOKEN = input.tradingToken;
43
+ let tokens = Array.from(new Set([TOKEN, BASE_TOKEN]));
44
+ let suiCoin;
45
+ if (client.config.sponsored) {
46
+ suiCoin = (0, utils_1.splitCoin)(tx, constants_1.tokenType.MAINNET.SUI, input.suiCoins, tokens.length.toString(), client.config.sponsored);
47
+ }
48
+ await (0, utils_1.updatePyth)(client.pythClient, tx, tokens, suiCoin);
49
+ for (let token of tokens) {
50
+ (0, utils_1.updateOracleWithPythUsd)(client.pythClient, tx, client.config.package.oracle, token);
51
+ }
52
+ let withdrawBidReceipt = (0, user_entry_1.getWithdrawBidReceiptTx)(client.config, tx, {
53
+ vaultIndex: input.dovIndex,
54
+ signalIndex: input.signalIndex,
55
+ strategyIndex: input.strategyIndex,
56
+ user: input.user,
57
+ });
58
+ let collateralBidReceipt = withdrawBidReceipt;
59
+ // split bid receipt
60
+ if (input.share) {
61
+ let splitBidReceipt = splitBidReceiptTx(client, tx, {
62
+ index: input.dovIndex,
63
+ receipts: [withdrawBidReceipt],
64
+ share: input.share, // if undefined, merge all receipts
65
+ recipient: input.user,
233
66
  });
67
+ collateralBidReceipt = splitBidReceipt;
68
+ }
69
+ let cToken = constants_1.tokenType[__1.NETWORK][TOKEN];
70
+ let bToken = constants_1.tokenType[__1.NETWORK][input.bToken];
71
+ let baseToken = constants_1.tokenType[__1.NETWORK][BASE_TOKEN];
72
+ tx.add((0, trading_1.createTradingOrderWithBidReceipt)({
73
+ arguments: {
74
+ version: __1.PERP_VERSION,
75
+ registry: __1.MARKET,
76
+ poolRegistry: __1.LP_POOL,
77
+ marketIndex: BigInt(input.perpIndex),
78
+ poolIndex: BigInt(input.poolIndex),
79
+ typusOracleCToken: constants_1.oracle[__1.NETWORK][TOKEN],
80
+ typusOracleTradingSymbol: constants_1.oracle[__1.NETWORK][BASE_TOKEN],
81
+ typusEcosystemVersion: client.config.version.typus,
82
+ typusUserRegistry: client.config.registry.typus.user,
83
+ typusLeaderboardRegistry: client.config.registry.typus.leaderboard,
84
+ isLong: input.isLong,
85
+ dovRegistry: client.config.registry.dov.dovSingle,
86
+ collateralBidReceipt,
87
+ tailsStakingRegistry: client.config.registry.typus.tailsStaking,
88
+ competitionConfig: __1.COMPETITION_CONFIG,
89
+ },
90
+ typeArguments: [cToken, bToken, baseToken],
91
+ }));
92
+ return tx;
93
+ }
94
+ async function createTradingOrderWithBidReceipt(client, tx, input) {
95
+ // INPUTS
96
+ let TOKEN = input.cToken;
97
+ let BASE_TOKEN = input.tradingToken;
98
+ let tokens = Array.from(new Set([TOKEN, BASE_TOKEN]));
99
+ let suiCoin;
100
+ if (client.config.sponsored) {
101
+ suiCoin = (0, utils_1.splitCoin)(tx, constants_1.tokenType.MAINNET.SUI, input.suiCoins, tokens.length.toString(), client.config.sponsored);
102
+ }
103
+ await (0, utils_1.updatePyth)(client.pythClient, tx, tokens, suiCoin);
104
+ for (let token of tokens) {
105
+ (0, utils_1.updateOracleWithPythUsd)(client.pythClient, tx, client.config.package.oracle, token);
106
+ }
107
+ // split bid receipt
108
+ let collateralBidReceipt = (0, typus_dov_single_v2_1.getSplitBidReceiptTx)(client.config, tx, {
109
+ index: input.index,
110
+ receipts: input.bidReceipts,
111
+ share: input.share, // if undefined, merge all receipts
112
+ recipient: input.user,
234
113
  });
114
+ let cToken = constants_1.tokenType[__1.NETWORK][TOKEN];
115
+ let bToken = constants_1.tokenType[__1.NETWORK][input.bToken];
116
+ let baseToken = constants_1.tokenType[__1.NETWORK][BASE_TOKEN];
117
+ tx.add((0, trading_1.createTradingOrderWithBidReceipt)({
118
+ arguments: {
119
+ version: __1.PERP_VERSION,
120
+ registry: __1.MARKET,
121
+ poolRegistry: __1.LP_POOL,
122
+ marketIndex: BigInt(input.perpIndex),
123
+ poolIndex: BigInt(input.poolIndex),
124
+ typusOracleCToken: constants_1.oracle[__1.NETWORK][TOKEN],
125
+ typusOracleTradingSymbol: constants_1.oracle[__1.NETWORK][BASE_TOKEN],
126
+ typusEcosystemVersion: client.config.version.typus,
127
+ typusUserRegistry: client.config.registry.typus.user,
128
+ typusLeaderboardRegistry: client.config.registry.typus.leaderboard,
129
+ isLong: input.isLong,
130
+ dovRegistry: client.config.registry.dov.dovSingle,
131
+ collateralBidReceipt,
132
+ tailsStakingRegistry: client.config.registry.typus.tailsStaking,
133
+ competitionConfig: __1.COMPETITION_CONFIG,
134
+ },
135
+ typeArguments: [cToken, bToken, baseToken],
136
+ }));
137
+ return tx;
138
+ }
139
+ async function reduceOptionCollateralPositionSize(client, tx, input) {
140
+ let TOKEN = input.cToken;
141
+ let BASE_TOKEN = input.tradingToken;
142
+ let tokens = Array.from(new Set([TOKEN, BASE_TOKEN]));
143
+ let suiCoin;
144
+ if (client.config.sponsored) {
145
+ suiCoin = (0, utils_1.splitCoin)(tx, constants_1.tokenType.MAINNET.SUI, input.suiCoins, tokens.length.toString(), client.config.sponsored);
146
+ }
147
+ await (0, utils_1.updatePyth)(client.pythClient, tx, tokens, suiCoin);
148
+ for (let token of tokens) {
149
+ (0, utils_1.updateOracleWithPythUsd)(client.pythClient, tx, client.config.package.oracle, token);
150
+ }
151
+ let cToken = constants_1.tokenType[__1.NETWORK][TOKEN];
152
+ let bToken = constants_1.tokenType[__1.NETWORK][input.bToken];
153
+ let baseToken = constants_1.tokenType[__1.NETWORK][BASE_TOKEN];
154
+ tx.add((0, trading_1.reduceOptionCollateralPositionSize)({
155
+ arguments: {
156
+ version: __1.PERP_VERSION,
157
+ registry: __1.MARKET,
158
+ poolRegistry: __1.LP_POOL,
159
+ marketIndex: BigInt(input.perpIndex),
160
+ poolIndex: BigInt(input.perpIndex),
161
+ typusOracleCToken: constants_1.oracle[__1.NETWORK][TOKEN],
162
+ typusOracleTradingSymbol: constants_1.oracle[__1.NETWORK][BASE_TOKEN],
163
+ typusEcosystemVersion: client.config.version.typus,
164
+ typusUserRegistry: client.config.registry.typus.user,
165
+ typusLeaderboardRegistry: client.config.registry.typus.leaderboard,
166
+ dovRegistry: client.config.registry.dov.dovSingle,
167
+ positionId: BigInt(input.positionId),
168
+ orderSize: input.orderSize ? BigInt(input.orderSize) : null,
169
+ tailsStakingRegistry: client.config.registry.typus.tailsStaking,
170
+ competitionConfig: __1.COMPETITION_CONFIG,
171
+ },
172
+ typeArguments: [cToken, bToken, baseToken],
173
+ }));
174
+ return tx;
235
175
  }
@@ -1,14 +1,14 @@
1
1
  import { Transaction } from "@mysten/sui/transactions";
2
- import { LiquidityPool } from "../typus_perp/lp-pool/structs";
3
- import { PythClient, TypusConfig } from "@typus/typus-sdk/dist/src/utils";
4
2
  import { TOKEN } from "@typus/typus-sdk/dist/src/constants";
5
- import { StakePool } from "../../src/typus_stake_pool/stake-pool/structs";
6
- export declare function snapshot(config: TypusConfig, tx: Transaction, input: {
7
- userShareId: string;
3
+ import { StakePool } from "../../src/generated/typus_stake_pool/stake_pool";
4
+ import { LiquidityPool } from "../../src/generated/typus_perp/lp_pool";
5
+ import { TypusClient } from "../../src/client";
6
+ export declare function snapshot(client: TypusClient, tx: Transaction, input: {
7
+ perpIndex: string;
8
8
  }): Promise<Transaction>;
9
- export declare function mintStakeLp(config: TypusConfig, tx: Transaction, pythClient: PythClient, input: {
10
- lpPool: LiquidityPool;
11
- stakePool: StakePool;
9
+ export declare function mintStakeLp(client: TypusClient, tx: Transaction, input: {
10
+ lpPool: typeof LiquidityPool.$inferType;
11
+ stakePool: typeof StakePool.$inferType;
12
12
  coins: string[];
13
13
  cTOKEN: TOKEN;
14
14
  amount: string;
@@ -18,52 +18,52 @@ export declare function mintStakeLp(config: TypusConfig, tx: Transaction, pythCl
18
18
  stake: boolean;
19
19
  suiCoins?: string[];
20
20
  }): Promise<Transaction>;
21
- export declare function stakeLp(config: TypusConfig, tx: Transaction, input: {
22
- stakePool: StakePool;
21
+ export declare function stakeLp(client: TypusClient, tx: Transaction, input: {
22
+ stakePool: typeof StakePool.$inferType;
23
23
  lpCoins: string[];
24
24
  amount: string;
25
25
  userShareId: string | null;
26
26
  user: string;
27
27
  }): Promise<Transaction>;
28
- export declare function unstake(config: TypusConfig, tx: Transaction, input: {
29
- lpPool: LiquidityPool;
30
- stakePool: StakePool;
28
+ export declare function unstake(client: TypusClient, tx: Transaction, input: {
29
+ lpPool: typeof LiquidityPool.$inferType;
30
+ stakePool: typeof StakePool.$inferType;
31
31
  userShareId: string;
32
32
  share: string | null;
33
33
  user: string;
34
34
  }): Promise<Transaction>;
35
- export declare function unstakeRedeem(config: TypusConfig, tx: Transaction, pythClient: PythClient, input: {
36
- lpPool: LiquidityPool;
37
- stakePool: StakePool;
35
+ export declare function unstakeRedeem(client: TypusClient, tx: Transaction, input: {
36
+ lpPool: typeof LiquidityPool.$inferType;
37
+ stakePool: typeof StakePool.$inferType;
38
38
  userShareId: string;
39
39
  share: string | null;
40
40
  user: string;
41
41
  suiCoins?: string[];
42
42
  }): Promise<Transaction>;
43
- export declare function redeemTlp(config: TypusConfig, tx: Transaction, pythClient: PythClient, input: {
44
- lpPool: LiquidityPool;
43
+ export declare function redeemTlp(client: TypusClient, tx: Transaction, input: {
44
+ lpPool: typeof LiquidityPool.$inferType;
45
45
  lpCoins: string[];
46
46
  share: string | null;
47
47
  user: string;
48
48
  suiCoins?: string[];
49
49
  }): Promise<Transaction>;
50
- export declare function claim(config: TypusConfig, tx: Transaction, pythClient: PythClient, input: {
51
- lpPool: LiquidityPool;
52
- stakePool: StakePool;
50
+ export declare function claim(client: TypusClient, tx: Transaction, input: {
51
+ lpPool: typeof LiquidityPool.$inferType;
52
+ stakePool: typeof StakePool.$inferType;
53
53
  cTOKEN: TOKEN;
54
54
  user: string;
55
55
  suiCoins?: string[];
56
56
  }): Promise<Transaction>;
57
- export declare function swap(config: TypusConfig, tx: Transaction, pythClient: PythClient, input: {
57
+ export declare function swap(client: TypusClient, tx: Transaction, input: {
58
58
  coins: string[];
59
59
  FROM_TOKEN: TOKEN;
60
60
  TO_TOKEN: TOKEN;
61
61
  amount: string;
62
62
  user: string;
63
+ perpIndex: number;
63
64
  suiCoins?: string[];
64
65
  }): Promise<Transaction>;
65
- export declare function harvestStakeReward(config: TypusConfig, tx: Transaction, input: {
66
- stakePool: StakePool;
67
- userShareId: string;
66
+ export declare function harvestStakeReward(client: TypusClient, tx: Transaction, input: {
67
+ stakePool: typeof StakePool.$inferType;
68
68
  user: string;
69
69
  }): Promise<Transaction>;