@typus/typus-perp-sdk 1.1.29 → 1.1.30-codegen

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/api/sentio.js +604 -538
  2. package/dist/src/client.d.ts +27 -0
  3. package/dist/src/client.js +108 -0
  4. package/dist/src/fetch.d.ts +160 -34
  5. package/dist/src/fetch.js +365 -665
  6. package/dist/src/generated/typus_perp/admin.d.ts +117 -0
  7. package/dist/src/generated/typus_perp/admin.js +110 -0
  8. package/dist/src/generated/typus_perp/competition.d.ts +22 -0
  9. package/dist/src/generated/typus_perp/competition.js +58 -0
  10. package/dist/src/generated/typus_perp/deps/std/type_name.d.ts +17 -0
  11. package/dist/src/generated/typus_perp/deps/std/type_name.js +25 -0
  12. package/dist/src/generated/typus_perp/deps/sui/balance.d.ts +12 -0
  13. package/dist/src/generated/typus_perp/deps/sui/balance.js +20 -0
  14. package/dist/src/generated/typus_perp/deps/sui/object.d.ts +8 -0
  15. package/dist/src/generated/typus_perp/deps/sui/object.js +16 -0
  16. package/dist/src/generated/typus_perp/deps/sui/object_table.d.ts +19 -0
  17. package/dist/src/generated/typus_perp/deps/sui/object_table.js +59 -0
  18. package/dist/src/generated/typus_perp/deps/sui/vec_set.d.ts +18 -0
  19. package/dist/src/generated/typus_perp/deps/sui/vec_set.js +25 -0
  20. package/dist/src/generated/typus_perp/deps/typus/keyed_big_vector.d.ts +30 -0
  21. package/dist/src/generated/typus_perp/deps/typus/keyed_big_vector.js +67 -0
  22. package/dist/src/generated/typus_perp/deps/typus/linked_object_table.d.ts +32 -0
  23. package/dist/src/generated/typus_perp/deps/typus/linked_object_table.js +71 -0
  24. package/dist/src/generated/typus_perp/deps/typus_framework/vault.d.ts +23 -0
  25. package/dist/src/generated/typus_perp/deps/typus_framework/vault.js +61 -0
  26. package/dist/src/generated/typus_perp/escrow.d.ts +59 -0
  27. package/dist/src/generated/typus_perp/escrow.js +76 -0
  28. package/dist/src/generated/typus_perp/lending.d.ts +47 -0
  29. package/dist/src/generated/typus_perp/lending.js +50 -0
  30. package/dist/src/generated/typus_perp/lp_pool.d.ts +2327 -0
  31. package/dist/src/generated/typus_perp/lp_pool.js +1956 -0
  32. package/dist/src/generated/typus_perp/math.d.ts +95 -0
  33. package/dist/src/generated/typus_perp/math.js +97 -0
  34. package/dist/src/generated/typus_perp/position.d.ts +234 -0
  35. package/dist/src/generated/typus_perp/position.js +204 -0
  36. package/dist/src/generated/typus_perp/symbol.d.ts +18 -0
  37. package/dist/src/generated/typus_perp/symbol.js +55 -0
  38. package/dist/src/generated/typus_perp/tlp.d.ts +13 -0
  39. package/dist/src/generated/typus_perp/tlp.js +56 -0
  40. package/dist/src/generated/typus_perp/trading.d.ts +2486 -0
  41. package/dist/src/generated/typus_perp/trading.js +2476 -0
  42. package/dist/src/generated/typus_perp/treasury_caps.d.ts +13 -0
  43. package/dist/src/{_framework/init-loader.js → generated/typus_perp/treasury_caps.js} +17 -10
  44. package/dist/src/generated/typus_perp/user_account.d.ts +40 -0
  45. package/dist/src/generated/typus_perp/user_account.js +72 -0
  46. package/dist/src/generated/typus_stake_pool/admin.d.ts +100 -0
  47. package/dist/src/generated/typus_stake_pool/admin.js +91 -0
  48. package/dist/src/generated/typus_stake_pool/deps/std/type_name.d.ts +17 -0
  49. package/dist/src/generated/typus_stake_pool/deps/std/type_name.js +25 -0
  50. package/dist/src/generated/typus_stake_pool/deps/sui/object.d.ts +8 -0
  51. package/dist/src/generated/typus_stake_pool/deps/sui/object.js +16 -0
  52. package/dist/src/generated/typus_stake_pool/deps/sui/vec_map.d.ts +30 -0
  53. package/dist/src/generated/typus_stake_pool/deps/sui/vec_map.js +37 -0
  54. package/dist/src/generated/typus_stake_pool/deps/sui/vec_set.d.ts +18 -0
  55. package/dist/src/generated/typus_stake_pool/deps/sui/vec_set.js +25 -0
  56. package/dist/src/generated/typus_stake_pool/stake_pool.d.ts +1023 -0
  57. package/dist/src/generated/typus_stake_pool/stake_pool.js +918 -0
  58. package/dist/src/generated/utils/index.d.ts +11 -0
  59. package/dist/src/generated/utils/index.js +135 -0
  60. package/dist/src/grpc/graphql.d.ts +26 -0
  61. package/dist/src/grpc/graphql.js +126 -0
  62. package/dist/src/grpc/grpc.d.ts +1 -0
  63. package/dist/src/grpc/grpc.js +38 -0
  64. package/dist/src/grpc/ledgerService.js +64 -0
  65. package/dist/src/grpc/liveDataService.d.ts +0 -0
  66. package/dist/src/grpc/liveDataService.js +49 -0
  67. package/dist/src/index.d.ts +1 -4
  68. package/dist/src/index.js +21 -39
  69. package/dist/src/user/history.js +611 -680
  70. package/dist/src/user/order.d.ts +11 -11
  71. package/dist/src/user/order.js +171 -302
  72. package/dist/src/user/orderWithBidReceipt.d.ts +8 -5
  73. package/dist/src/user/orderWithBidReceipt.js +127 -225
  74. package/dist/src/user/tlp.d.ts +32 -23
  75. package/dist/src/user/tlp.js +316 -468
  76. package/package.json +12 -3
  77. package/dist/src/_dependencies/source/0x1/ascii/structs.d.ts +0 -92
  78. package/dist/src/_dependencies/source/0x1/ascii/structs.js +0 -398
  79. package/dist/src/_dependencies/source/0x1/index.d.ts +0 -3
  80. package/dist/src/_dependencies/source/0x1/index.js +0 -6
  81. package/dist/src/_dependencies/source/0x1/option/structs.d.ts +0 -52
  82. package/dist/src/_dependencies/source/0x1/option/structs.js +0 -271
  83. package/dist/src/_dependencies/source/0x1/string/structs.d.ts +0 -50
  84. package/dist/src/_dependencies/source/0x1/string/structs.js +0 -256
  85. package/dist/src/_dependencies/source/0x1/type-name/structs.d.ts +0 -53
  86. package/dist/src/_dependencies/source/0x1/type-name/structs.js +0 -223
  87. package/dist/src/_dependencies/source/0x2/bag/structs.d.ts +0 -61
  88. package/dist/src/_dependencies/source/0x2/bag/structs.js +0 -229
  89. package/dist/src/_dependencies/source/0x2/balance/structs.d.ts +0 -88
  90. package/dist/src/_dependencies/source/0x2/balance/structs.js +0 -386
  91. package/dist/src/_dependencies/source/0x2/coin/structs.d.ts +0 -460
  92. package/dist/src/_dependencies/source/0x2/coin/structs.js +0 -1247
  93. package/dist/src/_dependencies/source/0x2/index.d.ts +0 -3
  94. package/dist/src/_dependencies/source/0x2/index.js +0 -6
  95. package/dist/src/_dependencies/source/0x2/linked-table/structs.d.ts +0 -153
  96. package/dist/src/_dependencies/source/0x2/linked-table/structs.js +0 -438
  97. package/dist/src/_dependencies/source/0x2/object/structs.d.ts +0 -92
  98. package/dist/src/_dependencies/source/0x2/object/structs.js +0 -364
  99. package/dist/src/_dependencies/source/0x2/object-table/structs.d.ts +0 -61
  100. package/dist/src/_dependencies/source/0x2/object-table/structs.js +0 -248
  101. package/dist/src/_dependencies/source/0x2/sui/structs.d.ts +0 -46
  102. package/dist/src/_dependencies/source/0x2/sui/structs.js +0 -222
  103. package/dist/src/_dependencies/source/0x2/table/structs.d.ts +0 -61
  104. package/dist/src/_dependencies/source/0x2/table/structs.js +0 -248
  105. package/dist/src/_dependencies/source/0x2/table-vec/structs.d.ts +0 -68
  106. package/dist/src/_dependencies/source/0x2/table-vec/structs.js +0 -274
  107. package/dist/src/_dependencies/source/0x2/token/structs.d.ts +0 -449
  108. package/dist/src/_dependencies/source/0x2/token/structs.js +0 -1095
  109. package/dist/src/_dependencies/source/0x2/transfer-policy/structs.d.ts +0 -370
  110. package/dist/src/_dependencies/source/0x2/transfer-policy/structs.js +0 -1091
  111. package/dist/src/_dependencies/source/0x2/url/structs.d.ts +0 -53
  112. package/dist/src/_dependencies/source/0x2/url/structs.js +0 -223
  113. package/dist/src/_dependencies/source/0x2/vec-map/structs.d.ts +0 -111
  114. package/dist/src/_dependencies/source/0x2/vec-map/structs.js +0 -446
  115. package/dist/src/_dependencies/source/0x2/vec-set/structs.d.ts +0 -51
  116. package/dist/src/_dependencies/source/0x2/vec-set/structs.js +0 -270
  117. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/airdrop/structs.d.ts +0 -489
  118. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/airdrop/structs.js +0 -1084
  119. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/big-vector/structs.d.ts +0 -147
  120. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/big-vector/structs.js +0 -456
  121. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/critbit/structs.d.ts +0 -239
  122. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/critbit/structs.js +0 -653
  123. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/ecosystem/structs.d.ts +0 -405
  124. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/ecosystem/structs.js +0 -899
  125. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/index.d.ts +0 -8
  126. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/index.js +0 -11
  127. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/init.d.ts +0 -2
  128. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/init.js +0 -102
  129. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/keyed-big-vector/structs.d.ts +0 -227
  130. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/keyed-big-vector/structs.js +0 -632
  131. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/leaderboard/structs.d.ts +0 -699
  132. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/leaderboard/structs.js +0 -1459
  133. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/linked-object-table/structs.d.ts +0 -161
  134. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/linked-object-table/structs.js +0 -438
  135. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/linked-set/structs.d.ts +0 -147
  136. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/linked-set/structs.js +0 -430
  137. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tails-staking/structs.d.ts +0 -1071
  138. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tails-staking/structs.js +0 -2261
  139. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tgld/structs.d.ts +0 -279
  140. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/tgld/structs.js +0 -733
  141. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/user/structs.d.ts +0 -328
  142. package/dist/src/_dependencies/source/0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a/user/structs.js +0 -892
  143. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/authority/structs.d.ts +0 -88
  144. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/authority/structs.js +0 -263
  145. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/balance-pool/structs.d.ts +0 -347
  146. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/balance-pool/structs.js +0 -591
  147. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/big-vector/structs.d.ts +0 -73
  148. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/big-vector/structs.js +0 -258
  149. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/dutch/structs.d.ts +0 -876
  150. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/dutch/structs.js +0 -1721
  151. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/i64/structs.d.ts +0 -46
  152. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/i64/structs.js +0 -222
  153. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/index.d.ts +0 -3
  154. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/index.js +0 -6
  155. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/init.d.ts +0 -2
  156. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/init.js +0 -89
  157. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/linked-list/structs.d.ts +0 -155
  158. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/linked-list/structs.js +0 -444
  159. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/vault/structs.d.ts +0 -2386
  160. package/dist/src/_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/vault/structs.js +0 -4952
  161. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/discount-mint/structs.d.ts +0 -446
  162. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/discount-mint/structs.js +0 -844
  163. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/index.d.ts +0 -6
  164. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/index.js +0 -9
  165. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/init.d.ts +0 -2
  166. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/init.js +0 -69
  167. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/royalty-rule/structs.d.ts +0 -94
  168. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/royalty-rule/structs.js +0 -376
  169. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/staking/structs.d.ts +0 -454
  170. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/staking/structs.js +0 -881
  171. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/table-vec/structs.d.ts +0 -68
  172. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/table-vec/structs.js +0 -274
  173. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/typus-nft/structs.d.ts +0 -1117
  174. package/dist/src/_dependencies/source/0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196/typus-nft/structs.js +0 -2387
  175. package/dist/src/_framework/init-loader.d.ts +0 -2
  176. package/dist/src/_framework/loader.d.ts +0 -17
  177. package/dist/src/_framework/loader.js +0 -108
  178. package/dist/src/_framework/reified.d.ts +0 -108
  179. package/dist/src/_framework/reified.js +0 -237
  180. package/dist/src/_framework/util.d.ts +0 -35
  181. package/dist/src/_framework/util.js +0 -396
  182. package/dist/src/_framework/vector.d.ts +0 -35
  183. package/dist/src/_framework/vector.js +0 -112
  184. package/dist/src/pyth.js +0 -1
  185. package/dist/src/typus_perp/admin/functions.d.ts +0 -59
  186. package/dist/src/typus_perp/admin/functions.js +0 -122
  187. package/dist/src/typus_perp/admin/structs.d.ts +0 -529
  188. package/dist/src/typus_perp/admin/structs.js +0 -1065
  189. package/dist/src/typus_perp/competition/functions.d.ts +0 -24
  190. package/dist/src/typus_perp/competition/functions.js +0 -38
  191. package/dist/src/typus_perp/competition/structs.d.ts +0 -92
  192. package/dist/src/typus_perp/competition/structs.js +0 -288
  193. package/dist/src/typus_perp/error/functions.d.ts +0 -73
  194. package/dist/src/typus_perp/error/functions.js +0 -363
  195. package/dist/src/typus_perp/escrow/functions.d.ts +0 -17
  196. package/dist/src/typus_perp/escrow/functions.js +0 -36
  197. package/dist/src/typus_perp/escrow/structs.d.ts +0 -172
  198. package/dist/src/typus_perp/escrow/structs.js +0 -324
  199. package/dist/src/typus_perp/index.d.ts +0 -1
  200. package/dist/src/typus_perp/index.js +0 -7
  201. package/dist/src/typus_perp/init.d.ts +0 -2
  202. package/dist/src/typus_perp/init.js +0 -118
  203. package/dist/src/typus_perp/lending/functions.d.ts +0 -15
  204. package/dist/src/typus_perp/lending/functions.js +0 -22
  205. package/dist/src/typus_perp/lp-pool/functions.d.ts +0 -460
  206. package/dist/src/typus_perp/lp-pool/functions.js +0 -732
  207. package/dist/src/typus_perp/lp-pool/structs.d.ts +0 -4268
  208. package/dist/src/typus_perp/lp-pool/structs.js +0 -6789
  209. package/dist/src/typus_perp/math/functions.d.ts +0 -29
  210. package/dist/src/typus_perp/math/functions.js +0 -61
  211. package/dist/src/typus_perp/position/functions.d.ts +0 -379
  212. package/dist/src/typus_perp/position/functions.js +0 -713
  213. package/dist/src/typus_perp/position/structs.d.ts +0 -1064
  214. package/dist/src/typus_perp/position/structs.js +0 -1450
  215. package/dist/src/typus_perp/symbol/functions.d.ts +0 -9
  216. package/dist/src/typus_perp/symbol/functions.js +0 -24
  217. package/dist/src/typus_perp/symbol/structs.d.ts +0 -81
  218. package/dist/src/typus_perp/symbol/structs.js +0 -235
  219. package/dist/src/typus_perp/tlp/functions.d.ts +0 -19
  220. package/dist/src/typus_perp/tlp/functions.js +0 -40
  221. package/dist/src/typus_perp/tlp/structs.d.ts +0 -97
  222. package/dist/src/typus_perp/tlp/structs.js +0 -365
  223. package/dist/src/typus_perp/token-interface/functions.d.ts +0 -11
  224. package/dist/src/typus_perp/token-interface/functions.js +0 -22
  225. package/dist/src/typus_perp/trading/functions.d.ts +0 -812
  226. package/dist/src/typus_perp/trading/functions.js +0 -1218
  227. package/dist/src/typus_perp/trading/structs.d.ts +0 -3613
  228. package/dist/src/typus_perp/trading/structs.js +0 -5813
  229. package/dist/src/typus_perp/treasury-caps/functions.d.ts +0 -9
  230. package/dist/src/typus_perp/treasury-caps/functions.js +0 -36
  231. package/dist/src/typus_perp/treasury-caps/structs.d.ts +0 -55
  232. package/dist/src/typus_perp/treasury-caps/structs.js +0 -223
  233. package/dist/src/typus_perp/user-account/functions.d.ts +0 -36
  234. package/dist/src/typus_perp/user-account/functions.js +0 -70
  235. package/dist/src/typus_perp/user-account/structs.d.ts +0 -168
  236. package/dist/src/typus_perp/user-account/structs.js +0 -448
  237. package/dist/src/typus_stake_pool/admin/functions.d.ts +0 -49
  238. package/dist/src/typus_stake_pool/admin/functions.js +0 -105
  239. package/dist/src/typus_stake_pool/admin/structs.d.ts +0 -413
  240. package/dist/src/typus_stake_pool/admin/structs.js +0 -789
  241. package/dist/src/typus_stake_pool/index.d.ts +0 -1
  242. package/dist/src/typus_stake_pool/index.js +0 -7
  243. package/dist/src/typus_stake_pool/init.d.ts +0 -2
  244. package/dist/src/typus_stake_pool/init.js +0 -69
  245. package/dist/src/typus_stake_pool/stake-pool/functions.d.ts +0 -229
  246. package/dist/src/typus_stake_pool/stake-pool/functions.js +0 -380
  247. package/dist/src/typus_stake_pool/stake-pool/structs.d.ts +0 -2477
  248. package/dist/src/typus_stake_pool/stake-pool/structs.js +0 -4653
  249. /package/dist/src/{pyth.d.ts → grpc/ledgerService.d.ts} +0 -0
@@ -1,386 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __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.Supply = exports.Balance = void 0;
76
- exports.isBalance = isBalance;
77
- exports.isSupply = isSupply;
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
- /* ============================== Balance =============================== */
84
- function isBalance(type) {
85
- type = (0, util_1.compressSuiType)(type);
86
- return type.startsWith("".concat(index_1.PKG_V26, "::balance::Balance") + "<");
87
- }
88
- var Balance = /** @class */ (function () {
89
- function Balance(typeArgs, fields) {
90
- this.__StructClass = true;
91
- this.$typeName = Balance.$typeName;
92
- this.$isPhantom = Balance.$isPhantom;
93
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Balance.$typeName], __read(typeArgs), false));
94
- this.$typeArgs = typeArgs;
95
- this.value = fields.value;
96
- }
97
- Balance.reified = function (T) {
98
- var _this = this;
99
- return {
100
- typeName: Balance.$typeName,
101
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Balance.$typeName], [(0, reified_1.extractType)(T)], false)),
102
- typeArgs: [(0, reified_1.extractType)(T)],
103
- isPhantom: Balance.$isPhantom,
104
- reifiedTypeArgs: [T],
105
- fromFields: function (fields) { return Balance.fromFields(T, fields); },
106
- fromFieldsWithTypes: function (item) { return Balance.fromFieldsWithTypes(T, item); },
107
- fromBcs: function (data) { return Balance.fromBcs(T, data); },
108
- bcs: Balance.bcs,
109
- fromJSONField: function (field) { return Balance.fromJSONField(T, field); },
110
- fromJSON: function (json) { return Balance.fromJSON(T, json); },
111
- fromSuiParsedData: function (content) { return Balance.fromSuiParsedData(T, content); },
112
- fromSuiObjectData: function (content) { return Balance.fromSuiObjectData(T, content); },
113
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
114
- return [2 /*return*/, Balance.fetch(client, T, id)];
115
- }); }); },
116
- new: function (fields) {
117
- return new Balance([(0, reified_1.extractType)(T)], fields);
118
- },
119
- kind: "StructClassReified",
120
- };
121
- };
122
- Object.defineProperty(Balance, "r", {
123
- get: function () {
124
- return Balance.reified;
125
- },
126
- enumerable: false,
127
- configurable: true
128
- });
129
- Balance.phantom = function (T) {
130
- return (0, reified_1.phantom)(Balance.reified(T));
131
- };
132
- Object.defineProperty(Balance, "p", {
133
- get: function () {
134
- return Balance.phantom;
135
- },
136
- enumerable: false,
137
- configurable: true
138
- });
139
- Object.defineProperty(Balance, "bcs", {
140
- get: function () {
141
- return bcs_1.bcs.struct("Balance", {
142
- value: bcs_1.bcs.u64(),
143
- });
144
- },
145
- enumerable: false,
146
- configurable: true
147
- });
148
- Balance.fromFields = function (typeArg, fields) {
149
- return Balance.reified(typeArg).new({ value: (0, reified_1.decodeFromFields)("u64", fields.value) });
150
- };
151
- Balance.fromFieldsWithTypes = function (typeArg, item) {
152
- if (!isBalance(item.type)) {
153
- throw new Error("not a Balance type");
154
- }
155
- (0, reified_1.assertFieldsWithTypesArgsMatch)(item, [typeArg]);
156
- return Balance.reified(typeArg).new({ value: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.value) });
157
- };
158
- Balance.fromBcs = function (typeArg, data) {
159
- return Balance.fromFields(typeArg, Balance.bcs.parse(data));
160
- };
161
- Balance.prototype.toJSONField = function () {
162
- return {
163
- value: this.value.toString(),
164
- };
165
- };
166
- Balance.prototype.toJSON = function () {
167
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
168
- };
169
- Balance.fromJSONField = function (typeArg, field) {
170
- return Balance.reified(typeArg).new({ value: (0, reified_1.decodeFromJSONField)("u64", field.value) });
171
- };
172
- Balance.fromJSON = function (typeArg, json) {
173
- if (json.$typeName !== Balance.$typeName) {
174
- throw new Error("not a WithTwoGenerics json object");
175
- }
176
- (0, reified_1.assertReifiedTypeArgsMatch)((0, util_1.composeSuiType)(Balance.$typeName, (0, reified_1.extractType)(typeArg)), json.$typeArgs, [typeArg]);
177
- return Balance.fromJSONField(typeArg, json);
178
- };
179
- Balance.fromSuiParsedData = function (typeArg, content) {
180
- if (content.dataType !== "moveObject") {
181
- throw new Error("not an object");
182
- }
183
- if (!isBalance(content.type)) {
184
- throw new Error("object at ".concat(content.fields.id, " is not a Balance object"));
185
- }
186
- return Balance.fromFieldsWithTypes(typeArg, content);
187
- };
188
- Balance.fromSuiObjectData = function (typeArg, data) {
189
- if (data.bcs) {
190
- if (data.bcs.dataType !== "moveObject" || !isBalance(data.bcs.type)) {
191
- throw new Error("object at is not a Balance object");
192
- }
193
- var gotTypeArgs = (0, util_1.parseTypeName)(data.bcs.type).typeArgs;
194
- if (gotTypeArgs.length !== 1) {
195
- throw new Error("type argument mismatch: expected 1 type argument but got '".concat(gotTypeArgs.length, "'"));
196
- }
197
- var gotTypeArg = (0, util_1.compressSuiType)(gotTypeArgs[0]);
198
- var expectedTypeArg = (0, util_1.compressSuiType)((0, reified_1.extractType)(typeArg));
199
- if (gotTypeArg !== (0, util_1.compressSuiType)((0, reified_1.extractType)(typeArg))) {
200
- throw new Error("type argument mismatch: expected '".concat(expectedTypeArg, "' but got '").concat(gotTypeArg, "'"));
201
- }
202
- return Balance.fromBcs(typeArg, (0, utils_1.fromB64)(data.bcs.bcsBytes));
203
- }
204
- if (data.content) {
205
- return Balance.fromSuiParsedData(typeArg, data.content);
206
- }
207
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
208
- };
209
- Balance.fetch = function (client, typeArg, id) {
210
- return __awaiter(this, void 0, void 0, function () {
211
- var res;
212
- var _a, _b;
213
- return __generator(this, function (_c) {
214
- switch (_c.label) {
215
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
216
- case 1:
217
- res = _c.sent();
218
- if (res.error) {
219
- throw new Error("error fetching Balance object at id ".concat(id, ": ").concat(res.error.code));
220
- }
221
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isBalance(res.data.bcs.type)) {
222
- throw new Error("object at id ".concat(id, " is not a Balance object"));
223
- }
224
- return [2 /*return*/, Balance.fromSuiObjectData(typeArg, res.data)];
225
- }
226
- });
227
- });
228
- };
229
- Balance.$typeName = "".concat(index_1.PKG_V26, "::balance::Balance");
230
- Balance.$numTypeParams = 1;
231
- Balance.$isPhantom = [true];
232
- return Balance;
233
- }());
234
- exports.Balance = Balance;
235
- /* ============================== Supply =============================== */
236
- function isSupply(type) {
237
- type = (0, util_1.compressSuiType)(type);
238
- return type.startsWith("".concat(index_1.PKG_V26, "::balance::Supply") + "<");
239
- }
240
- var Supply = /** @class */ (function () {
241
- function Supply(typeArgs, fields) {
242
- this.__StructClass = true;
243
- this.$typeName = Supply.$typeName;
244
- this.$isPhantom = Supply.$isPhantom;
245
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Supply.$typeName], __read(typeArgs), false));
246
- this.$typeArgs = typeArgs;
247
- this.value = fields.value;
248
- }
249
- Supply.reified = function (T) {
250
- var _this = this;
251
- return {
252
- typeName: Supply.$typeName,
253
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Supply.$typeName], [(0, reified_1.extractType)(T)], false)),
254
- typeArgs: [(0, reified_1.extractType)(T)],
255
- isPhantom: Supply.$isPhantom,
256
- reifiedTypeArgs: [T],
257
- fromFields: function (fields) { return Supply.fromFields(T, fields); },
258
- fromFieldsWithTypes: function (item) { return Supply.fromFieldsWithTypes(T, item); },
259
- fromBcs: function (data) { return Supply.fromBcs(T, data); },
260
- bcs: Supply.bcs,
261
- fromJSONField: function (field) { return Supply.fromJSONField(T, field); },
262
- fromJSON: function (json) { return Supply.fromJSON(T, json); },
263
- fromSuiParsedData: function (content) { return Supply.fromSuiParsedData(T, content); },
264
- fromSuiObjectData: function (content) { return Supply.fromSuiObjectData(T, content); },
265
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
266
- return [2 /*return*/, Supply.fetch(client, T, id)];
267
- }); }); },
268
- new: function (fields) {
269
- return new Supply([(0, reified_1.extractType)(T)], fields);
270
- },
271
- kind: "StructClassReified",
272
- };
273
- };
274
- Object.defineProperty(Supply, "r", {
275
- get: function () {
276
- return Supply.reified;
277
- },
278
- enumerable: false,
279
- configurable: true
280
- });
281
- Supply.phantom = function (T) {
282
- return (0, reified_1.phantom)(Supply.reified(T));
283
- };
284
- Object.defineProperty(Supply, "p", {
285
- get: function () {
286
- return Supply.phantom;
287
- },
288
- enumerable: false,
289
- configurable: true
290
- });
291
- Object.defineProperty(Supply, "bcs", {
292
- get: function () {
293
- return bcs_1.bcs.struct("Supply", {
294
- value: bcs_1.bcs.u64(),
295
- });
296
- },
297
- enumerable: false,
298
- configurable: true
299
- });
300
- Supply.fromFields = function (typeArg, fields) {
301
- return Supply.reified(typeArg).new({ value: (0, reified_1.decodeFromFields)("u64", fields.value) });
302
- };
303
- Supply.fromFieldsWithTypes = function (typeArg, item) {
304
- if (!isSupply(item.type)) {
305
- throw new Error("not a Supply type");
306
- }
307
- (0, reified_1.assertFieldsWithTypesArgsMatch)(item, [typeArg]);
308
- return Supply.reified(typeArg).new({ value: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.value) });
309
- };
310
- Supply.fromBcs = function (typeArg, data) {
311
- return Supply.fromFields(typeArg, Supply.bcs.parse(data));
312
- };
313
- Supply.prototype.toJSONField = function () {
314
- return {
315
- value: this.value.toString(),
316
- };
317
- };
318
- Supply.prototype.toJSON = function () {
319
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
320
- };
321
- Supply.fromJSONField = function (typeArg, field) {
322
- return Supply.reified(typeArg).new({ value: (0, reified_1.decodeFromJSONField)("u64", field.value) });
323
- };
324
- Supply.fromJSON = function (typeArg, json) {
325
- if (json.$typeName !== Supply.$typeName) {
326
- throw new Error("not a WithTwoGenerics json object");
327
- }
328
- (0, reified_1.assertReifiedTypeArgsMatch)((0, util_1.composeSuiType)(Supply.$typeName, (0, reified_1.extractType)(typeArg)), json.$typeArgs, [typeArg]);
329
- return Supply.fromJSONField(typeArg, json);
330
- };
331
- Supply.fromSuiParsedData = function (typeArg, content) {
332
- if (content.dataType !== "moveObject") {
333
- throw new Error("not an object");
334
- }
335
- if (!isSupply(content.type)) {
336
- throw new Error("object at ".concat(content.fields.id, " is not a Supply object"));
337
- }
338
- return Supply.fromFieldsWithTypes(typeArg, content);
339
- };
340
- Supply.fromSuiObjectData = function (typeArg, data) {
341
- if (data.bcs) {
342
- if (data.bcs.dataType !== "moveObject" || !isSupply(data.bcs.type)) {
343
- throw new Error("object at is not a Supply object");
344
- }
345
- var gotTypeArgs = (0, util_1.parseTypeName)(data.bcs.type).typeArgs;
346
- if (gotTypeArgs.length !== 1) {
347
- throw new Error("type argument mismatch: expected 1 type argument but got '".concat(gotTypeArgs.length, "'"));
348
- }
349
- var gotTypeArg = (0, util_1.compressSuiType)(gotTypeArgs[0]);
350
- var expectedTypeArg = (0, util_1.compressSuiType)((0, reified_1.extractType)(typeArg));
351
- if (gotTypeArg !== (0, util_1.compressSuiType)((0, reified_1.extractType)(typeArg))) {
352
- throw new Error("type argument mismatch: expected '".concat(expectedTypeArg, "' but got '").concat(gotTypeArg, "'"));
353
- }
354
- return Supply.fromBcs(typeArg, (0, utils_1.fromB64)(data.bcs.bcsBytes));
355
- }
356
- if (data.content) {
357
- return Supply.fromSuiParsedData(typeArg, data.content);
358
- }
359
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
360
- };
361
- Supply.fetch = function (client, typeArg, id) {
362
- return __awaiter(this, void 0, void 0, function () {
363
- var res;
364
- var _a, _b;
365
- return __generator(this, function (_c) {
366
- switch (_c.label) {
367
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
368
- case 1:
369
- res = _c.sent();
370
- if (res.error) {
371
- throw new Error("error fetching Supply object at id ".concat(id, ": ").concat(res.error.code));
372
- }
373
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isSupply(res.data.bcs.type)) {
374
- throw new Error("object at id ".concat(id, " is not a Supply object"));
375
- }
376
- return [2 /*return*/, Supply.fromSuiObjectData(typeArg, res.data)];
377
- }
378
- });
379
- });
380
- };
381
- Supply.$typeName = "".concat(index_1.PKG_V26, "::balance::Supply");
382
- Supply.$numTypeParams = 1;
383
- Supply.$isPhantom = [true];
384
- return Supply;
385
- }());
386
- exports.Supply = Supply;