@symmio/trading-react 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (545) hide show
  1. package/LICENSE +21 -0
  2. package/dist/account-layer/index.d.ts +29 -0
  3. package/dist/account-layer/index.d.ts.map +1 -0
  4. package/dist/account-layer/use-account-balance-info.d.ts +22 -0
  5. package/dist/account-layer/use-account-balance-info.d.ts.map +1 -0
  6. package/dist/account-layer/use-account-balance-info.js +23 -0
  7. package/dist/account-layer/use-account-balance-info.js.map +1 -0
  8. package/dist/account-layer/use-account-balance-of.d.ts +22 -0
  9. package/dist/account-layer/use-account-balance-of.d.ts.map +1 -0
  10. package/dist/account-layer/use-account-balance-of.js +23 -0
  11. package/dist/account-layer/use-account-balance-of.js.map +1 -0
  12. package/dist/account-layer/use-add-margin.d.ts +26 -0
  13. package/dist/account-layer/use-add-margin.d.ts.map +1 -0
  14. package/dist/account-layer/use-add-margin.js +40 -0
  15. package/dist/account-layer/use-add-margin.js.map +1 -0
  16. package/dist/account-layer/use-allocate.d.ts +25 -0
  17. package/dist/account-layer/use-allocate.d.ts.map +1 -0
  18. package/dist/account-layer/use-allocate.js +40 -0
  19. package/dist/account-layer/use-allocate.js.map +1 -0
  20. package/dist/account-layer/use-create-sub-accounts.d.ts +36 -0
  21. package/dist/account-layer/use-create-sub-accounts.d.ts.map +1 -0
  22. package/dist/account-layer/use-create-sub-accounts.js +41 -0
  23. package/dist/account-layer/use-create-sub-accounts.js.map +1 -0
  24. package/dist/account-layer/use-deallocate.d.ts +44 -0
  25. package/dist/account-layer/use-deallocate.d.ts.map +1 -0
  26. package/dist/account-layer/use-deallocate.js +44 -0
  27. package/dist/account-layer/use-deallocate.js.map +1 -0
  28. package/dist/account-layer/use-delete-sub-account.d.ts +30 -0
  29. package/dist/account-layer/use-delete-sub-account.d.ts.map +1 -0
  30. package/dist/account-layer/use-delete-sub-account.js +40 -0
  31. package/dist/account-layer/use-delete-sub-account.js.map +1 -0
  32. package/dist/account-layer/use-deposit-and-allocate.d.ts +27 -0
  33. package/dist/account-layer/use-deposit-and-allocate.d.ts.map +1 -0
  34. package/dist/account-layer/use-deposit-and-allocate.js +41 -0
  35. package/dist/account-layer/use-deposit-and-allocate.js.map +1 -0
  36. package/dist/account-layer/use-deposit.d.ts +27 -0
  37. package/dist/account-layer/use-deposit.d.ts.map +1 -0
  38. package/dist/account-layer/use-deposit.js +41 -0
  39. package/dist/account-layer/use-deposit.js.map +1 -0
  40. package/dist/account-layer/use-edit-account-name.d.ts +27 -0
  41. package/dist/account-layer/use-edit-account-name.d.ts.map +1 -0
  42. package/dist/account-layer/use-edit-account-name.js +40 -0
  43. package/dist/account-layer/use-edit-account-name.js.map +1 -0
  44. package/dist/account-layer/use-predicted-next-virtual-account.d.ts +38 -0
  45. package/dist/account-layer/use-predicted-next-virtual-account.d.ts.map +1 -0
  46. package/dist/account-layer/use-predicted-next-virtual-account.js +27 -0
  47. package/dist/account-layer/use-predicted-next-virtual-account.js.map +1 -0
  48. package/dist/account-layer/use-remove-margin.d.ts +43 -0
  49. package/dist/account-layer/use-remove-margin.d.ts.map +1 -0
  50. package/dist/account-layer/use-remove-margin.js +44 -0
  51. package/dist/account-layer/use-remove-margin.js.map +1 -0
  52. package/dist/account-layer/use-simulate-add-margin.d.ts +24 -0
  53. package/dist/account-layer/use-simulate-add-margin.d.ts.map +1 -0
  54. package/dist/account-layer/use-simulate-add-margin.js +29 -0
  55. package/dist/account-layer/use-simulate-add-margin.js.map +1 -0
  56. package/dist/account-layer/use-simulate-allocate.d.ts +25 -0
  57. package/dist/account-layer/use-simulate-allocate.d.ts.map +1 -0
  58. package/dist/account-layer/use-simulate-allocate.js +29 -0
  59. package/dist/account-layer/use-simulate-allocate.js.map +1 -0
  60. package/dist/account-layer/use-simulate-create-sub-accounts.d.ts +25 -0
  61. package/dist/account-layer/use-simulate-create-sub-accounts.d.ts.map +1 -0
  62. package/dist/account-layer/use-simulate-create-sub-accounts.js +29 -0
  63. package/dist/account-layer/use-simulate-create-sub-accounts.js.map +1 -0
  64. package/dist/account-layer/use-simulate-deallocate.d.ts +29 -0
  65. package/dist/account-layer/use-simulate-deallocate.d.ts.map +1 -0
  66. package/dist/account-layer/use-simulate-deallocate.js +29 -0
  67. package/dist/account-layer/use-simulate-deallocate.js.map +1 -0
  68. package/dist/account-layer/use-simulate-delete-sub-account.d.ts +25 -0
  69. package/dist/account-layer/use-simulate-delete-sub-account.d.ts.map +1 -0
  70. package/dist/account-layer/use-simulate-delete-sub-account.js +29 -0
  71. package/dist/account-layer/use-simulate-delete-sub-account.js.map +1 -0
  72. package/dist/account-layer/use-simulate-deposit-and-allocate.d.ts +25 -0
  73. package/dist/account-layer/use-simulate-deposit-and-allocate.d.ts.map +1 -0
  74. package/dist/account-layer/use-simulate-deposit-and-allocate.js +29 -0
  75. package/dist/account-layer/use-simulate-deposit-and-allocate.js.map +1 -0
  76. package/dist/account-layer/use-simulate-deposit.d.ts +25 -0
  77. package/dist/account-layer/use-simulate-deposit.d.ts.map +1 -0
  78. package/dist/account-layer/use-simulate-deposit.js +29 -0
  79. package/dist/account-layer/use-simulate-deposit.js.map +1 -0
  80. package/dist/account-layer/use-simulate-edit-account-name.d.ts +25 -0
  81. package/dist/account-layer/use-simulate-edit-account-name.d.ts.map +1 -0
  82. package/dist/account-layer/use-simulate-edit-account-name.js +29 -0
  83. package/dist/account-layer/use-simulate-edit-account-name.js.map +1 -0
  84. package/dist/account-layer/use-simulate-remove-margin.d.ts +30 -0
  85. package/dist/account-layer/use-simulate-remove-margin.d.ts.map +1 -0
  86. package/dist/account-layer/use-simulate-remove-margin.js +29 -0
  87. package/dist/account-layer/use-simulate-remove-margin.js.map +1 -0
  88. package/dist/account-layer/use-sub-account-virtual-nonce.d.ts +23 -0
  89. package/dist/account-layer/use-sub-account-virtual-nonce.d.ts.map +1 -0
  90. package/dist/account-layer/use-sub-account-virtual-nonce.js +27 -0
  91. package/dist/account-layer/use-sub-account-virtual-nonce.js.map +1 -0
  92. package/dist/account-layer/use-sub-account.d.ts +22 -0
  93. package/dist/account-layer/use-sub-account.d.ts.map +1 -0
  94. package/dist/account-layer/use-sub-account.js +27 -0
  95. package/dist/account-layer/use-sub-account.js.map +1 -0
  96. package/dist/account-layer/use-sub-accounts-count-of-user.d.ts +22 -0
  97. package/dist/account-layer/use-sub-accounts-count-of-user.d.ts.map +1 -0
  98. package/dist/account-layer/use-sub-accounts-count-of-user.js +27 -0
  99. package/dist/account-layer/use-sub-accounts-count-of-user.js.map +1 -0
  100. package/dist/account-layer/use-user-sub-accounts-addresses.d.ts +24 -0
  101. package/dist/account-layer/use-user-sub-accounts-addresses.d.ts.map +1 -0
  102. package/dist/account-layer/use-user-sub-accounts-addresses.js +27 -0
  103. package/dist/account-layer/use-user-sub-accounts-addresses.js.map +1 -0
  104. package/dist/account-layer/use-user-sub-accounts.d.ts +28 -0
  105. package/dist/account-layer/use-user-sub-accounts.d.ts.map +1 -0
  106. package/dist/account-layer/use-user-sub-accounts.js +27 -0
  107. package/dist/account-layer/use-user-sub-accounts.js.map +1 -0
  108. package/dist/account-layer/use-virtual-account.d.ts +35 -0
  109. package/dist/account-layer/use-virtual-account.d.ts.map +1 -0
  110. package/dist/account-layer/use-virtual-account.js +32 -0
  111. package/dist/account-layer/use-virtual-account.js.map +1 -0
  112. package/dist/account-layer/use-virtual-accounts-addresses-of-sub-account.d.ts +25 -0
  113. package/dist/account-layer/use-virtual-accounts-addresses-of-sub-account.d.ts.map +1 -0
  114. package/dist/account-layer/use-virtual-accounts-addresses-of-sub-account.js +27 -0
  115. package/dist/account-layer/use-virtual-accounts-addresses-of-sub-account.js.map +1 -0
  116. package/dist/balance-history/index.d.ts +4 -0
  117. package/dist/balance-history/index.d.ts.map +1 -0
  118. package/dist/balance-history/use-balance-history.d.ts +26 -0
  119. package/dist/balance-history/use-balance-history.d.ts.map +1 -0
  120. package/dist/balance-history/use-balance-history.js +27 -0
  121. package/dist/balance-history/use-balance-history.js.map +1 -0
  122. package/dist/balance-history/use-deposit-history.d.ts +19 -0
  123. package/dist/balance-history/use-deposit-history.d.ts.map +1 -0
  124. package/dist/balance-history/use-deposit-history.js +14 -0
  125. package/dist/balance-history/use-deposit-history.js.map +1 -0
  126. package/dist/balance-history/use-withdraw-history.d.ts +20 -0
  127. package/dist/balance-history/use-withdraw-history.d.ts.map +1 -0
  128. package/dist/balance-history/use-withdraw-history.js +14 -0
  129. package/dist/balance-history/use-withdraw-history.js.map +1 -0
  130. package/dist/collateral/index.d.ts +5 -0
  131. package/dist/collateral/index.d.ts.map +1 -0
  132. package/dist/collateral/use-approve-collateral.d.ts +27 -0
  133. package/dist/collateral/use-approve-collateral.d.ts.map +1 -0
  134. package/dist/collateral/use-approve-collateral.js +40 -0
  135. package/dist/collateral/use-approve-collateral.js.map +1 -0
  136. package/dist/collateral/use-collateral-allowance.d.ts +24 -0
  137. package/dist/collateral/use-collateral-allowance.d.ts.map +1 -0
  138. package/dist/collateral/use-collateral-allowance.js +27 -0
  139. package/dist/collateral/use-collateral-allowance.js.map +1 -0
  140. package/dist/collateral/use-collateral-balance.d.ts +22 -0
  141. package/dist/collateral/use-collateral-balance.d.ts.map +1 -0
  142. package/dist/collateral/use-collateral-balance.js +27 -0
  143. package/dist/collateral/use-collateral-balance.js.map +1 -0
  144. package/dist/collateral/use-simulate-approve-collateral.d.ts +26 -0
  145. package/dist/collateral/use-simulate-approve-collateral.d.ts.map +1 -0
  146. package/dist/collateral/use-simulate-approve-collateral.js +29 -0
  147. package/dist/collateral/use-simulate-approve-collateral.js.map +1 -0
  148. package/dist/error-codes/index.d.ts +3 -0
  149. package/dist/error-codes/index.d.ts.map +1 -0
  150. package/dist/error-codes/use-solver-error-codes.d.ts +27 -0
  151. package/dist/error-codes/use-solver-error-codes.d.ts.map +1 -0
  152. package/dist/error-codes/use-solver-error-codes.js +27 -0
  153. package/dist/error-codes/use-solver-error-codes.js.map +1 -0
  154. package/dist/error-codes/use-solver-error-message.d.ts +23 -0
  155. package/dist/error-codes/use-solver-error-message.d.ts.map +1 -0
  156. package/dist/error-codes/use-solver-error-message.js +11 -0
  157. package/dist/error-codes/use-solver-error-message.js.map +1 -0
  158. package/dist/errors/index.d.ts +4 -0
  159. package/dist/errors/index.d.ts.map +1 -0
  160. package/dist/errors/normalize-symm-error.d.ts +14 -0
  161. package/dist/errors/normalize-symm-error.d.ts.map +1 -0
  162. package/dist/errors/normalize-symm-error.js +86 -0
  163. package/dist/errors/normalize-symm-error.js.map +1 -0
  164. package/dist/errors/symmio-request-error.d.ts +54 -0
  165. package/dist/errors/symmio-request-error.d.ts.map +1 -0
  166. package/dist/errors/symmio-request-error.js +17 -0
  167. package/dist/errors/symmio-request-error.js.map +1 -0
  168. package/dist/errors/types.d.ts +21 -0
  169. package/dist/errors/types.d.ts.map +1 -0
  170. package/dist/fees/index.d.ts +2 -0
  171. package/dist/fees/index.d.ts.map +1 -0
  172. package/dist/fees/use-fee-for-user.d.ts +25 -0
  173. package/dist/fees/use-fee-for-user.d.ts.map +1 -0
  174. package/dist/fees/use-fee-for-user.js +27 -0
  175. package/dist/fees/use-fee-for-user.js.map +1 -0
  176. package/dist/index.d.ts +184 -0
  177. package/dist/index.d.ts.map +1 -0
  178. package/dist/index.js +122 -0
  179. package/dist/instant-layer/index.d.ts +14 -0
  180. package/dist/instant-layer/index.d.ts.map +1 -0
  181. package/dist/instant-layer/use-delegation-expiry.d.ts +22 -0
  182. package/dist/instant-layer/use-delegation-expiry.d.ts.map +1 -0
  183. package/dist/instant-layer/use-delegation-expiry.js +23 -0
  184. package/dist/instant-layer/use-delegation-expiry.js.map +1 -0
  185. package/dist/instant-layer/use-grant-delegation.d.ts +26 -0
  186. package/dist/instant-layer/use-grant-delegation.d.ts.map +1 -0
  187. package/dist/instant-layer/use-grant-delegation.js +38 -0
  188. package/dist/instant-layer/use-grant-delegation.js.map +1 -0
  189. package/dist/instant-layer/use-instant-close-auto.d.ts +29 -0
  190. package/dist/instant-layer/use-instant-close-auto.d.ts.map +1 -0
  191. package/dist/instant-layer/use-instant-close-auto.js +32 -0
  192. package/dist/instant-layer/use-instant-close-auto.js.map +1 -0
  193. package/dist/instant-layer/use-instant-close-bulk-auto.d.ts +26 -0
  194. package/dist/instant-layer/use-instant-close-bulk-auto.d.ts.map +1 -0
  195. package/dist/instant-layer/use-instant-close-bulk-auto.js +32 -0
  196. package/dist/instant-layer/use-instant-close-bulk-auto.js.map +1 -0
  197. package/dist/instant-layer/use-instant-close-bulk.d.ts +24 -0
  198. package/dist/instant-layer/use-instant-close-bulk.d.ts.map +1 -0
  199. package/dist/instant-layer/use-instant-close-bulk.js +32 -0
  200. package/dist/instant-layer/use-instant-close-bulk.js.map +1 -0
  201. package/dist/instant-layer/use-instant-close.d.ts +29 -0
  202. package/dist/instant-layer/use-instant-close.d.ts.map +1 -0
  203. package/dist/instant-layer/use-instant-close.js +32 -0
  204. package/dist/instant-layer/use-instant-close.js.map +1 -0
  205. package/dist/instant-layer/use-instant-closes.d.ts +25 -0
  206. package/dist/instant-layer/use-instant-closes.d.ts.map +1 -0
  207. package/dist/instant-layer/use-instant-closes.js +27 -0
  208. package/dist/instant-layer/use-instant-closes.js.map +1 -0
  209. package/dist/instant-layer/use-instant-open-auto.d.ts +31 -0
  210. package/dist/instant-layer/use-instant-open-auto.d.ts.map +1 -0
  211. package/dist/instant-layer/use-instant-open-auto.js +32 -0
  212. package/dist/instant-layer/use-instant-open-auto.js.map +1 -0
  213. package/dist/instant-layer/use-instant-open-quote-id.d.ts +28 -0
  214. package/dist/instant-layer/use-instant-open-quote-id.d.ts.map +1 -0
  215. package/dist/instant-layer/use-instant-open-quote-id.js +27 -0
  216. package/dist/instant-layer/use-instant-open-quote-id.js.map +1 -0
  217. package/dist/instant-layer/use-instant-open.d.ts +33 -0
  218. package/dist/instant-layer/use-instant-open.d.ts.map +1 -0
  219. package/dist/instant-layer/use-instant-open.js +32 -0
  220. package/dist/instant-layer/use-instant-open.js.map +1 -0
  221. package/dist/instant-layer/use-instant-opens.d.ts +25 -0
  222. package/dist/instant-layer/use-instant-opens.d.ts.map +1 -0
  223. package/dist/instant-layer/use-instant-opens.js +27 -0
  224. package/dist/instant-layer/use-instant-opens.js.map +1 -0
  225. package/dist/instant-layer/use-is-delegation-active.d.ts +22 -0
  226. package/dist/instant-layer/use-is-delegation-active.d.ts.map +1 -0
  227. package/dist/instant-layer/use-is-delegation-active.js +23 -0
  228. package/dist/instant-layer/use-is-delegation-active.js.map +1 -0
  229. package/dist/instant-layer/use-simulate-grant-delegation.d.ts +25 -0
  230. package/dist/instant-layer/use-simulate-grant-delegation.d.ts.map +1 -0
  231. package/dist/instant-layer/use-simulate-grant-delegation.js +29 -0
  232. package/dist/instant-layer/use-simulate-grant-delegation.js.map +1 -0
  233. package/dist/locked-params/index.d.ts +2 -0
  234. package/dist/locked-params/index.d.ts.map +1 -0
  235. package/dist/locked-params/use-locked-params.d.ts +23 -0
  236. package/dist/locked-params/use-locked-params.d.ts.map +1 -0
  237. package/dist/locked-params/use-locked-params.js +27 -0
  238. package/dist/locked-params/use-locked-params.js.map +1 -0
  239. package/dist/markets/index.d.ts +3 -0
  240. package/dist/markets/index.d.ts.map +1 -0
  241. package/dist/markets/use-markets.d.ts +26 -0
  242. package/dist/markets/use-markets.d.ts.map +1 -0
  243. package/dist/markets/use-markets.js +27 -0
  244. package/dist/markets/use-markets.js.map +1 -0
  245. package/dist/markets/use-onchain-contract-markets.d.ts +24 -0
  246. package/dist/markets/use-onchain-contract-markets.d.ts.map +1 -0
  247. package/dist/markets/use-onchain-contract-markets.js +27 -0
  248. package/dist/markets/use-onchain-contract-markets.js.map +1 -0
  249. package/dist/muon/index.d.ts +11 -0
  250. package/dist/muon/index.d.ts.map +1 -0
  251. package/dist/muon/use-deallocate-upnl-sig.d.ts +28 -0
  252. package/dist/muon/use-deallocate-upnl-sig.d.ts.map +1 -0
  253. package/dist/muon/use-deallocate-upnl-sig.js +27 -0
  254. package/dist/muon/use-deallocate-upnl-sig.js.map +1 -0
  255. package/dist/muon/use-muon-party-a-overview.d.ts +29 -0
  256. package/dist/muon/use-muon-party-a-overview.d.ts.map +1 -0
  257. package/dist/muon/use-muon-party-a-overview.js +27 -0
  258. package/dist/muon/use-muon-party-a-overview.js.map +1 -0
  259. package/dist/muon/use-muon-price-range.d.ts +35 -0
  260. package/dist/muon/use-muon-price-range.d.ts.map +1 -0
  261. package/dist/muon/use-muon-price-range.js +31 -0
  262. package/dist/muon/use-muon-price-range.js.map +1 -0
  263. package/dist/muon/use-muon-price.d.ts +28 -0
  264. package/dist/muon/use-muon-price.d.ts.map +1 -0
  265. package/dist/muon/use-muon-price.js +27 -0
  266. package/dist/muon/use-muon-price.js.map +1 -0
  267. package/dist/muon/use-muon-settle-upnl.d.ts +29 -0
  268. package/dist/muon/use-muon-settle-upnl.d.ts.map +1 -0
  269. package/dist/muon/use-muon-settle-upnl.js +28 -0
  270. package/dist/muon/use-muon-settle-upnl.js.map +1 -0
  271. package/dist/muon/use-muon-upnl-a-with-symbol-price.d.ts +29 -0
  272. package/dist/muon/use-muon-upnl-a-with-symbol-price.d.ts.map +1 -0
  273. package/dist/muon/use-muon-upnl-a-with-symbol-price.js +28 -0
  274. package/dist/muon/use-muon-upnl-a-with-symbol-price.js.map +1 -0
  275. package/dist/muon/use-muon-upnl-a.d.ts +28 -0
  276. package/dist/muon/use-muon-upnl-a.d.ts.map +1 -0
  277. package/dist/muon/use-muon-upnl-a.js +27 -0
  278. package/dist/muon/use-muon-upnl-a.js.map +1 -0
  279. package/dist/muon/use-muon-upnl-b.d.ts +29 -0
  280. package/dist/muon/use-muon-upnl-b.d.ts.map +1 -0
  281. package/dist/muon/use-muon-upnl-b.js +28 -0
  282. package/dist/muon/use-muon-upnl-b.js.map +1 -0
  283. package/dist/muon/use-muon-upnl-with-symbol-price.d.ts +28 -0
  284. package/dist/muon/use-muon-upnl-with-symbol-price.d.ts.map +1 -0
  285. package/dist/muon/use-muon-upnl-with-symbol-price.js +29 -0
  286. package/dist/muon/use-muon-upnl-with-symbol-price.js.map +1 -0
  287. package/dist/muon/use-muon-upnl.d.ts +28 -0
  288. package/dist/muon/use-muon-upnl.d.ts.map +1 -0
  289. package/dist/muon/use-muon-upnl.js +28 -0
  290. package/dist/muon/use-muon-upnl.js.map +1 -0
  291. package/dist/notifications/index.d.ts +2 -0
  292. package/dist/notifications/index.d.ts.map +1 -0
  293. package/dist/notifications/use-search-notifications.d.ts +29 -0
  294. package/dist/notifications/use-search-notifications.d.ts.map +1 -0
  295. package/dist/notifications/use-search-notifications.js +27 -0
  296. package/dist/notifications/use-search-notifications.js.map +1 -0
  297. package/dist/notional-cap/index.d.ts +4 -0
  298. package/dist/notional-cap/index.d.ts.map +1 -0
  299. package/dist/notional-cap/use-notional-cap-all.d.ts +32 -0
  300. package/dist/notional-cap/use-notional-cap-all.d.ts.map +1 -0
  301. package/dist/notional-cap/use-notional-cap-all.js +32 -0
  302. package/dist/notional-cap/use-notional-cap-all.js.map +1 -0
  303. package/dist/notional-cap/use-notional-cap-by-symbol-id.d.ts +36 -0
  304. package/dist/notional-cap/use-notional-cap-by-symbol-id.d.ts.map +1 -0
  305. package/dist/notional-cap/use-notional-cap-by-symbol-id.js +32 -0
  306. package/dist/notional-cap/use-notional-cap-by-symbol-id.js.map +1 -0
  307. package/dist/notional-cap/use-open-interest-by-symbol-id.d.ts +34 -0
  308. package/dist/notional-cap/use-open-interest-by-symbol-id.d.ts.map +1 -0
  309. package/dist/notional-cap/use-open-interest-by-symbol-id.js +32 -0
  310. package/dist/notional-cap/use-open-interest-by-symbol-id.js.map +1 -0
  311. package/dist/price-service/index.d.ts +9 -0
  312. package/dist/price-service/index.d.ts.map +1 -0
  313. package/dist/price-service/use-enigma-price-by-market-id.d.ts +42 -0
  314. package/dist/price-service/use-enigma-price-by-market-id.d.ts.map +1 -0
  315. package/dist/price-service/use-enigma-price-by-market-id.js +30 -0
  316. package/dist/price-service/use-enigma-price-by-market-id.js.map +1 -0
  317. package/dist/price-service/use-enigma-price-by-name.d.ts +41 -0
  318. package/dist/price-service/use-enigma-price-by-name.d.ts.map +1 -0
  319. package/dist/price-service/use-enigma-price-by-name.js +45 -0
  320. package/dist/price-service/use-enigma-price-by-name.js.map +1 -0
  321. package/dist/price-service/use-enigma-price-service-health.d.ts +20 -0
  322. package/dist/price-service/use-enigma-price-service-health.d.ts.map +1 -0
  323. package/dist/price-service/use-enigma-price-service-health.js +27 -0
  324. package/dist/price-service/use-enigma-price-service-health.js.map +1 -0
  325. package/dist/price-service/use-enigma-price-service-metadata.d.ts +20 -0
  326. package/dist/price-service/use-enigma-price-service-metadata.d.ts.map +1 -0
  327. package/dist/price-service/use-enigma-price-service-metadata.js +27 -0
  328. package/dist/price-service/use-enigma-price-service-metadata.js.map +1 -0
  329. package/dist/price-service/use-enigma-price-service-prices-by-addresses.d.ts +20 -0
  330. package/dist/price-service/use-enigma-price-service-prices-by-addresses.d.ts.map +1 -0
  331. package/dist/price-service/use-enigma-price-service-prices-by-addresses.js +27 -0
  332. package/dist/price-service/use-enigma-price-service-prices-by-addresses.js.map +1 -0
  333. package/dist/price-service/use-enigma-price-service-prices-by-names.d.ts +20 -0
  334. package/dist/price-service/use-enigma-price-service-prices-by-names.d.ts.map +1 -0
  335. package/dist/price-service/use-enigma-price-service-prices-by-names.js +27 -0
  336. package/dist/price-service/use-enigma-price-service-prices-by-names.js.map +1 -0
  337. package/dist/price-service/use-enigma-price-service-symbols-info.d.ts +20 -0
  338. package/dist/price-service/use-enigma-price-service-symbols-info.d.ts.map +1 -0
  339. package/dist/price-service/use-enigma-price-service-symbols-info.js +27 -0
  340. package/dist/price-service/use-enigma-price-service-symbols-info.js.map +1 -0
  341. package/dist/price-service/use-enigma-prices.d.ts +40 -0
  342. package/dist/price-service/use-enigma-prices.d.ts.map +1 -0
  343. package/dist/price-service/use-enigma-prices.js +47 -0
  344. package/dist/price-service/use-enigma-prices.js.map +1 -0
  345. package/dist/provider/index.d.ts +4 -0
  346. package/dist/provider/index.d.ts.map +1 -0
  347. package/dist/provider/symmio-config-context.d.ts +9 -0
  348. package/dist/provider/symmio-config-context.d.ts.map +1 -0
  349. package/dist/provider/symmio-config-context.js +8 -0
  350. package/dist/provider/symmio-config-context.js.map +1 -0
  351. package/dist/provider/symmio-provider.d.ts +49 -0
  352. package/dist/provider/symmio-provider.d.ts.map +1 -0
  353. package/dist/provider/symmio-provider.js +39 -0
  354. package/dist/provider/symmio-provider.js.map +1 -0
  355. package/dist/provider/use-symmio-chain-id.d.ts +14 -0
  356. package/dist/provider/use-symmio-chain-id.d.ts.map +1 -0
  357. package/dist/provider/use-symmio-chain-id.js +10 -0
  358. package/dist/provider/use-symmio-chain-id.js.map +1 -0
  359. package/dist/provider/use-symmio-config.d.ts +24 -0
  360. package/dist/provider/use-symmio-config.d.ts.map +1 -0
  361. package/dist/provider/use-symmio-config.js +13 -0
  362. package/dist/provider/use-symmio-config.js.map +1 -0
  363. package/dist/quotes/index.d.ts +16 -0
  364. package/dist/quotes/index.d.ts.map +1 -0
  365. package/dist/quotes/optimistic-quotes-store.d.ts +47 -0
  366. package/dist/quotes/optimistic-quotes-store.d.ts.map +1 -0
  367. package/dist/quotes/optimistic-quotes-store.js +27 -0
  368. package/dist/quotes/optimistic-quotes-store.js.map +1 -0
  369. package/dist/quotes/use-account-liquidation-price.d.ts +39 -0
  370. package/dist/quotes/use-account-liquidation-price.d.ts.map +1 -0
  371. package/dist/quotes/use-account-liquidation-price.js +57 -0
  372. package/dist/quotes/use-account-liquidation-price.js.map +1 -0
  373. package/dist/quotes/use-grouped-quotes.d.ts +55 -0
  374. package/dist/quotes/use-grouped-quotes.d.ts.map +1 -0
  375. package/dist/quotes/use-grouped-quotes.js +21 -0
  376. package/dist/quotes/use-grouped-quotes.js.map +1 -0
  377. package/dist/quotes/use-managed-quotes.d.ts +108 -0
  378. package/dist/quotes/use-managed-quotes.d.ts.map +1 -0
  379. package/dist/quotes/use-managed-quotes.js +314 -0
  380. package/dist/quotes/use-managed-quotes.js.map +1 -0
  381. package/dist/quotes/use-party-a-open-positions.d.ts +23 -0
  382. package/dist/quotes/use-party-a-open-positions.d.ts.map +1 -0
  383. package/dist/quotes/use-party-a-open-positions.js +27 -0
  384. package/dist/quotes/use-party-a-open-positions.js.map +1 -0
  385. package/dist/quotes/use-party-a-pending-quotes.d.ts +23 -0
  386. package/dist/quotes/use-party-a-pending-quotes.d.ts.map +1 -0
  387. package/dist/quotes/use-party-a-pending-quotes.js +27 -0
  388. package/dist/quotes/use-party-a-pending-quotes.js.map +1 -0
  389. package/dist/quotes/use-quote-events-by-type.d.ts +26 -0
  390. package/dist/quotes/use-quote-events-by-type.d.ts.map +1 -0
  391. package/dist/quotes/use-quote-events-by-type.js +27 -0
  392. package/dist/quotes/use-quote-events-by-type.js.map +1 -0
  393. package/dist/quotes/use-quote-funding.d.ts +35 -0
  394. package/dist/quotes/use-quote-funding.d.ts.map +1 -0
  395. package/dist/quotes/use-quote-funding.js +21 -0
  396. package/dist/quotes/use-quote-funding.js.map +1 -0
  397. package/dist/quotes/use-quote-history.d.ts +26 -0
  398. package/dist/quotes/use-quote-history.d.ts.map +1 -0
  399. package/dist/quotes/use-quote-history.js +27 -0
  400. package/dist/quotes/use-quote-history.js.map +1 -0
  401. package/dist/quotes/use-quote-platform-fee.d.ts +31 -0
  402. package/dist/quotes/use-quote-platform-fee.d.ts.map +1 -0
  403. package/dist/quotes/use-quote-platform-fee.js +31 -0
  404. package/dist/quotes/use-quote-platform-fee.js.map +1 -0
  405. package/dist/quotes/use-quote-price-history.d.ts +24 -0
  406. package/dist/quotes/use-quote-price-history.d.ts.map +1 -0
  407. package/dist/quotes/use-quote-price-history.js +14 -0
  408. package/dist/quotes/use-quote-price-history.js.map +1 -0
  409. package/dist/quotes/use-quote-upnl-and-pnl.d.ts +34 -0
  410. package/dist/quotes/use-quote-upnl-and-pnl.d.ts.map +1 -0
  411. package/dist/quotes/use-quote-upnl-and-pnl.js +61 -0
  412. package/dist/quotes/use-quote-upnl-and-pnl.js.map +1 -0
  413. package/dist/quotes/use-quote.d.ts +23 -0
  414. package/dist/quotes/use-quote.d.ts.map +1 -0
  415. package/dist/quotes/use-quote.js +27 -0
  416. package/dist/quotes/use-quote.js.map +1 -0
  417. package/dist/quotes/use-quotes-funding.d.ts +52 -0
  418. package/dist/quotes/use-quotes-funding.d.ts.map +1 -0
  419. package/dist/quotes/use-quotes-funding.js +80 -0
  420. package/dist/quotes/use-quotes-funding.js.map +1 -0
  421. package/dist/quotes/use-subgraph-query.d.ts +25 -0
  422. package/dist/quotes/use-subgraph-query.d.ts.map +1 -0
  423. package/dist/quotes/use-subgraph-query.js +27 -0
  424. package/dist/quotes/use-subgraph-query.js.map +1 -0
  425. package/dist/tpsl/index.d.ts +8 -0
  426. package/dist/tpsl/index.d.ts.map +1 -0
  427. package/dist/tpsl/to-quote-tpsl.d.ts +19 -0
  428. package/dist/tpsl/to-quote-tpsl.d.ts.map +1 -0
  429. package/dist/tpsl/to-quote-tpsl.js +46 -0
  430. package/dist/tpsl/to-quote-tpsl.js.map +1 -0
  431. package/dist/tpsl/tpsl-confirming.d.ts +36 -0
  432. package/dist/tpsl/tpsl-confirming.d.ts.map +1 -0
  433. package/dist/tpsl/tpsl-confirming.js +28 -0
  434. package/dist/tpsl/tpsl-confirming.js.map +1 -0
  435. package/dist/tpsl/use-quote-tpsl.d.ts +34 -0
  436. package/dist/tpsl/use-quote-tpsl.d.ts.map +1 -0
  437. package/dist/tpsl/use-quote-tpsl.js +73 -0
  438. package/dist/tpsl/use-quote-tpsl.js.map +1 -0
  439. package/dist/tpsl/use-set-quote-tpsl.d.ts +22 -0
  440. package/dist/tpsl/use-set-quote-tpsl.d.ts.map +1 -0
  441. package/dist/tpsl/use-set-quote-tpsl.js +43 -0
  442. package/dist/tpsl/use-set-quote-tpsl.js.map +1 -0
  443. package/dist/tpsl/use-tpsl-config.d.ts +14 -0
  444. package/dist/tpsl/use-tpsl-config.d.ts.map +1 -0
  445. package/dist/tpsl/use-tpsl-config.js +31 -0
  446. package/dist/tpsl/use-tpsl-config.js.map +1 -0
  447. package/dist/tpsl/use-tpsl-signing-spec.d.ts +13 -0
  448. package/dist/tpsl/use-tpsl-signing-spec.d.ts.map +1 -0
  449. package/dist/tpsl/use-tpsl-signing-spec.js +31 -0
  450. package/dist/tpsl/use-tpsl-signing-spec.js.map +1 -0
  451. package/dist/tpsl/use-watch-tpsl-notifications.d.ts +30 -0
  452. package/dist/tpsl/use-watch-tpsl-notifications.d.ts.map +1 -0
  453. package/dist/tpsl/use-watch-tpsl-notifications.js +44 -0
  454. package/dist/tpsl/use-watch-tpsl-notifications.js.map +1 -0
  455. package/dist/transactions/index.d.ts +4 -0
  456. package/dist/transactions/index.d.ts.map +1 -0
  457. package/dist/transactions/resolve-write-result.d.ts +40 -0
  458. package/dist/transactions/resolve-write-result.d.ts.map +1 -0
  459. package/dist/transactions/resolve-write-result.js +15 -0
  460. package/dist/transactions/resolve-write-result.js.map +1 -0
  461. package/dist/transactions/use-transactions-store.d.ts +52 -0
  462. package/dist/transactions/use-transactions-store.d.ts.map +1 -0
  463. package/dist/transactions/use-transactions-store.js +24 -0
  464. package/dist/transactions/use-transactions-store.js.map +1 -0
  465. package/dist/transactions/write-types.d.ts +28 -0
  466. package/dist/transactions/write-types.d.ts.map +1 -0
  467. package/dist/transfers/index.d.ts +2 -0
  468. package/dist/transfers/index.d.ts.map +1 -0
  469. package/dist/transfers/use-transfer-history.d.ts +26 -0
  470. package/dist/transfers/use-transfer-history.d.ts.map +1 -0
  471. package/dist/transfers/use-transfer-history.js +27 -0
  472. package/dist/transfers/use-transfer-history.js.map +1 -0
  473. package/dist/utils/index.d.ts +2 -0
  474. package/dist/utils/index.d.ts.map +1 -0
  475. package/dist/utils/predicate-match.d.ts +27 -0
  476. package/dist/utils/predicate-match.d.ts.map +1 -0
  477. package/dist/utils/predicate-match.js +18 -0
  478. package/dist/utils/predicate-match.js.map +1 -0
  479. package/dist/wallet/index.d.ts +5 -0
  480. package/dist/wallet/index.d.ts.map +1 -0
  481. package/dist/wallet/use-connect-wallet.d.ts +34 -0
  482. package/dist/wallet/use-connect-wallet.d.ts.map +1 -0
  483. package/dist/wallet/use-connect-wallet.js +24 -0
  484. package/dist/wallet/use-connect-wallet.js.map +1 -0
  485. package/dist/wallet/use-disconnect-wallet.d.ts +20 -0
  486. package/dist/wallet/use-disconnect-wallet.d.ts.map +1 -0
  487. package/dist/wallet/use-disconnect-wallet.js +21 -0
  488. package/dist/wallet/use-disconnect-wallet.js.map +1 -0
  489. package/dist/wallet/use-switch-to-symmio-chain.d.ts +29 -0
  490. package/dist/wallet/use-switch-to-symmio-chain.d.ts.map +1 -0
  491. package/dist/wallet/use-switch-to-symmio-chain.js +24 -0
  492. package/dist/wallet/use-switch-to-symmio-chain.js.map +1 -0
  493. package/dist/wallet/use-wallet-account.d.ts +32 -0
  494. package/dist/wallet/use-wallet-account.d.ts.map +1 -0
  495. package/dist/wallet/use-wallet-account.js +18 -0
  496. package/dist/wallet/use-wallet-account.js.map +1 -0
  497. package/dist/websocket/index.d.ts +2 -0
  498. package/dist/websocket/index.d.ts.map +1 -0
  499. package/dist/websocket/use-notifications.d.ts +48 -0
  500. package/dist/websocket/use-notifications.d.ts.map +1 -0
  501. package/dist/websocket/use-notifications.js +51 -0
  502. package/dist/websocket/use-notifications.js.map +1 -0
  503. package/dist/withdraw/index.d.ts +11 -0
  504. package/dist/withdraw/index.d.ts.map +1 -0
  505. package/dist/withdraw/use-finalize-withdraw-request.d.ts +26 -0
  506. package/dist/withdraw/use-finalize-withdraw-request.d.ts.map +1 -0
  507. package/dist/withdraw/use-finalize-withdraw-request.js +40 -0
  508. package/dist/withdraw/use-finalize-withdraw-request.js.map +1 -0
  509. package/dist/withdraw/use-initiate-withdraw.d.ts +28 -0
  510. package/dist/withdraw/use-initiate-withdraw.d.ts.map +1 -0
  511. package/dist/withdraw/use-initiate-withdraw.js +42 -0
  512. package/dist/withdraw/use-initiate-withdraw.js.map +1 -0
  513. package/dist/withdraw/use-last-withdraw-request-id.d.ts +22 -0
  514. package/dist/withdraw/use-last-withdraw-request-id.d.ts.map +1 -0
  515. package/dist/withdraw/use-last-withdraw-request-id.js +27 -0
  516. package/dist/withdraw/use-last-withdraw-request-id.js.map +1 -0
  517. package/dist/withdraw/use-pending-withdraw-requests.d.ts +21 -0
  518. package/dist/withdraw/use-pending-withdraw-requests.d.ts.map +1 -0
  519. package/dist/withdraw/use-pending-withdraw-requests.js +27 -0
  520. package/dist/withdraw/use-pending-withdraw-requests.js.map +1 -0
  521. package/dist/withdraw/use-request-cancel-withdraw.d.ts +25 -0
  522. package/dist/withdraw/use-request-cancel-withdraw.d.ts.map +1 -0
  523. package/dist/withdraw/use-request-cancel-withdraw.js +40 -0
  524. package/dist/withdraw/use-request-cancel-withdraw.js.map +1 -0
  525. package/dist/withdraw/use-simulate-finalize-withdraw-request.d.ts +25 -0
  526. package/dist/withdraw/use-simulate-finalize-withdraw-request.d.ts.map +1 -0
  527. package/dist/withdraw/use-simulate-finalize-withdraw-request.js +29 -0
  528. package/dist/withdraw/use-simulate-finalize-withdraw-request.js.map +1 -0
  529. package/dist/withdraw/use-simulate-initiate-withdraw.d.ts +26 -0
  530. package/dist/withdraw/use-simulate-initiate-withdraw.d.ts.map +1 -0
  531. package/dist/withdraw/use-simulate-initiate-withdraw.js +29 -0
  532. package/dist/withdraw/use-simulate-initiate-withdraw.js.map +1 -0
  533. package/dist/withdraw/use-simulate-request-cancel-withdraw.d.ts +25 -0
  534. package/dist/withdraw/use-simulate-request-cancel-withdraw.d.ts.map +1 -0
  535. package/dist/withdraw/use-simulate-request-cancel-withdraw.js +29 -0
  536. package/dist/withdraw/use-simulate-request-cancel-withdraw.js.map +1 -0
  537. package/dist/withdraw/use-withdraw-requests.d.ts +21 -0
  538. package/dist/withdraw/use-withdraw-requests.d.ts.map +1 -0
  539. package/dist/withdraw/use-withdraw-requests.js +27 -0
  540. package/dist/withdraw/use-withdraw-requests.js.map +1 -0
  541. package/dist/withdraw/use-withdrawable-time.d.ts +22 -0
  542. package/dist/withdraw/use-withdrawable-time.d.ts.map +1 -0
  543. package/dist/withdraw/use-withdrawable-time.js +27 -0
  544. package/dist/withdraw/use-withdrawable-time.js.map +1 -0
  545. package/package.json +112 -0
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ import { useSymmioChainId as e } from "../provider/use-symmio-chain-id.js";
3
+ import { useSymmioConfig as t } from "../provider/use-symmio-config.js";
4
+ import { normalizeSymmError as n } from "../errors/normalize-symm-error.js";
5
+ import { simulateCreateSubAccountsMutationOptions as r } from "@symmio/trading-core";
6
+ import { useConnection as i } from "wagmi";
7
+ import { useMutation as a } from "@tanstack/react-query";
8
+ //#region src/account-layer/use-simulate-create-sub-accounts.ts
9
+ function o(o = {}) {
10
+ let s = t(o), c = e(), { address: l } = i(), u = r(s);
11
+ return a({
12
+ mutationKey: u.mutationKey,
13
+ mutationFn: async (e) => {
14
+ try {
15
+ return await u.mutationFn({
16
+ ...e,
17
+ chainId: e.chainId ?? c,
18
+ from: e.from ?? l
19
+ });
20
+ } catch (e) {
21
+ throw n(e);
22
+ }
23
+ }
24
+ });
25
+ }
26
+ //#endregion
27
+ export { o as useSimulateCreateSubAccounts };
28
+
29
+ //# sourceMappingURL=use-simulate-create-sub-accounts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-simulate-create-sub-accounts.js","names":[],"sources":["../../src/account-layer/use-simulate-create-sub-accounts.ts"],"sourcesContent":["\"use client\";\n\nimport {\n simulateCreateSubAccountsMutationOptions,\n type ConfigParameter,\n type SimulateCreateSubAccountsParameters,\n type SimulateCreateSubAccountsReturnType,\n} from \"@symmio/trading-core\";\nimport { useMutation, type UseMutationResult } from \"@tanstack/react-query\";\nimport { useConnection } from \"wagmi\";\nimport { normalizeSymmError } from \"../errors/normalize-symm-error\";\nimport type { SymmioRequestError } from \"../errors/symmio-request-error\";\nimport { useSymmioChainId } from \"../provider/use-symmio-chain-id\";\nimport { useSymmioConfig } from \"../provider/use-symmio-config\";\n\n/**\n * Parameters for {@link useSimulateCreateSubAccounts}: an optional `config` override. The dry-run's\n * inputs are passed as the mutation `variables`.\n */\nexport type UseSimulateCreateSubAccountsParameters = ConfigParameter;\n\n/** Return type of {@link useSimulateCreateSubAccounts}. */\nexport type UseSimulateCreateSubAccountsReturnType = UseMutationResult<\n SimulateCreateSubAccountsReturnType,\n SymmioRequestError,\n SimulateCreateSubAccountsParameters\n>;\n\n/**\n * On-demand dry-run (`simulateContract`) of `createSubAccounts`. Call `mutate(args)`\n * to run it; `data` holds viem's `{ request, result }` (a would-be revert surfaces\n * as a normalized {@link SymmioRequestError}). `from` defaults to the connected\n * wallet and `chainId` to the connected chain.\n *\n * @example\n * ```tsx\n * const sim = useSimulateCreateSubAccounts();\n * sim.mutate({ ...args });\n * // sim.data?.result, sim.isPending, sim.error\n * ```\n */\nexport function useSimulateCreateSubAccounts(\n parameters: UseSimulateCreateSubAccountsParameters = {},\n): UseSimulateCreateSubAccountsReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const { address } = useConnection();\n const base = simulateCreateSubAccountsMutationOptions(config);\n\n return useMutation<SimulateCreateSubAccountsReturnType, SymmioRequestError, SimulateCreateSubAccountsParameters>({\n mutationKey: base.mutationKey,\n mutationFn: async (variables) => {\n try {\n return await base.mutationFn({\n ...variables,\n chainId: variables.chainId ?? chainId,\n from: variables.from ?? address,\n });\n } catch (err) {\n throw normalizeSymmError(err);\n }\n },\n });\n}\n"],"mappings":";;;;;;;;AAyCA,SAAgB,EACd,IAAqD,CAAC,GACd;CACxC,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB,GAC3B,EAAE,eAAY,EAAc,GAC5B,IAAO,EAAyC,CAAM;CAE5D,OAAO,EAA0G;EAC/G,aAAa,EAAK;EAClB,YAAY,OAAO,MAAc;GAC/B,IAAI;IACF,OAAO,MAAM,EAAK,WAAW;KAC3B,GAAG;KACH,SAAS,EAAU,WAAW;KAC9B,MAAM,EAAU,QAAQ;IAC1B,CAAC;GACH,SAAS,GAAK;IACZ,MAAM,EAAmB,CAAG;GAC9B;EACF;CACF,CAAC;AACH"}
@@ -0,0 +1,29 @@
1
+ import { ConfigParameter, SimulateDeallocateParameters, SimulateDeallocateReturnType } from '@symmio/trading-core';
2
+ import { UseMutationResult } from '@tanstack/react-query';
3
+ import { SymmioRequestError } from '../errors/symmio-request-error';
4
+ /**
5
+ * Parameters for {@link useSimulateDeallocate}: an optional `config` override. The
6
+ * dry-run's inputs (including a `upnlSig`) are passed as the mutation `variables`.
7
+ */
8
+ export type UseSimulateDeallocateParameters = ConfigParameter;
9
+ /** Return type of {@link useSimulateDeallocate}. */
10
+ export type UseSimulateDeallocateReturnType = UseMutationResult<SimulateDeallocateReturnType, SymmioRequestError, SimulateDeallocateParameters>;
11
+ /**
12
+ * On-demand dry-run (`simulateContract`) of `deallocate`. Call `mutate(args)` to
13
+ * run it; `data` holds viem's `{ request, result }`. A would-be revert (the
14
+ * deallocate debounce, an insolvent result, or a stale `upnlSig`) surfaces as a
15
+ * normalized {@link SymmioRequestError}. `from` defaults to the connected wallet
16
+ * and `chainId` to the connected chain.
17
+ *
18
+ * @remarks
19
+ * The `upnlSig` is still required here — fetch it (e.g. with `useDeallocateUpnlSig`)
20
+ * before simulating.
21
+ *
22
+ * @example
23
+ * ```tsx
24
+ * const sim = useSimulateDeallocate();
25
+ * sim.mutate({ account: "0xsub…", amount: 1_000000000000000000n, upnlSig });
26
+ * ```
27
+ */
28
+ export declare function useSimulateDeallocate(parameters?: UseSimulateDeallocateParameters): UseSimulateDeallocateReturnType;
29
+ //# sourceMappingURL=use-simulate-deallocate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-simulate-deallocate.d.ts","sourceRoot":"","sources":["../../src/account-layer/use-simulate-deallocate.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,4BAA4B,EACjC,KAAK,4BAA4B,EAClC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAe,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAG5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE;;;GAGG;AACH,MAAM,MAAM,+BAA+B,GAAG,eAAe,CAAC;AAE9D,oDAAoD;AACpD,MAAM,MAAM,+BAA+B,GAAG,iBAAiB,CAC7D,4BAA4B,EAC5B,kBAAkB,EAClB,4BAA4B,CAC7B,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,GAAE,+BAAoC,GAC/C,+BAA+B,CAoBjC"}
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ import { useSymmioChainId as e } from "../provider/use-symmio-chain-id.js";
3
+ import { useSymmioConfig as t } from "../provider/use-symmio-config.js";
4
+ import { normalizeSymmError as n } from "../errors/normalize-symm-error.js";
5
+ import { simulateDeallocateMutationOptions as r } from "@symmio/trading-core";
6
+ import { useConnection as i } from "wagmi";
7
+ import { useMutation as a } from "@tanstack/react-query";
8
+ //#region src/account-layer/use-simulate-deallocate.ts
9
+ function o(o = {}) {
10
+ let s = t(o), c = e(), { address: l } = i(), u = r(s);
11
+ return a({
12
+ mutationKey: u.mutationKey,
13
+ mutationFn: async (e) => {
14
+ try {
15
+ return await u.mutationFn({
16
+ ...e,
17
+ chainId: e.chainId ?? c,
18
+ from: e.from ?? l
19
+ });
20
+ } catch (e) {
21
+ throw n(e);
22
+ }
23
+ }
24
+ });
25
+ }
26
+ //#endregion
27
+ export { o as useSimulateDeallocate };
28
+
29
+ //# sourceMappingURL=use-simulate-deallocate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-simulate-deallocate.js","names":[],"sources":["../../src/account-layer/use-simulate-deallocate.ts"],"sourcesContent":["\"use client\";\n\nimport {\n simulateDeallocateMutationOptions,\n type ConfigParameter,\n type SimulateDeallocateParameters,\n type SimulateDeallocateReturnType,\n} from \"@symmio/trading-core\";\nimport { useMutation, type UseMutationResult } from \"@tanstack/react-query\";\nimport { useConnection } from \"wagmi\";\nimport { normalizeSymmError } from \"../errors/normalize-symm-error\";\nimport type { SymmioRequestError } from \"../errors/symmio-request-error\";\nimport { useSymmioChainId } from \"../provider/use-symmio-chain-id\";\nimport { useSymmioConfig } from \"../provider/use-symmio-config\";\n\n/**\n * Parameters for {@link useSimulateDeallocate}: an optional `config` override. The\n * dry-run's inputs (including a `upnlSig`) are passed as the mutation `variables`.\n */\nexport type UseSimulateDeallocateParameters = ConfigParameter;\n\n/** Return type of {@link useSimulateDeallocate}. */\nexport type UseSimulateDeallocateReturnType = UseMutationResult<\n SimulateDeallocateReturnType,\n SymmioRequestError,\n SimulateDeallocateParameters\n>;\n\n/**\n * On-demand dry-run (`simulateContract`) of `deallocate`. Call `mutate(args)` to\n * run it; `data` holds viem's `{ request, result }`. A would-be revert (the\n * deallocate debounce, an insolvent result, or a stale `upnlSig`) surfaces as a\n * normalized {@link SymmioRequestError}. `from` defaults to the connected wallet\n * and `chainId` to the connected chain.\n *\n * @remarks\n * The `upnlSig` is still required here — fetch it (e.g. with `useDeallocateUpnlSig`)\n * before simulating.\n *\n * @example\n * ```tsx\n * const sim = useSimulateDeallocate();\n * sim.mutate({ account: \"0xsub…\", amount: 1_000000000000000000n, upnlSig });\n * ```\n */\nexport function useSimulateDeallocate(\n parameters: UseSimulateDeallocateParameters = {},\n): UseSimulateDeallocateReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const { address } = useConnection();\n const base = simulateDeallocateMutationOptions(config);\n\n return useMutation<SimulateDeallocateReturnType, SymmioRequestError, SimulateDeallocateParameters>({\n mutationKey: base.mutationKey,\n mutationFn: async (variables) => {\n try {\n return await base.mutationFn({\n ...variables,\n chainId: variables.chainId ?? chainId,\n from: variables.from ?? address,\n });\n } catch (err) {\n throw normalizeSymmError(err);\n }\n },\n });\n}\n"],"mappings":";;;;;;;;AA6CA,SAAgB,EACd,IAA8C,CAAC,GACd;CACjC,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB,GAC3B,EAAE,eAAY,EAAc,GAC5B,IAAO,EAAkC,CAAM;CAErD,OAAO,EAA4F;EACjG,aAAa,EAAK;EAClB,YAAY,OAAO,MAAc;GAC/B,IAAI;IACF,OAAO,MAAM,EAAK,WAAW;KAC3B,GAAG;KACH,SAAS,EAAU,WAAW;KAC9B,MAAM,EAAU,QAAQ;IAC1B,CAAC;GACH,SAAS,GAAK;IACZ,MAAM,EAAmB,CAAG;GAC9B;EACF;CACF,CAAC;AACH"}
@@ -0,0 +1,25 @@
1
+ import { ConfigParameter, SimulateDeleteSubAccountParameters, SimulateDeleteSubAccountReturnType } from '@symmio/trading-core';
2
+ import { UseMutationResult } from '@tanstack/react-query';
3
+ import { SymmioRequestError } from '../errors/symmio-request-error';
4
+ /**
5
+ * Parameters for {@link useSimulateDeleteSubAccount}: an optional `config` override. The dry-run's
6
+ * inputs are passed as the mutation `variables`.
7
+ */
8
+ export type UseSimulateDeleteSubAccountParameters = ConfigParameter;
9
+ /** Return type of {@link useSimulateDeleteSubAccount}. */
10
+ export type UseSimulateDeleteSubAccountReturnType = UseMutationResult<SimulateDeleteSubAccountReturnType, SymmioRequestError, SimulateDeleteSubAccountParameters>;
11
+ /**
12
+ * On-demand dry-run (`simulateContract`) of `deleteSubAccount`. Call `mutate(args)`
13
+ * to run it; `data` holds viem's `{ request, result }` (a would-be revert surfaces
14
+ * as a normalized {@link SymmioRequestError}). `from` defaults to the connected
15
+ * wallet and `chainId` to the connected chain.
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * const sim = useSimulateDeleteSubAccount();
20
+ * sim.mutate({ subAccount: "0xsub…" });
21
+ * // sim.isSuccess, sim.isPending, sim.error
22
+ * ```
23
+ */
24
+ export declare function useSimulateDeleteSubAccount(parameters?: UseSimulateDeleteSubAccountParameters): UseSimulateDeleteSubAccountReturnType;
25
+ //# sourceMappingURL=use-simulate-delete-sub-account.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-simulate-delete-sub-account.d.ts","sourceRoot":"","sources":["../../src/account-layer/use-simulate-delete-sub-account.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,kCAAkC,EACvC,KAAK,kCAAkC,EACxC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAe,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAG5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE;;;GAGG;AACH,MAAM,MAAM,qCAAqC,GAAG,eAAe,CAAC;AAEpE,0DAA0D;AAC1D,MAAM,MAAM,qCAAqC,GAAG,iBAAiB,CACnE,kCAAkC,EAClC,kBAAkB,EAClB,kCAAkC,CACnC,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,wBAAgB,2BAA2B,CACzC,UAAU,GAAE,qCAA0C,GACrD,qCAAqC,CAoBvC"}
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ import { useSymmioChainId as e } from "../provider/use-symmio-chain-id.js";
3
+ import { useSymmioConfig as t } from "../provider/use-symmio-config.js";
4
+ import { normalizeSymmError as n } from "../errors/normalize-symm-error.js";
5
+ import { simulateDeleteSubAccountMutationOptions as r } from "@symmio/trading-core";
6
+ import { useConnection as i } from "wagmi";
7
+ import { useMutation as a } from "@tanstack/react-query";
8
+ //#region src/account-layer/use-simulate-delete-sub-account.ts
9
+ function o(o = {}) {
10
+ let s = t(o), c = e(), { address: l } = i(), u = r(s);
11
+ return a({
12
+ mutationKey: u.mutationKey,
13
+ mutationFn: async (e) => {
14
+ try {
15
+ return await u.mutationFn({
16
+ ...e,
17
+ chainId: e.chainId ?? c,
18
+ from: e.from ?? l
19
+ });
20
+ } catch (e) {
21
+ throw n(e);
22
+ }
23
+ }
24
+ });
25
+ }
26
+ //#endregion
27
+ export { o as useSimulateDeleteSubAccount };
28
+
29
+ //# sourceMappingURL=use-simulate-delete-sub-account.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-simulate-delete-sub-account.js","names":[],"sources":["../../src/account-layer/use-simulate-delete-sub-account.ts"],"sourcesContent":["\"use client\";\n\nimport {\n simulateDeleteSubAccountMutationOptions,\n type ConfigParameter,\n type SimulateDeleteSubAccountParameters,\n type SimulateDeleteSubAccountReturnType,\n} from \"@symmio/trading-core\";\nimport { useMutation, type UseMutationResult } from \"@tanstack/react-query\";\nimport { useConnection } from \"wagmi\";\nimport { normalizeSymmError } from \"../errors/normalize-symm-error\";\nimport type { SymmioRequestError } from \"../errors/symmio-request-error\";\nimport { useSymmioChainId } from \"../provider/use-symmio-chain-id\";\nimport { useSymmioConfig } from \"../provider/use-symmio-config\";\n\n/**\n * Parameters for {@link useSimulateDeleteSubAccount}: an optional `config` override. The dry-run's\n * inputs are passed as the mutation `variables`.\n */\nexport type UseSimulateDeleteSubAccountParameters = ConfigParameter;\n\n/** Return type of {@link useSimulateDeleteSubAccount}. */\nexport type UseSimulateDeleteSubAccountReturnType = UseMutationResult<\n SimulateDeleteSubAccountReturnType,\n SymmioRequestError,\n SimulateDeleteSubAccountParameters\n>;\n\n/**\n * On-demand dry-run (`simulateContract`) of `deleteSubAccount`. Call `mutate(args)`\n * to run it; `data` holds viem's `{ request, result }` (a would-be revert surfaces\n * as a normalized {@link SymmioRequestError}). `from` defaults to the connected\n * wallet and `chainId` to the connected chain.\n *\n * @example\n * ```tsx\n * const sim = useSimulateDeleteSubAccount();\n * sim.mutate({ subAccount: \"0xsub…\" });\n * // sim.isSuccess, sim.isPending, sim.error\n * ```\n */\nexport function useSimulateDeleteSubAccount(\n parameters: UseSimulateDeleteSubAccountParameters = {},\n): UseSimulateDeleteSubAccountReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const { address } = useConnection();\n const base = simulateDeleteSubAccountMutationOptions(config);\n\n return useMutation<SimulateDeleteSubAccountReturnType, SymmioRequestError, SimulateDeleteSubAccountParameters>({\n mutationKey: base.mutationKey,\n mutationFn: async (variables) => {\n try {\n return await base.mutationFn({\n ...variables,\n chainId: variables.chainId ?? chainId,\n from: variables.from ?? address,\n });\n } catch (err) {\n throw normalizeSymmError(err);\n }\n },\n });\n}\n"],"mappings":";;;;;;;;AAyCA,SAAgB,EACd,IAAoD,CAAC,GACd;CACvC,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB,GAC3B,EAAE,eAAY,EAAc,GAC5B,IAAO,EAAwC,CAAM;CAE3D,OAAO,EAAwG;EAC7G,aAAa,EAAK;EAClB,YAAY,OAAO,MAAc;GAC/B,IAAI;IACF,OAAO,MAAM,EAAK,WAAW;KAC3B,GAAG;KACH,SAAS,EAAU,WAAW;KAC9B,MAAM,EAAU,QAAQ;IAC1B,CAAC;GACH,SAAS,GAAK;IACZ,MAAM,EAAmB,CAAG;GAC9B;EACF;CACF,CAAC;AACH"}
@@ -0,0 +1,25 @@
1
+ import { ConfigParameter, SimulateDepositAndAllocateForAccountParameters, SimulateDepositAndAllocateForAccountReturnType } from '@symmio/trading-core';
2
+ import { UseMutationResult } from '@tanstack/react-query';
3
+ import { SymmioRequestError } from '../errors/symmio-request-error';
4
+ /**
5
+ * Parameters for {@link useSimulateDepositAndAllocate}: an optional `config` override. The dry-run's
6
+ * inputs are passed as the mutation `variables`.
7
+ */
8
+ export type UseSimulateDepositAndAllocateParameters = ConfigParameter;
9
+ /** Return type of {@link useSimulateDepositAndAllocate}. */
10
+ export type UseSimulateDepositAndAllocateReturnType = UseMutationResult<SimulateDepositAndAllocateForAccountReturnType, SymmioRequestError, SimulateDepositAndAllocateForAccountParameters>;
11
+ /**
12
+ * On-demand dry-run (`simulateContract`) of `depositAndAllocateForAccount`. Call
13
+ * `mutate(args)` to run it; `data` holds viem's `{ request, result }` (a would-be
14
+ * revert surfaces as a normalized {@link SymmioRequestError}). `from` defaults to
15
+ * the connected wallet and `chainId` to the connected chain.
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * const sim = useSimulateDepositAndAllocate();
20
+ * sim.mutate({ ...args });
21
+ * // sim.data?.result, sim.isPending, sim.error
22
+ * ```
23
+ */
24
+ export declare function useSimulateDepositAndAllocate(parameters?: UseSimulateDepositAndAllocateParameters): UseSimulateDepositAndAllocateReturnType;
25
+ //# sourceMappingURL=use-simulate-deposit-and-allocate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-simulate-deposit-and-allocate.d.ts","sourceRoot":"","sources":["../../src/account-layer/use-simulate-deposit-and-allocate.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,8CAA8C,EACnD,KAAK,8CAA8C,EACpD,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAe,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAG5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE;;;GAGG;AACH,MAAM,MAAM,uCAAuC,GAAG,eAAe,CAAC;AAEtE,4DAA4D;AAC5D,MAAM,MAAM,uCAAuC,GAAG,iBAAiB,CACrE,8CAA8C,EAC9C,kBAAkB,EAClB,8CAA8C,CAC/C,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,wBAAgB,6BAA6B,CAC3C,UAAU,GAAE,uCAA4C,GACvD,uCAAuC,CAwBzC"}
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ import { useSymmioChainId as e } from "../provider/use-symmio-chain-id.js";
3
+ import { useSymmioConfig as t } from "../provider/use-symmio-config.js";
4
+ import { normalizeSymmError as n } from "../errors/normalize-symm-error.js";
5
+ import { simulateDepositAndAllocateForAccountMutationOptions as r } from "@symmio/trading-core";
6
+ import { useConnection as i } from "wagmi";
7
+ import { useMutation as a } from "@tanstack/react-query";
8
+ //#region src/account-layer/use-simulate-deposit-and-allocate.ts
9
+ function o(o = {}) {
10
+ let s = t(o), c = e(), { address: l } = i(), u = r(s);
11
+ return a({
12
+ mutationKey: u.mutationKey,
13
+ mutationFn: async (e) => {
14
+ try {
15
+ return await u.mutationFn({
16
+ ...e,
17
+ chainId: e.chainId ?? c,
18
+ from: e.from ?? l
19
+ });
20
+ } catch (e) {
21
+ throw n(e);
22
+ }
23
+ }
24
+ });
25
+ }
26
+ //#endregion
27
+ export { o as useSimulateDepositAndAllocate };
28
+
29
+ //# sourceMappingURL=use-simulate-deposit-and-allocate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-simulate-deposit-and-allocate.js","names":[],"sources":["../../src/account-layer/use-simulate-deposit-and-allocate.ts"],"sourcesContent":["\"use client\";\n\nimport {\n simulateDepositAndAllocateForAccountMutationOptions,\n type ConfigParameter,\n type SimulateDepositAndAllocateForAccountParameters,\n type SimulateDepositAndAllocateForAccountReturnType,\n} from \"@symmio/trading-core\";\nimport { useMutation, type UseMutationResult } from \"@tanstack/react-query\";\nimport { useConnection } from \"wagmi\";\nimport { normalizeSymmError } from \"../errors/normalize-symm-error\";\nimport type { SymmioRequestError } from \"../errors/symmio-request-error\";\nimport { useSymmioChainId } from \"../provider/use-symmio-chain-id\";\nimport { useSymmioConfig } from \"../provider/use-symmio-config\";\n\n/**\n * Parameters for {@link useSimulateDepositAndAllocate}: an optional `config` override. The dry-run's\n * inputs are passed as the mutation `variables`.\n */\nexport type UseSimulateDepositAndAllocateParameters = ConfigParameter;\n\n/** Return type of {@link useSimulateDepositAndAllocate}. */\nexport type UseSimulateDepositAndAllocateReturnType = UseMutationResult<\n SimulateDepositAndAllocateForAccountReturnType,\n SymmioRequestError,\n SimulateDepositAndAllocateForAccountParameters\n>;\n\n/**\n * On-demand dry-run (`simulateContract`) of `depositAndAllocateForAccount`. Call\n * `mutate(args)` to run it; `data` holds viem's `{ request, result }` (a would-be\n * revert surfaces as a normalized {@link SymmioRequestError}). `from` defaults to\n * the connected wallet and `chainId` to the connected chain.\n *\n * @example\n * ```tsx\n * const sim = useSimulateDepositAndAllocate();\n * sim.mutate({ ...args });\n * // sim.data?.result, sim.isPending, sim.error\n * ```\n */\nexport function useSimulateDepositAndAllocate(\n parameters: UseSimulateDepositAndAllocateParameters = {},\n): UseSimulateDepositAndAllocateReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const { address } = useConnection();\n const base = simulateDepositAndAllocateForAccountMutationOptions(config);\n\n return useMutation<\n SimulateDepositAndAllocateForAccountReturnType,\n SymmioRequestError,\n SimulateDepositAndAllocateForAccountParameters\n >({\n mutationKey: base.mutationKey,\n mutationFn: async (variables) => {\n try {\n return await base.mutationFn({\n ...variables,\n chainId: variables.chainId ?? chainId,\n from: variables.from ?? address,\n });\n } catch (err) {\n throw normalizeSymmError(err);\n }\n },\n });\n}\n"],"mappings":";;;;;;;;AAyCA,SAAgB,EACd,IAAsD,CAAC,GACd;CACzC,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB,GAC3B,EAAE,eAAY,EAAc,GAC5B,IAAO,EAAoD,CAAM;CAEvE,OAAO,EAIL;EACA,aAAa,EAAK;EAClB,YAAY,OAAO,MAAc;GAC/B,IAAI;IACF,OAAO,MAAM,EAAK,WAAW;KAC3B,GAAG;KACH,SAAS,EAAU,WAAW;KAC9B,MAAM,EAAU,QAAQ;IAC1B,CAAC;GACH,SAAS,GAAK;IACZ,MAAM,EAAmB,CAAG;GAC9B;EACF;CACF,CAAC;AACH"}
@@ -0,0 +1,25 @@
1
+ import { ConfigParameter, SimulateDepositForAccountParameters, SimulateDepositForAccountReturnType } from '@symmio/trading-core';
2
+ import { UseMutationResult } from '@tanstack/react-query';
3
+ import { SymmioRequestError } from '../errors/symmio-request-error';
4
+ /**
5
+ * Parameters for {@link useSimulateDeposit}: an optional `config` override. The dry-run's
6
+ * inputs are passed as the mutation `variables`.
7
+ */
8
+ export type UseSimulateDepositParameters = ConfigParameter;
9
+ /** Return type of {@link useSimulateDeposit}. */
10
+ export type UseSimulateDepositReturnType = UseMutationResult<SimulateDepositForAccountReturnType, SymmioRequestError, SimulateDepositForAccountParameters>;
11
+ /**
12
+ * On-demand dry-run (`simulateContract`) of `depositForAccount`. Call
13
+ * `mutate(args)` to run it; `data` holds viem's `{ request, result }` (a would-be
14
+ * revert surfaces as a normalized {@link SymmioRequestError}). `from` defaults to
15
+ * the connected wallet and `chainId` to the connected chain.
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * const sim = useSimulateDeposit();
20
+ * sim.mutate({ ...args });
21
+ * // sim.data?.result, sim.isPending, sim.error
22
+ * ```
23
+ */
24
+ export declare function useSimulateDeposit(parameters?: UseSimulateDepositParameters): UseSimulateDepositReturnType;
25
+ //# sourceMappingURL=use-simulate-deposit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-simulate-deposit.d.ts","sourceRoot":"","sources":["../../src/account-layer/use-simulate-deposit.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,mCAAmC,EACxC,KAAK,mCAAmC,EACzC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAe,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAG5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE;;;GAGG;AACH,MAAM,MAAM,4BAA4B,GAAG,eAAe,CAAC;AAE3D,iDAAiD;AACjD,MAAM,MAAM,4BAA4B,GAAG,iBAAiB,CAC1D,mCAAmC,EACnC,kBAAkB,EAClB,mCAAmC,CACpC,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,GAAE,4BAAiC,GAAG,4BAA4B,CAoB9G"}
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ import { useSymmioChainId as e } from "../provider/use-symmio-chain-id.js";
3
+ import { useSymmioConfig as t } from "../provider/use-symmio-config.js";
4
+ import { normalizeSymmError as n } from "../errors/normalize-symm-error.js";
5
+ import { simulateDepositForAccountMutationOptions as r } from "@symmio/trading-core";
6
+ import { useConnection as i } from "wagmi";
7
+ import { useMutation as a } from "@tanstack/react-query";
8
+ //#region src/account-layer/use-simulate-deposit.ts
9
+ function o(o = {}) {
10
+ let s = t(o), c = e(), { address: l } = i(), u = r(s);
11
+ return a({
12
+ mutationKey: u.mutationKey,
13
+ mutationFn: async (e) => {
14
+ try {
15
+ return await u.mutationFn({
16
+ ...e,
17
+ chainId: e.chainId ?? c,
18
+ from: e.from ?? l
19
+ });
20
+ } catch (e) {
21
+ throw n(e);
22
+ }
23
+ }
24
+ });
25
+ }
26
+ //#endregion
27
+ export { o as useSimulateDeposit };
28
+
29
+ //# sourceMappingURL=use-simulate-deposit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-simulate-deposit.js","names":[],"sources":["../../src/account-layer/use-simulate-deposit.ts"],"sourcesContent":["\"use client\";\n\nimport {\n simulateDepositForAccountMutationOptions,\n type ConfigParameter,\n type SimulateDepositForAccountParameters,\n type SimulateDepositForAccountReturnType,\n} from \"@symmio/trading-core\";\nimport { useMutation, type UseMutationResult } from \"@tanstack/react-query\";\nimport { useConnection } from \"wagmi\";\nimport { normalizeSymmError } from \"../errors/normalize-symm-error\";\nimport type { SymmioRequestError } from \"../errors/symmio-request-error\";\nimport { useSymmioChainId } from \"../provider/use-symmio-chain-id\";\nimport { useSymmioConfig } from \"../provider/use-symmio-config\";\n\n/**\n * Parameters for {@link useSimulateDeposit}: an optional `config` override. The dry-run's\n * inputs are passed as the mutation `variables`.\n */\nexport type UseSimulateDepositParameters = ConfigParameter;\n\n/** Return type of {@link useSimulateDeposit}. */\nexport type UseSimulateDepositReturnType = UseMutationResult<\n SimulateDepositForAccountReturnType,\n SymmioRequestError,\n SimulateDepositForAccountParameters\n>;\n\n/**\n * On-demand dry-run (`simulateContract`) of `depositForAccount`. Call\n * `mutate(args)` to run it; `data` holds viem's `{ request, result }` (a would-be\n * revert surfaces as a normalized {@link SymmioRequestError}). `from` defaults to\n * the connected wallet and `chainId` to the connected chain.\n *\n * @example\n * ```tsx\n * const sim = useSimulateDeposit();\n * sim.mutate({ ...args });\n * // sim.data?.result, sim.isPending, sim.error\n * ```\n */\nexport function useSimulateDeposit(parameters: UseSimulateDepositParameters = {}): UseSimulateDepositReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const { address } = useConnection();\n const base = simulateDepositForAccountMutationOptions(config);\n\n return useMutation<SimulateDepositForAccountReturnType, SymmioRequestError, SimulateDepositForAccountParameters>({\n mutationKey: base.mutationKey,\n mutationFn: async (variables) => {\n try {\n return await base.mutationFn({\n ...variables,\n chainId: variables.chainId ?? chainId,\n from: variables.from ?? address,\n });\n } catch (err) {\n throw normalizeSymmError(err);\n }\n },\n });\n}\n"],"mappings":";;;;;;;;AAyCA,SAAgB,EAAmB,IAA2C,CAAC,GAAiC;CAC9G,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB,GAC3B,EAAE,eAAY,EAAc,GAC5B,IAAO,EAAyC,CAAM;CAE5D,OAAO,EAA0G;EAC/G,aAAa,EAAK;EAClB,YAAY,OAAO,MAAc;GAC/B,IAAI;IACF,OAAO,MAAM,EAAK,WAAW;KAC3B,GAAG;KACH,SAAS,EAAU,WAAW;KAC9B,MAAM,EAAU,QAAQ;IAC1B,CAAC;GACH,SAAS,GAAK;IACZ,MAAM,EAAmB,CAAG;GAC9B;EACF;CACF,CAAC;AACH"}
@@ -0,0 +1,25 @@
1
+ import { ConfigParameter, SimulateEditAccountNameParameters, SimulateEditAccountNameReturnType } from '@symmio/trading-core';
2
+ import { UseMutationResult } from '@tanstack/react-query';
3
+ import { SymmioRequestError } from '../errors/symmio-request-error';
4
+ /**
5
+ * Parameters for {@link useSimulateEditAccountName}: an optional `config` override. The dry-run's
6
+ * inputs are passed as the mutation `variables`.
7
+ */
8
+ export type UseSimulateEditAccountNameParameters = ConfigParameter;
9
+ /** Return type of {@link useSimulateEditAccountName}. */
10
+ export type UseSimulateEditAccountNameReturnType = UseMutationResult<SimulateEditAccountNameReturnType, SymmioRequestError, SimulateEditAccountNameParameters>;
11
+ /**
12
+ * On-demand dry-run (`simulateContract`) of `editAccountName`. Call
13
+ * `mutate(args)` to run it; `data` holds viem's `{ request, result }` (a would-be
14
+ * revert surfaces as a normalized {@link SymmioRequestError}). `from` defaults to
15
+ * the connected wallet and `chainId` to the connected chain.
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * const sim = useSimulateEditAccountName();
20
+ * sim.mutate({ ...args });
21
+ * // sim.data?.result, sim.isPending, sim.error
22
+ * ```
23
+ */
24
+ export declare function useSimulateEditAccountName(parameters?: UseSimulateEditAccountNameParameters): UseSimulateEditAccountNameReturnType;
25
+ //# sourceMappingURL=use-simulate-edit-account-name.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-simulate-edit-account-name.d.ts","sourceRoot":"","sources":["../../src/account-layer/use-simulate-edit-account-name.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,iCAAiC,EACtC,KAAK,iCAAiC,EACvC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAe,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAG5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE;;;GAGG;AACH,MAAM,MAAM,oCAAoC,GAAG,eAAe,CAAC;AAEnE,yDAAyD;AACzD,MAAM,MAAM,oCAAoC,GAAG,iBAAiB,CAClE,iCAAiC,EACjC,kBAAkB,EAClB,iCAAiC,CAClC,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,wBAAgB,0BAA0B,CACxC,UAAU,GAAE,oCAAyC,GACpD,oCAAoC,CAoBtC"}
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ import { useSymmioChainId as e } from "../provider/use-symmio-chain-id.js";
3
+ import { useSymmioConfig as t } from "../provider/use-symmio-config.js";
4
+ import { normalizeSymmError as n } from "../errors/normalize-symm-error.js";
5
+ import { simulateEditAccountNameMutationOptions as r } from "@symmio/trading-core";
6
+ import { useConnection as i } from "wagmi";
7
+ import { useMutation as a } from "@tanstack/react-query";
8
+ //#region src/account-layer/use-simulate-edit-account-name.ts
9
+ function o(o = {}) {
10
+ let s = t(o), c = e(), { address: l } = i(), u = r(s);
11
+ return a({
12
+ mutationKey: u.mutationKey,
13
+ mutationFn: async (e) => {
14
+ try {
15
+ return await u.mutationFn({
16
+ ...e,
17
+ chainId: e.chainId ?? c,
18
+ from: e.from ?? l
19
+ });
20
+ } catch (e) {
21
+ throw n(e);
22
+ }
23
+ }
24
+ });
25
+ }
26
+ //#endregion
27
+ export { o as useSimulateEditAccountName };
28
+
29
+ //# sourceMappingURL=use-simulate-edit-account-name.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-simulate-edit-account-name.js","names":[],"sources":["../../src/account-layer/use-simulate-edit-account-name.ts"],"sourcesContent":["\"use client\";\n\nimport {\n simulateEditAccountNameMutationOptions,\n type ConfigParameter,\n type SimulateEditAccountNameParameters,\n type SimulateEditAccountNameReturnType,\n} from \"@symmio/trading-core\";\nimport { useMutation, type UseMutationResult } from \"@tanstack/react-query\";\nimport { useConnection } from \"wagmi\";\nimport { normalizeSymmError } from \"../errors/normalize-symm-error\";\nimport type { SymmioRequestError } from \"../errors/symmio-request-error\";\nimport { useSymmioChainId } from \"../provider/use-symmio-chain-id\";\nimport { useSymmioConfig } from \"../provider/use-symmio-config\";\n\n/**\n * Parameters for {@link useSimulateEditAccountName}: an optional `config` override. The dry-run's\n * inputs are passed as the mutation `variables`.\n */\nexport type UseSimulateEditAccountNameParameters = ConfigParameter;\n\n/** Return type of {@link useSimulateEditAccountName}. */\nexport type UseSimulateEditAccountNameReturnType = UseMutationResult<\n SimulateEditAccountNameReturnType,\n SymmioRequestError,\n SimulateEditAccountNameParameters\n>;\n\n/**\n * On-demand dry-run (`simulateContract`) of `editAccountName`. Call\n * `mutate(args)` to run it; `data` holds viem's `{ request, result }` (a would-be\n * revert surfaces as a normalized {@link SymmioRequestError}). `from` defaults to\n * the connected wallet and `chainId` to the connected chain.\n *\n * @example\n * ```tsx\n * const sim = useSimulateEditAccountName();\n * sim.mutate({ ...args });\n * // sim.data?.result, sim.isPending, sim.error\n * ```\n */\nexport function useSimulateEditAccountName(\n parameters: UseSimulateEditAccountNameParameters = {},\n): UseSimulateEditAccountNameReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const { address } = useConnection();\n const base = simulateEditAccountNameMutationOptions(config);\n\n return useMutation<SimulateEditAccountNameReturnType, SymmioRequestError, SimulateEditAccountNameParameters>({\n mutationKey: base.mutationKey,\n mutationFn: async (variables) => {\n try {\n return await base.mutationFn({\n ...variables,\n chainId: variables.chainId ?? chainId,\n from: variables.from ?? address,\n });\n } catch (err) {\n throw normalizeSymmError(err);\n }\n },\n });\n}\n"],"mappings":";;;;;;;;AAyCA,SAAgB,EACd,IAAmD,CAAC,GACd;CACtC,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB,GAC3B,EAAE,eAAY,EAAc,GAC5B,IAAO,EAAuC,CAAM;CAE1D,OAAO,EAAsG;EAC3G,aAAa,EAAK;EAClB,YAAY,OAAO,MAAc;GAC/B,IAAI;IACF,OAAO,MAAM,EAAK,WAAW;KAC3B,GAAG;KACH,SAAS,EAAU,WAAW;KAC9B,MAAM,EAAU,QAAQ;IAC1B,CAAC;GACH,SAAS,GAAK;IACZ,MAAM,EAAmB,CAAG;GAC9B;EACF;CACF,CAAC;AACH"}
@@ -0,0 +1,30 @@
1
+ import { ConfigParameter, SimulateRemoveMarginParameters, SimulateRemoveMarginReturnType } from '@symmio/trading-core';
2
+ import { UseMutationResult } from '@tanstack/react-query';
3
+ import { SymmioRequestError } from '../errors/symmio-request-error';
4
+ /**
5
+ * Parameters for {@link useSimulateRemoveMargin}: an optional `config` override.
6
+ * The dry-run's inputs (including a `upnlSig`) are passed as the mutation
7
+ * `variables`.
8
+ */
9
+ export type UseSimulateRemoveMarginParameters = ConfigParameter;
10
+ /** Return type of {@link useSimulateRemoveMargin}. */
11
+ export type UseSimulateRemoveMarginReturnType = UseMutationResult<SimulateRemoveMarginReturnType, SymmioRequestError, SimulateRemoveMarginParameters>;
12
+ /**
13
+ * On-demand dry-run (`simulateContract`) of `removeMargin`. Call `mutate(args)`
14
+ * to run it; `data` holds viem's `{ request, result }`. A would-be revert (the
15
+ * deallocate debounce, an insolvent result, or a stale `upnlSig`) surfaces as a
16
+ * normalized {@link SymmioRequestError}. `from` defaults to the connected wallet
17
+ * and `chainId` to the connected chain.
18
+ *
19
+ * @remarks
20
+ * The `upnlSig` is still required here — fetch it (e.g. with `useDeallocateUpnlSig`)
21
+ * before simulating.
22
+ *
23
+ * @example
24
+ * ```tsx
25
+ * const sim = useSimulateRemoveMargin();
26
+ * sim.mutate({ virtualAccount: "0xva…", amount: 50_000000000000000000n, upnlSig });
27
+ * ```
28
+ */
29
+ export declare function useSimulateRemoveMargin(parameters?: UseSimulateRemoveMarginParameters): UseSimulateRemoveMarginReturnType;
30
+ //# sourceMappingURL=use-simulate-remove-margin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-simulate-remove-margin.d.ts","sourceRoot":"","sources":["../../src/account-layer/use-simulate-remove-margin.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,8BAA8B,EACnC,KAAK,8BAA8B,EACpC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAe,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAG5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE;;;;GAIG;AACH,MAAM,MAAM,iCAAiC,GAAG,eAAe,CAAC;AAEhE,sDAAsD;AACtD,MAAM,MAAM,iCAAiC,GAAG,iBAAiB,CAC/D,8BAA8B,EAC9B,kBAAkB,EAClB,8BAA8B,CAC/B,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,uBAAuB,CACrC,UAAU,GAAE,iCAAsC,GACjD,iCAAiC,CAoBnC"}
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ import { useSymmioChainId as e } from "../provider/use-symmio-chain-id.js";
3
+ import { useSymmioConfig as t } from "../provider/use-symmio-config.js";
4
+ import { normalizeSymmError as n } from "../errors/normalize-symm-error.js";
5
+ import { simulateRemoveMarginMutationOptions as r } from "@symmio/trading-core";
6
+ import { useConnection as i } from "wagmi";
7
+ import { useMutation as a } from "@tanstack/react-query";
8
+ //#region src/account-layer/use-simulate-remove-margin.ts
9
+ function o(o = {}) {
10
+ let s = t(o), c = e(), { address: l } = i(), u = r(s);
11
+ return a({
12
+ mutationKey: u.mutationKey,
13
+ mutationFn: async (e) => {
14
+ try {
15
+ return await u.mutationFn({
16
+ ...e,
17
+ chainId: e.chainId ?? c,
18
+ from: e.from ?? l
19
+ });
20
+ } catch (e) {
21
+ throw n(e);
22
+ }
23
+ }
24
+ });
25
+ }
26
+ //#endregion
27
+ export { o as useSimulateRemoveMargin };
28
+
29
+ //# sourceMappingURL=use-simulate-remove-margin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-simulate-remove-margin.js","names":[],"sources":["../../src/account-layer/use-simulate-remove-margin.ts"],"sourcesContent":["\"use client\";\n\nimport {\n simulateRemoveMarginMutationOptions,\n type ConfigParameter,\n type SimulateRemoveMarginParameters,\n type SimulateRemoveMarginReturnType,\n} from \"@symmio/trading-core\";\nimport { useMutation, type UseMutationResult } from \"@tanstack/react-query\";\nimport { useConnection } from \"wagmi\";\nimport { normalizeSymmError } from \"../errors/normalize-symm-error\";\nimport type { SymmioRequestError } from \"../errors/symmio-request-error\";\nimport { useSymmioChainId } from \"../provider/use-symmio-chain-id\";\nimport { useSymmioConfig } from \"../provider/use-symmio-config\";\n\n/**\n * Parameters for {@link useSimulateRemoveMargin}: an optional `config` override.\n * The dry-run's inputs (including a `upnlSig`) are passed as the mutation\n * `variables`.\n */\nexport type UseSimulateRemoveMarginParameters = ConfigParameter;\n\n/** Return type of {@link useSimulateRemoveMargin}. */\nexport type UseSimulateRemoveMarginReturnType = UseMutationResult<\n SimulateRemoveMarginReturnType,\n SymmioRequestError,\n SimulateRemoveMarginParameters\n>;\n\n/**\n * On-demand dry-run (`simulateContract`) of `removeMargin`. Call `mutate(args)`\n * to run it; `data` holds viem's `{ request, result }`. A would-be revert (the\n * deallocate debounce, an insolvent result, or a stale `upnlSig`) surfaces as a\n * normalized {@link SymmioRequestError}. `from` defaults to the connected wallet\n * and `chainId` to the connected chain.\n *\n * @remarks\n * The `upnlSig` is still required here — fetch it (e.g. with `useDeallocateUpnlSig`)\n * before simulating.\n *\n * @example\n * ```tsx\n * const sim = useSimulateRemoveMargin();\n * sim.mutate({ virtualAccount: \"0xva…\", amount: 50_000000000000000000n, upnlSig });\n * ```\n */\nexport function useSimulateRemoveMargin(\n parameters: UseSimulateRemoveMarginParameters = {},\n): UseSimulateRemoveMarginReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const { address } = useConnection();\n const base = simulateRemoveMarginMutationOptions(config);\n\n return useMutation<SimulateRemoveMarginReturnType, SymmioRequestError, SimulateRemoveMarginParameters>({\n mutationKey: base.mutationKey,\n mutationFn: async (variables) => {\n try {\n return await base.mutationFn({\n ...variables,\n chainId: variables.chainId ?? chainId,\n from: variables.from ?? address,\n });\n } catch (err) {\n throw normalizeSymmError(err);\n }\n },\n });\n}\n"],"mappings":";;;;;;;;AA8CA,SAAgB,EACd,IAAgD,CAAC,GACd;CACnC,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB,GAC3B,EAAE,eAAY,EAAc,GAC5B,IAAO,EAAoC,CAAM;CAEvD,OAAO,EAAgG;EACrG,aAAa,EAAK;EAClB,YAAY,OAAO,MAAc;GAC/B,IAAI;IACF,OAAO,MAAM,EAAK,WAAW;KAC3B,GAAG;KACH,SAAS,EAAU,WAAW;KAC9B,MAAM,EAAU,QAAQ;IAC1B,CAAC;GACH,SAAS,GAAK;IACZ,MAAM,EAAmB,CAAG;GAC9B;EACF;CACF,CAAC;AACH"}
@@ -0,0 +1,23 @@
1
+ import { ConfigParameter, GetSubAccountVirtualNonceOptions, GetSubAccountVirtualNonceReturnType } from '@symmio/trading-core';
2
+ import { UseQueryResult } from '@tanstack/react-query';
3
+ import { SymmioRequestError } from '../errors/symmio-request-error';
4
+ /**
5
+ * Parameters for {@link useSubAccountVirtualNonce}: the core query options
6
+ * (subAccount, chain id, TanStack `query` overrides) plus an optional `config`.
7
+ */
8
+ export type UseSubAccountVirtualNonceParameters = GetSubAccountVirtualNonceOptions & ConfigParameter;
9
+ /** Return type of {@link useSubAccountVirtualNonce}. */
10
+ export type UseSubAccountVirtualNonceReturnType = UseQueryResult<GetSubAccountVirtualNonceReturnType, SymmioRequestError>;
11
+ /**
12
+ * Read a subaccount's Virtual Account (VA) nonce — the per-subaccount counter
13
+ * seeding deterministic VA address derivation. The query is disabled until
14
+ * `subAccount` is set. `chainId` defaults to the connected chain. Errors are
15
+ * normalized to {@link SymmioRequestError}.
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * const { data: nonce } = useSubAccountVirtualNonce({ subAccount: "0xsub…" });
20
+ * ```
21
+ */
22
+ export declare function useSubAccountVirtualNonce(parameters?: UseSubAccountVirtualNonceParameters): UseSubAccountVirtualNonceReturnType;
23
+ //# sourceMappingURL=use-sub-account-virtual-nonce.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-sub-account-virtual-nonce.d.ts","sourceRoot":"","sources":["../../src/account-layer/use-sub-account-virtual-nonce.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,gCAAgC,EACrC,KAAK,mCAAmC,EACzC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE;;;GAGG;AACH,MAAM,MAAM,mCAAmC,GAAG,gCAAgC,GAAG,eAAe,CAAC;AAErG,wDAAwD;AACxD,MAAM,MAAM,mCAAmC,GAAG,cAAc,CAC9D,mCAAmC,EACnC,kBAAkB,CACnB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CACvC,UAAU,GAAE,mCAAwC,GACnD,mCAAmC,CAkBrC"}
@@ -0,0 +1,27 @@
1
+ "use client";
2
+ import { useSymmioChainId as e } from "../provider/use-symmio-chain-id.js";
3
+ import { useSymmioConfig as t } from "../provider/use-symmio-config.js";
4
+ import { normalizeSymmError as n } from "../errors/normalize-symm-error.js";
5
+ import { getSubAccountVirtualNonceQueryOptions as r } from "@symmio/trading-core";
6
+ import { useQuery as i } from "@tanstack/react-query";
7
+ //#region src/account-layer/use-sub-account-virtual-nonce.ts
8
+ function a(a = {}) {
9
+ let o = t(a), s = e(), c = r(o, {
10
+ ...a,
11
+ chainId: a.chainId ?? s
12
+ });
13
+ return i({
14
+ ...c,
15
+ queryFn: async () => {
16
+ try {
17
+ return await c.queryFn();
18
+ } catch (e) {
19
+ throw n(e);
20
+ }
21
+ }
22
+ });
23
+ }
24
+ //#endregion
25
+ export { a as useSubAccountVirtualNonce };
26
+
27
+ //# sourceMappingURL=use-sub-account-virtual-nonce.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-sub-account-virtual-nonce.js","names":[],"sources":["../../src/account-layer/use-sub-account-virtual-nonce.ts"],"sourcesContent":["\"use client\";\n\nimport {\n getSubAccountVirtualNonceQueryOptions,\n type ConfigParameter,\n type GetSubAccountVirtualNonceOptions,\n type GetSubAccountVirtualNonceReturnType,\n} from \"@symmio/trading-core\";\nimport { useQuery, type UseQueryResult } from \"@tanstack/react-query\";\nimport { normalizeSymmError } from \"../errors/normalize-symm-error\";\nimport type { SymmioRequestError } from \"../errors/symmio-request-error\";\nimport { useSymmioChainId } from \"../provider/use-symmio-chain-id\";\nimport { useSymmioConfig } from \"../provider/use-symmio-config\";\n\n/**\n * Parameters for {@link useSubAccountVirtualNonce}: the core query options\n * (subAccount, chain id, TanStack `query` overrides) plus an optional `config`.\n */\nexport type UseSubAccountVirtualNonceParameters = GetSubAccountVirtualNonceOptions & ConfigParameter;\n\n/** Return type of {@link useSubAccountVirtualNonce}. */\nexport type UseSubAccountVirtualNonceReturnType = UseQueryResult<\n GetSubAccountVirtualNonceReturnType,\n SymmioRequestError\n>;\n\n/**\n * Read a subaccount's Virtual Account (VA) nonce — the per-subaccount counter\n * seeding deterministic VA address derivation. The query is disabled until\n * `subAccount` is set. `chainId` defaults to the connected chain. Errors are\n * normalized to {@link SymmioRequestError}.\n *\n * @example\n * ```tsx\n * const { data: nonce } = useSubAccountVirtualNonce({ subAccount: \"0xsub…\" });\n * ```\n */\nexport function useSubAccountVirtualNonce(\n parameters: UseSubAccountVirtualNonceParameters = {},\n): UseSubAccountVirtualNonceReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const options = getSubAccountVirtualNonceQueryOptions(config, {\n ...parameters,\n chainId: parameters.chainId ?? chainId,\n });\n\n return useQuery({\n ...options,\n queryFn: async () => {\n try {\n return await options.queryFn();\n } catch (err) {\n throw normalizeSymmError(err);\n }\n },\n }) as UseSubAccountVirtualNonceReturnType;\n}\n"],"mappings":";;;;;;;AAqCA,SAAgB,EACd,IAAkD,CAAC,GACd;CACrC,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB,GAC3B,IAAU,EAAsC,GAAQ;EAC5D,GAAG;EACH,SAAS,EAAW,WAAW;CACjC,CAAC;CAED,OAAO,EAAS;EACd,GAAG;EACH,SAAS,YAAY;GACnB,IAAI;IACF,OAAO,MAAM,EAAQ,QAAQ;GAC/B,SAAS,GAAK;IACZ,MAAM,EAAmB,CAAG;GAC9B;EACF;CACF,CAAC;AACH"}
@@ -0,0 +1,22 @@
1
+ import { ConfigParameter, GetSubAccountOptions, GetSubAccountReturnType } from '@symmio/trading-core';
2
+ import { UseQueryResult } from '@tanstack/react-query';
3
+ import { SymmioRequestError } from '../errors/symmio-request-error';
4
+ /**
5
+ * Parameters for {@link useSubAccount}: the core query options (account, chain
6
+ * id, TanStack `query` overrides) plus an optional `config`.
7
+ */
8
+ export type UseSubAccountParameters = GetSubAccountOptions & ConfigParameter;
9
+ /** Return type of {@link useSubAccount}. */
10
+ export type UseSubAccountReturnType = UseQueryResult<GetSubAccountReturnType, SymmioRequestError>;
11
+ /**
12
+ * Read a single SYMMIO subaccount by its address. The query is disabled until
13
+ * `account` is set. `chainId` defaults to the connected chain. Errors are
14
+ * normalized to {@link SymmioRequestError}.
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * const { data: sub, isLoading, error } = useSubAccount({ account: "0xsub…" });
19
+ * ```
20
+ */
21
+ export declare function useSubAccount(parameters?: UseSubAccountParameters): UseSubAccountReturnType;
22
+ //# sourceMappingURL=use-sub-account.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-sub-account.d.ts","sourceRoot":"","sources":["../../src/account-layer/use-sub-account.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC7B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,oBAAoB,GAAG,eAAe,CAAC;AAE7E,4CAA4C;AAC5C,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,uBAAuB,EAAE,kBAAkB,CAAC,CAAC;AAElG;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,UAAU,GAAE,uBAA4B,GAAG,uBAAuB,CAkB/F"}
@@ -0,0 +1,27 @@
1
+ "use client";
2
+ import { useSymmioChainId as e } from "../provider/use-symmio-chain-id.js";
3
+ import { useSymmioConfig as t } from "../provider/use-symmio-config.js";
4
+ import { normalizeSymmError as n } from "../errors/normalize-symm-error.js";
5
+ import { getSubAccountQueryOptions as r } from "@symmio/trading-core";
6
+ import { useQuery as i } from "@tanstack/react-query";
7
+ //#region src/account-layer/use-sub-account.ts
8
+ function a(a = {}) {
9
+ let o = t(a), s = e(), c = r(o, {
10
+ ...a,
11
+ chainId: a.chainId ?? s
12
+ });
13
+ return i({
14
+ ...c,
15
+ queryFn: async () => {
16
+ try {
17
+ return await c.queryFn();
18
+ } catch (e) {
19
+ throw n(e);
20
+ }
21
+ }
22
+ });
23
+ }
24
+ //#endregion
25
+ export { a as useSubAccount };
26
+
27
+ //# sourceMappingURL=use-sub-account.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-sub-account.js","names":[],"sources":["../../src/account-layer/use-sub-account.ts"],"sourcesContent":["\"use client\";\n\nimport {\n getSubAccountQueryOptions,\n type ConfigParameter,\n type GetSubAccountOptions,\n type GetSubAccountReturnType,\n} from \"@symmio/trading-core\";\nimport { useQuery, type UseQueryResult } from \"@tanstack/react-query\";\nimport { normalizeSymmError } from \"../errors/normalize-symm-error\";\nimport type { SymmioRequestError } from \"../errors/symmio-request-error\";\nimport { useSymmioChainId } from \"../provider/use-symmio-chain-id\";\nimport { useSymmioConfig } from \"../provider/use-symmio-config\";\n\n/**\n * Parameters for {@link useSubAccount}: the core query options (account, chain\n * id, TanStack `query` overrides) plus an optional `config`.\n */\nexport type UseSubAccountParameters = GetSubAccountOptions & ConfigParameter;\n\n/** Return type of {@link useSubAccount}. */\nexport type UseSubAccountReturnType = UseQueryResult<GetSubAccountReturnType, SymmioRequestError>;\n\n/**\n * Read a single SYMMIO subaccount by its address. The query is disabled until\n * `account` is set. `chainId` defaults to the connected chain. Errors are\n * normalized to {@link SymmioRequestError}.\n *\n * @example\n * ```tsx\n * const { data: sub, isLoading, error } = useSubAccount({ account: \"0xsub…\" });\n * ```\n */\nexport function useSubAccount(parameters: UseSubAccountParameters = {}): UseSubAccountReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const options = getSubAccountQueryOptions(config, {\n ...parameters,\n chainId: parameters.chainId ?? chainId,\n });\n\n return useQuery({\n ...options,\n queryFn: async () => {\n try {\n return await options.queryFn();\n } catch (err) {\n throw normalizeSymmError(err);\n }\n },\n }) as UseSubAccountReturnType;\n}\n"],"mappings":";;;;;;;AAiCA,SAAgB,EAAc,IAAsC,CAAC,GAA4B;CAC/F,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB,GAC3B,IAAU,EAA0B,GAAQ;EAChD,GAAG;EACH,SAAS,EAAW,WAAW;CACjC,CAAC;CAED,OAAO,EAAS;EACd,GAAG;EACH,SAAS,YAAY;GACnB,IAAI;IACF,OAAO,MAAM,EAAQ,QAAQ;GAC/B,SAAS,GAAK;IACZ,MAAM,EAAmB,CAAG;GAC9B;EACF;CACF,CAAC;AACH"}
@@ -0,0 +1,22 @@
1
+ import { ConfigParameter, GetSubAccountsCountOfUserOptions, GetSubAccountsCountOfUserReturnType } from '@symmio/trading-core';
2
+ import { UseQueryResult } from '@tanstack/react-query';
3
+ import { SymmioRequestError } from '../errors/symmio-request-error';
4
+ /**
5
+ * Parameters for {@link useSubAccountsCountOfUser}: the core query options (user,
6
+ * chain id, TanStack `query` overrides) plus an optional `config`.
7
+ */
8
+ export type UseSubAccountsCountOfUserParameters = GetSubAccountsCountOfUserOptions & ConfigParameter;
9
+ /** Return type of {@link useSubAccountsCountOfUser}. */
10
+ export type UseSubAccountsCountOfUserReturnType = UseQueryResult<GetSubAccountsCountOfUserReturnType, SymmioRequestError>;
11
+ /**
12
+ * Read how many subaccounts `parameters.user` owns. The query is disabled until
13
+ * `user` is set. `chainId` defaults to the connected chain. Errors are normalized
14
+ * to {@link SymmioRequestError}.
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * const { data: count } = useSubAccountsCountOfUser({ user: address });
19
+ * ```
20
+ */
21
+ export declare function useSubAccountsCountOfUser(parameters?: UseSubAccountsCountOfUserParameters): UseSubAccountsCountOfUserReturnType;
22
+ //# sourceMappingURL=use-sub-accounts-count-of-user.d.ts.map