@symmio/trading-core 2.0.0 → 3.0.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 (325) hide show
  1. package/README.md +2 -2
  2. package/dist/balance-history/get-balance-history/types.d.ts +1 -1
  3. package/dist/balance-history/get-balance-history/types.js.map +1 -1
  4. package/dist/core/chains/actions/get-chain-config.d.ts +1 -1
  5. package/dist/core/chains/actions/get-chain-config.js.map +1 -1
  6. package/dist/core/chains/actions/get-default-solver.d.ts +1 -1
  7. package/dist/core/chains/actions/get-default-solver.js.map +1 -1
  8. package/dist/core/chains/actions/list-supported-chains.js.map +1 -1
  9. package/dist/core/chains/registry.d.ts.map +1 -1
  10. package/dist/core/chains/registry.js +52 -50
  11. package/dist/core/chains/registry.js.map +1 -1
  12. package/dist/core/chains/supported-chains.d.ts +3 -3
  13. package/dist/core/chains/supported-chains.d.ts.map +1 -1
  14. package/dist/core/chains/supported-chains.js +1 -1
  15. package/dist/core/chains/supported-chains.js.map +1 -1
  16. package/dist/core/chains/types.d.ts +18 -4
  17. package/dist/core/chains/types.d.ts.map +1 -1
  18. package/dist/core/chains/types.js.map +1 -1
  19. package/dist/core/config/create-config.d.ts +7 -7
  20. package/dist/core/config/create-config.d.ts.map +1 -1
  21. package/dist/core/config/create-config.js +39 -38
  22. package/dist/core/config/create-config.js.map +1 -1
  23. package/dist/core/config/merge-chain-config.js +1 -0
  24. package/dist/core/config/merge-chain-config.js.map +1 -1
  25. package/dist/index.d.ts +18 -9
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +318 -316
  28. package/dist/margin/calculate-margin-risk.d.ts +1 -1
  29. package/dist/margin/calculate-margin-risk.js.map +1 -1
  30. package/dist/notifications/types.d.ts +1 -1
  31. package/dist/notifications/types.d.ts.map +1 -1
  32. package/dist/quotes/close-planning/min-remaining-quantity.d.ts +1 -1
  33. package/dist/quotes/close-planning/min-remaining-quantity.js.map +1 -1
  34. package/dist/quotes/get-quote-history/query-document.d.ts +1 -1
  35. package/dist/quotes/get-quote-history/query-document.js.map +1 -1
  36. package/dist/quotes/get-quote-history/types.d.ts +2 -2
  37. package/dist/quotes/get-quote-history/types.js.map +1 -1
  38. package/dist/quotes/grouping/aggregate-metrics.d.ts +1 -1
  39. package/dist/quotes/grouping/aggregate-metrics.js.map +1 -1
  40. package/dist/quotes/open-price.d.ts +10 -10
  41. package/dist/quotes/open-price.d.ts.map +1 -1
  42. package/dist/quotes/open-price.js +1 -1
  43. package/dist/quotes/open-price.js.map +1 -1
  44. package/dist/quotes/upnl/calculate-quote-leverage.d.ts +8 -6
  45. package/dist/quotes/upnl/calculate-quote-leverage.d.ts.map +1 -1
  46. package/dist/quotes/upnl/calculate-quote-leverage.js.map +1 -1
  47. package/dist/shared/utils/query.d.ts +2 -2
  48. package/dist/shared/utils/query.js.map +1 -1
  49. package/dist/solvers/force-close/force-close-position.js +1 -1
  50. package/dist/solvers/force-close/force-close-position.js.map +1 -1
  51. package/dist/solvers/force-close/get-force-close-params.js +1 -1
  52. package/dist/solvers/force-close/get-force-close-params.js.map +1 -1
  53. package/dist/solvers/instant-close/shared/calldata.js +1 -1
  54. package/dist/solvers/instant-close/shared/calldata.js.map +1 -1
  55. package/dist/solvers/instant-open/get-instant-open-fees/get-instant-open-fees.d.ts +129 -0
  56. package/dist/solvers/instant-open/get-instant-open-fees/get-instant-open-fees.d.ts.map +1 -0
  57. package/dist/solvers/instant-open/get-instant-open-fees/get-instant-open-fees.js +115 -0
  58. package/dist/solvers/instant-open/get-instant-open-fees/get-instant-open-fees.js.map +1 -0
  59. package/dist/solvers/instant-open/get-instant-open-fees/index.d.ts +3 -0
  60. package/dist/solvers/instant-open/get-instant-open-fees/index.d.ts.map +1 -0
  61. package/dist/solvers/instant-open/get-instant-open-fees/query.d.ts +34 -0
  62. package/dist/solvers/instant-open/get-instant-open-fees/query.d.ts.map +1 -0
  63. package/dist/solvers/instant-open/get-instant-open-fees/query.js +33 -0
  64. package/dist/solvers/instant-open/get-instant-open-fees/query.js.map +1 -0
  65. package/dist/solvers/instant-open/index.d.ts +1 -0
  66. package/dist/solvers/instant-open/index.d.ts.map +1 -1
  67. package/dist/solvers/instant-open/instant-open/adapters/enigma-instant-open.d.ts.map +1 -1
  68. package/dist/solvers/instant-open/instant-open/adapters/enigma-instant-open.js +58 -55
  69. package/dist/solvers/instant-open/instant-open/adapters/enigma-instant-open.js.map +1 -1
  70. package/dist/solvers/instant-open/instant-open/types.d.ts +14 -4
  71. package/dist/solvers/instant-open/instant-open/types.d.ts.map +1 -1
  72. package/dist/solvers/instant-open/prepare-instant-open-params/prepare-instant-open-params.d.ts +45 -10
  73. package/dist/solvers/instant-open/prepare-instant-open-params/prepare-instant-open-params.d.ts.map +1 -1
  74. package/dist/solvers/instant-open/prepare-instant-open-params/prepare-instant-open-params.js +157 -72
  75. package/dist/solvers/instant-open/prepare-instant-open-params/prepare-instant-open-params.js.map +1 -1
  76. package/dist/solvers/instant-open/shared/calldata.d.ts +35 -7
  77. package/dist/solvers/instant-open/shared/calldata.d.ts.map +1 -1
  78. package/dist/solvers/instant-open/shared/calldata.js +56 -14
  79. package/dist/solvers/instant-open/shared/calldata.js.map +1 -1
  80. package/dist/solvers/instant-open/shared/index.d.ts +1 -0
  81. package/dist/solvers/instant-open/shared/index.d.ts.map +1 -1
  82. package/dist/solvers/instant-open/shared/open-estimate-guard.d.ts +89 -0
  83. package/dist/solvers/instant-open/shared/open-estimate-guard.d.ts.map +1 -0
  84. package/dist/solvers/instant-open/shared/open-estimate-guard.js +52 -0
  85. package/dist/solvers/instant-open/shared/open-estimate-guard.js.map +1 -0
  86. package/dist/solvers/instant-open/shared/selectors.d.ts +46 -7
  87. package/dist/solvers/instant-open/shared/selectors.d.ts.map +1 -1
  88. package/dist/solvers/instant-open/shared/selectors.js +12 -5
  89. package/dist/solvers/instant-open/shared/selectors.js.map +1 -1
  90. package/dist/solvers/instant-open/shared/trade-math.d.ts +112 -8
  91. package/dist/solvers/instant-open/shared/trade-math.d.ts.map +1 -1
  92. package/dist/solvers/instant-open/shared/trade-math.js +59 -25
  93. package/dist/solvers/instant-open/shared/trade-math.js.map +1 -1
  94. package/dist/solvers/instant-open/shared/types.d.ts +32 -0
  95. package/dist/solvers/instant-open/shared/types.d.ts.map +1 -1
  96. package/dist/solvers/instant-open/shared/types.js.map +1 -1
  97. package/dist/solvers/markets/adapters/enigma-markets.d.ts.map +1 -1
  98. package/dist/solvers/markets/adapters/enigma-markets.js +38 -32
  99. package/dist/solvers/markets/adapters/enigma-markets.js.map +1 -1
  100. package/dist/solvers/markets/types.d.ts +15 -0
  101. package/dist/solvers/markets/types.d.ts.map +1 -1
  102. package/dist/solvers/revenue/get-solver-revenue.d.ts +11 -11
  103. package/dist/solvers/revenue/get-solver-revenue.d.ts.map +1 -1
  104. package/dist/solvers/revenue/get-solver-revenue.js +12 -12
  105. package/dist/solvers/revenue/get-solver-revenue.js.map +1 -1
  106. package/dist/solvers/revenue/query.d.ts +2 -2
  107. package/dist/solvers/revenue/query.d.ts.map +1 -1
  108. package/dist/solvers/revenue/query.js +1 -1
  109. package/dist/solvers/revenue/query.js.map +1 -1
  110. package/dist/solvers/revenue/to-solver-revenue.d.ts +3 -2
  111. package/dist/solvers/revenue/to-solver-revenue.d.ts.map +1 -1
  112. package/dist/solvers/revenue/to-solver-revenue.js.map +1 -1
  113. package/dist/solvers/shared/index.d.ts +1 -0
  114. package/dist/solvers/shared/index.d.ts.map +1 -1
  115. package/dist/solvers/shared/resolvers/resolve-market.d.ts +36 -5
  116. package/dist/solvers/shared/resolvers/resolve-market.d.ts.map +1 -1
  117. package/dist/solvers/shared/resolvers/resolve-market.js +30 -8
  118. package/dist/solvers/shared/resolvers/resolve-market.js.map +1 -1
  119. package/dist/solvers/shared/resolvers/types.d.ts +14 -0
  120. package/dist/solvers/shared/resolvers/types.d.ts.map +1 -1
  121. package/dist/solvers/shared/solver-close-fee.d.ts +76 -0
  122. package/dist/solvers/shared/solver-close-fee.d.ts.map +1 -0
  123. package/dist/solvers/shared/solver-close-fee.js +26 -0
  124. package/dist/solvers/shared/solver-close-fee.js.map +1 -0
  125. package/dist/solvers/symbols/to-solver-symbol.d.ts.map +1 -1
  126. package/dist/solvers/symbols/to-solver-symbol.js +36 -30
  127. package/dist/solvers/symbols/to-solver-symbol.js.map +1 -1
  128. package/dist/solvers/symbols/types.d.ts +22 -1
  129. package/dist/solvers/symbols/types.d.ts.map +1 -1
  130. package/dist/solvers/types/generated/enigma-solver.d.ts +8 -99
  131. package/dist/solvers/types/generated/enigma-solver.d.ts.map +1 -1
  132. package/dist/solvers/types/generated/enigma-solver.js +5 -11
  133. package/dist/solvers/types/generated/enigma-solver.js.map +1 -1
  134. package/dist/solvers/types/generated/rasa-solver.js +2 -2
  135. package/dist/solvers/types/generated/rasa-solver.js.map +1 -1
  136. package/dist/symmio-contracts/abi/index.d.ts +4 -4
  137. package/dist/symmio-contracts/abi/{v0.8.5 → v0.8.6}/account-layer.d.ts +499 -132
  138. package/dist/symmio-contracts/abi/{v0.8.5 → v0.8.6}/account-layer.d.ts.map +1 -1
  139. package/dist/symmio-contracts/abi/{v0.8.5 → v0.8.6}/account-layer.js +591 -149
  140. package/dist/symmio-contracts/abi/v0.8.6/account-layer.js.map +1 -0
  141. package/dist/symmio-contracts/abi/{v0.8.5 → v0.8.6}/index.d.ts.map +1 -1
  142. package/dist/symmio-contracts/abi/{v0.8.5 → v0.8.6}/instant-layer.d.ts +24 -24
  143. package/dist/symmio-contracts/abi/{v0.8.5 → v0.8.6}/instant-layer.d.ts.map +1 -1
  144. package/dist/symmio-contracts/abi/{v0.8.5 → v0.8.6}/instant-layer.js +28 -28
  145. package/dist/symmio-contracts/abi/v0.8.6/instant-layer.js.map +1 -0
  146. package/dist/symmio-contracts/abi/{v0.8.5 → v0.8.6}/symmio.d.ts +4724 -1019
  147. package/dist/symmio-contracts/abi/{v0.8.5 → v0.8.6}/symmio.d.ts.map +1 -1
  148. package/dist/symmio-contracts/abi/{v0.8.5 → v0.8.6}/symmio.js +12750 -8308
  149. package/dist/symmio-contracts/abi/v0.8.6/symmio.js.map +1 -0
  150. package/dist/symmio-contracts/account-layer/actions/add-margin.js +1 -1
  151. package/dist/symmio-contracts/account-layer/actions/add-margin.js.map +1 -1
  152. package/dist/symmio-contracts/account-layer/actions/cancel-registration.js +1 -1
  153. package/dist/symmio-contracts/account-layer/actions/cancel-registration.js.map +1 -1
  154. package/dist/symmio-contracts/account-layer/actions/create-sub-accounts.js +1 -1
  155. package/dist/symmio-contracts/account-layer/actions/create-sub-accounts.js.map +1 -1
  156. package/dist/symmio-contracts/account-layer/actions/delete-sub-account.js +1 -1
  157. package/dist/symmio-contracts/account-layer/actions/delete-sub-account.js.map +1 -1
  158. package/dist/symmio-contracts/account-layer/actions/deposit-and-allocate-for-account.js +1 -1
  159. package/dist/symmio-contracts/account-layer/actions/deposit-and-allocate-for-account.js.map +1 -1
  160. package/dist/symmio-contracts/account-layer/actions/deposit-for-account.js +1 -1
  161. package/dist/symmio-contracts/account-layer/actions/deposit-for-account.js.map +1 -1
  162. package/dist/symmio-contracts/account-layer/actions/edit-account-name.js +1 -1
  163. package/dist/symmio-contracts/account-layer/actions/edit-account-name.js.map +1 -1
  164. package/dist/symmio-contracts/account-layer/actions/generate-account-manager-address.js +1 -1
  165. package/dist/symmio-contracts/account-layer/actions/generate-account-manager-address.js.map +1 -1
  166. package/dist/symmio-contracts/account-layer/actions/get-account-balance-info.js +1 -1
  167. package/dist/symmio-contracts/account-layer/actions/get-account-balance-info.js.map +1 -1
  168. package/dist/symmio-contracts/account-layer/actions/get-account-balance-of.js +1 -1
  169. package/dist/symmio-contracts/account-layer/actions/get-account-balance-of.js.map +1 -1
  170. package/dist/symmio-contracts/account-layer/actions/get-affiliate-state.js +1 -1
  171. package/dist/symmio-contracts/account-layer/actions/get-affiliate-state.js.map +1 -1
  172. package/dist/symmio-contracts/account-layer/actions/get-sub-account-virtual-nonce.js +1 -1
  173. package/dist/symmio-contracts/account-layer/actions/get-sub-account-virtual-nonce.js.map +1 -1
  174. package/dist/symmio-contracts/account-layer/actions/get-sub-account.js +1 -1
  175. package/dist/symmio-contracts/account-layer/actions/get-sub-account.js.map +1 -1
  176. package/dist/symmio-contracts/account-layer/actions/get-sub-accounts-count-of-user.js +1 -1
  177. package/dist/symmio-contracts/account-layer/actions/get-sub-accounts-count-of-user.js.map +1 -1
  178. package/dist/symmio-contracts/account-layer/actions/get-user-sub-accounts-addresses.js +1 -1
  179. package/dist/symmio-contracts/account-layer/actions/get-user-sub-accounts-addresses.js.map +1 -1
  180. package/dist/symmio-contracts/account-layer/actions/get-user-sub-accounts.js +1 -1
  181. package/dist/symmio-contracts/account-layer/actions/get-user-sub-accounts.js.map +1 -1
  182. package/dist/symmio-contracts/account-layer/actions/get-virtual-account.d.ts +1 -1
  183. package/dist/symmio-contracts/account-layer/actions/get-virtual-account.js +1 -1
  184. package/dist/symmio-contracts/account-layer/actions/get-virtual-account.js.map +1 -1
  185. package/dist/symmio-contracts/account-layer/actions/get-virtual-accounts-addresses-of-sub-account.js +1 -1
  186. package/dist/symmio-contracts/account-layer/actions/get-virtual-accounts-addresses-of-sub-account.js.map +1 -1
  187. package/dist/symmio-contracts/account-layer/actions/predict-next-virtual-account.js +1 -1
  188. package/dist/symmio-contracts/account-layer/actions/predict-next-virtual-account.js.map +1 -1
  189. package/dist/symmio-contracts/account-layer/actions/remove-margin.js +1 -1
  190. package/dist/symmio-contracts/account-layer/actions/remove-margin.js.map +1 -1
  191. package/dist/symmio-contracts/account-layer/actions/request-to-register-affiliate.js +1 -1
  192. package/dist/symmio-contracts/account-layer/actions/request-to-register-affiliate.js.map +1 -1
  193. package/dist/symmio-contracts/account-layer/actions/simulate-add-margin.d.ts +1 -1
  194. package/dist/symmio-contracts/account-layer/actions/simulate-add-margin.js +1 -1
  195. package/dist/symmio-contracts/account-layer/actions/simulate-add-margin.js.map +1 -1
  196. package/dist/symmio-contracts/account-layer/actions/simulate-cancel-registration.d.ts +1 -1
  197. package/dist/symmio-contracts/account-layer/actions/simulate-cancel-registration.js +1 -1
  198. package/dist/symmio-contracts/account-layer/actions/simulate-cancel-registration.js.map +1 -1
  199. package/dist/symmio-contracts/account-layer/actions/simulate-create-sub-accounts.d.ts +1 -1
  200. package/dist/symmio-contracts/account-layer/actions/simulate-create-sub-accounts.js +1 -1
  201. package/dist/symmio-contracts/account-layer/actions/simulate-create-sub-accounts.js.map +1 -1
  202. package/dist/symmio-contracts/account-layer/actions/simulate-delete-sub-account.d.ts +1 -1
  203. package/dist/symmio-contracts/account-layer/actions/simulate-delete-sub-account.js +1 -1
  204. package/dist/symmio-contracts/account-layer/actions/simulate-delete-sub-account.js.map +1 -1
  205. package/dist/symmio-contracts/account-layer/actions/simulate-deposit-and-allocate-for-account.d.ts +1 -1
  206. package/dist/symmio-contracts/account-layer/actions/simulate-deposit-and-allocate-for-account.js +1 -1
  207. package/dist/symmio-contracts/account-layer/actions/simulate-deposit-and-allocate-for-account.js.map +1 -1
  208. package/dist/symmio-contracts/account-layer/actions/simulate-deposit-for-account.d.ts +1 -1
  209. package/dist/symmio-contracts/account-layer/actions/simulate-deposit-for-account.js +1 -1
  210. package/dist/symmio-contracts/account-layer/actions/simulate-deposit-for-account.js.map +1 -1
  211. package/dist/symmio-contracts/account-layer/actions/simulate-edit-account-name.d.ts +1 -1
  212. package/dist/symmio-contracts/account-layer/actions/simulate-edit-account-name.js +1 -1
  213. package/dist/symmio-contracts/account-layer/actions/simulate-edit-account-name.js.map +1 -1
  214. package/dist/symmio-contracts/account-layer/actions/simulate-remove-margin.d.ts +1 -1
  215. package/dist/symmio-contracts/account-layer/actions/simulate-remove-margin.js +1 -1
  216. package/dist/symmio-contracts/account-layer/actions/simulate-remove-margin.js.map +1 -1
  217. package/dist/symmio-contracts/account-layer/actions/simulate-request-to-register-affiliate.d.ts +1 -1
  218. package/dist/symmio-contracts/account-layer/actions/simulate-request-to-register-affiliate.js +1 -1
  219. package/dist/symmio-contracts/account-layer/actions/simulate-request-to-register-affiliate.js.map +1 -1
  220. package/dist/symmio-contracts/account-layer/types.d.ts +10 -10
  221. package/dist/symmio-contracts/account-layer/types.js.map +1 -1
  222. package/dist/symmio-contracts/instant-layer/actions/get-delegation-expiry.js +1 -1
  223. package/dist/symmio-contracts/instant-layer/actions/get-delegation-expiry.js.map +1 -1
  224. package/dist/symmio-contracts/instant-layer/actions/get-is-delegation-active.js +1 -1
  225. package/dist/symmio-contracts/instant-layer/actions/get-is-delegation-active.js.map +1 -1
  226. package/dist/symmio-contracts/instant-layer/actions/grant-delegation.js +1 -1
  227. package/dist/symmio-contracts/instant-layer/actions/grant-delegation.js.map +1 -1
  228. package/dist/symmio-contracts/instant-layer/actions/simulate-grant-delegation.d.ts +1 -1
  229. package/dist/symmio-contracts/instant-layer/actions/simulate-grant-delegation.js +1 -1
  230. package/dist/symmio-contracts/instant-layer/actions/simulate-grant-delegation.js.map +1 -1
  231. package/dist/symmio-contracts/symmio/actions/allocate.js +1 -1
  232. package/dist/symmio-contracts/symmio/actions/allocate.js.map +1 -1
  233. package/dist/symmio-contracts/symmio/actions/deallocate-and-initiate-withdraw.d.ts +1 -1
  234. package/dist/symmio-contracts/symmio/actions/deallocate-and-initiate-withdraw.js +1 -1
  235. package/dist/symmio-contracts/symmio/actions/deallocate-and-initiate-withdraw.js.map +1 -1
  236. package/dist/symmio-contracts/symmio/actions/deallocate.js +1 -1
  237. package/dist/symmio-contracts/symmio/actions/deallocate.js.map +1 -1
  238. package/dist/symmio-contracts/symmio/actions/finalize-withdraw-request.js +1 -1
  239. package/dist/symmio-contracts/symmio/actions/finalize-withdraw-request.js.map +1 -1
  240. package/dist/symmio-contracts/symmio/actions/force-cancel-close-request.js +1 -1
  241. package/dist/symmio-contracts/symmio/actions/force-cancel-close-request.js.map +1 -1
  242. package/dist/symmio-contracts/symmio/actions/force-cancel-quote.js +1 -1
  243. package/dist/symmio-contracts/symmio/actions/force-cancel-quote.js.map +1 -1
  244. package/dist/symmio-contracts/symmio/actions/get-cool-downs-of-ma.js +1 -1
  245. package/dist/symmio-contracts/symmio/actions/get-cool-downs-of-ma.js.map +1 -1
  246. package/dist/symmio-contracts/symmio/actions/get-fee-for-user.js +1 -1
  247. package/dist/symmio-contracts/symmio/actions/get-fee-for-user.js.map +1 -1
  248. package/dist/symmio-contracts/symmio/actions/get-last-withdraw-request-id.js +1 -1
  249. package/dist/symmio-contracts/symmio/actions/get-last-withdraw-request-id.js.map +1 -1
  250. package/dist/symmio-contracts/symmio/actions/get-onchain-contract-markets.js +1 -1
  251. package/dist/symmio-contracts/symmio/actions/get-onchain-contract-markets.js.map +1 -1
  252. package/dist/symmio-contracts/symmio/actions/get-party-a-open-positions.js +1 -1
  253. package/dist/symmio-contracts/symmio/actions/get-party-a-open-positions.js.map +1 -1
  254. package/dist/symmio-contracts/symmio/actions/get-party-a-pending-quotes.js +1 -1
  255. package/dist/symmio-contracts/symmio/actions/get-party-a-pending-quotes.js.map +1 -1
  256. package/dist/symmio-contracts/symmio/actions/get-pending-quotes.js +1 -1
  257. package/dist/symmio-contracts/symmio/actions/get-pending-quotes.js.map +1 -1
  258. package/dist/symmio-contracts/symmio/actions/get-pending-withdraw-requests.d.ts.map +1 -1
  259. package/dist/symmio-contracts/symmio/actions/get-pending-withdraw-requests.js +10 -9
  260. package/dist/symmio-contracts/symmio/actions/get-pending-withdraw-requests.js.map +1 -1
  261. package/dist/symmio-contracts/symmio/actions/get-quote.js +1 -1
  262. package/dist/symmio-contracts/symmio/actions/get-quote.js.map +1 -1
  263. package/dist/symmio-contracts/symmio/actions/get-withdraw-requests.d.ts.map +1 -1
  264. package/dist/symmio-contracts/symmio/actions/get-withdraw-requests.js +9 -8
  265. package/dist/symmio-contracts/symmio/actions/get-withdraw-requests.js.map +1 -1
  266. package/dist/symmio-contracts/symmio/actions/get-withdrawable-time.js +1 -1
  267. package/dist/symmio-contracts/symmio/actions/get-withdrawable-time.js.map +1 -1
  268. package/dist/symmio-contracts/symmio/actions/initiate-withdraw.d.ts +1 -1
  269. package/dist/symmio-contracts/symmio/actions/initiate-withdraw.js +1 -1
  270. package/dist/symmio-contracts/symmio/actions/initiate-withdraw.js.map +1 -1
  271. package/dist/symmio-contracts/symmio/actions/request-cancel-withdraw.js +1 -1
  272. package/dist/symmio-contracts/symmio/actions/request-cancel-withdraw.js.map +1 -1
  273. package/dist/symmio-contracts/symmio/actions/request-to-cancel-close-request.js +1 -1
  274. package/dist/symmio-contracts/symmio/actions/request-to-cancel-close-request.js.map +1 -1
  275. package/dist/symmio-contracts/symmio/actions/request-to-cancel-quote.js +1 -1
  276. package/dist/symmio-contracts/symmio/actions/request-to-cancel-quote.js.map +1 -1
  277. package/dist/symmio-contracts/symmio/actions/simulate-allocate.js +1 -1
  278. package/dist/symmio-contracts/symmio/actions/simulate-allocate.js.map +1 -1
  279. package/dist/symmio-contracts/symmio/actions/simulate-deallocate-and-initiate-withdraw.js +1 -1
  280. package/dist/symmio-contracts/symmio/actions/simulate-deallocate-and-initiate-withdraw.js.map +1 -1
  281. package/dist/symmio-contracts/symmio/actions/simulate-deallocate.js +1 -1
  282. package/dist/symmio-contracts/symmio/actions/simulate-deallocate.js.map +1 -1
  283. package/dist/symmio-contracts/symmio/actions/simulate-finalize-withdraw-request.d.ts +1 -1
  284. package/dist/symmio-contracts/symmio/actions/simulate-finalize-withdraw-request.js +1 -1
  285. package/dist/symmio-contracts/symmio/actions/simulate-finalize-withdraw-request.js.map +1 -1
  286. package/dist/symmio-contracts/symmio/actions/simulate-initiate-withdraw.js +1 -1
  287. package/dist/symmio-contracts/symmio/actions/simulate-initiate-withdraw.js.map +1 -1
  288. package/dist/symmio-contracts/symmio/actions/simulate-request-cancel-withdraw.js +1 -1
  289. package/dist/symmio-contracts/symmio/actions/simulate-request-cancel-withdraw.js.map +1 -1
  290. package/dist/symmio-contracts/symmio/actions/withdraw.d.ts +1 -1
  291. package/dist/symmio-contracts/symmio/actions/withdraw.js.map +1 -1
  292. package/dist/symmio-contracts/symmio/internal/call-as-sub-account.js +1 -1
  293. package/dist/symmio-contracts/symmio/internal/call-as-sub-account.js.map +1 -1
  294. package/dist/symmio-contracts/symmio/internal/simulate-call-as-sub-account.d.ts +1 -1
  295. package/dist/symmio-contracts/symmio/internal/simulate-call-as-sub-account.js +1 -1
  296. package/dist/symmio-contracts/symmio/internal/simulate-call-as-sub-account.js.map +1 -1
  297. package/dist/symmio-contracts/symmio/internal/withdraw-requests-v0-8-5.d.ts +214 -0
  298. package/dist/symmio-contracts/symmio/internal/withdraw-requests-v0-8-5.d.ts.map +1 -0
  299. package/dist/symmio-contracts/symmio/internal/withdraw-requests-v0-8-5.js +248 -0
  300. package/dist/symmio-contracts/symmio/internal/withdraw-requests-v0-8-5.js.map +1 -0
  301. package/dist/symmio-contracts/symmio/parts.d.ts +1 -1
  302. package/dist/symmio-contracts/symmio/parts.js.map +1 -1
  303. package/dist/symmio-contracts/symmio/types.d.ts +29 -19
  304. package/dist/symmio-contracts/symmio/types.d.ts.map +1 -1
  305. package/dist/symmio-contracts/symmio/types.js.map +1 -1
  306. package/dist/tpsl/grouping/notional.js +6 -6
  307. package/dist/websocket/tpsl/parse-tpsl-frame.d.ts +1 -1
  308. package/dist/websocket/tpsl/parse-tpsl-frame.js.map +1 -1
  309. package/dist/websocket/tpsl/watch-tpsl-notifications.d.ts +1 -1
  310. package/dist/websocket/tpsl/watch-tpsl-notifications.js.map +1 -1
  311. package/package.json +1 -1
  312. package/dist/solvers/add-solver-whitelist/add-solver-whitelist.d.ts +0 -27
  313. package/dist/solvers/add-solver-whitelist/add-solver-whitelist.d.ts.map +0 -1
  314. package/dist/solvers/add-solver-whitelist/add-solver-whitelist.js +0 -25
  315. package/dist/solvers/add-solver-whitelist/add-solver-whitelist.js.map +0 -1
  316. package/dist/solvers/add-solver-whitelist/index.d.ts +0 -3
  317. package/dist/solvers/add-solver-whitelist/index.d.ts.map +0 -1
  318. package/dist/solvers/add-solver-whitelist/query.d.ts +0 -19
  319. package/dist/solvers/add-solver-whitelist/query.d.ts.map +0 -1
  320. package/dist/solvers/add-solver-whitelist/query.js +0 -12
  321. package/dist/solvers/add-solver-whitelist/query.js.map +0 -1
  322. package/dist/symmio-contracts/abi/v0.8.5/account-layer.js.map +0 -1
  323. package/dist/symmio-contracts/abi/v0.8.5/instant-layer.js.map +0 -1
  324. package/dist/symmio-contracts/abi/v0.8.5/symmio.js.map +0 -1
  325. /package/dist/symmio-contracts/abi/{v0.8.5 → v0.8.6}/index.d.ts +0 -0
package/README.md CHANGED
@@ -19,9 +19,9 @@ viem is a peer dependency.
19
19
  ```ts
20
20
  import { createConfig, getMarkets } from "@symmio/trading-core";
21
21
  import { createPublicClient, http } from "viem";
22
- import { hyperEvm } from "viem/chains";
22
+ import { arbitrum } from "viem/chains";
23
23
 
24
- const publicClient = createPublicClient({ chain: hyperEvm, transport: http() });
24
+ const publicClient = createPublicClient({ chain: arbitrum, transport: http() });
25
25
 
26
26
  const config = createConfig({
27
27
  getClient: () => publicClient,
@@ -69,7 +69,7 @@ export type InternalTransfersMode =
69
69
  * @remarks
70
70
  * `amount` is a raw `bigint` in the **collateral token's decimals** (not 18) —
71
71
  * scale it with `config.getChainConfig(chainId).addresses.collateralDecimals`
72
- * (6 on HyperEVM) for display.
72
+ * (6 on Arbitrum) for display.
73
73
  */
74
74
  export interface BalanceHistoryRow {
75
75
  /** Subgraph entity id (use as a stable row key). */
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../src/balance-history/get-balance-history/types.ts"],"sourcesContent":["import type { Address, Hex } from \"viem\";\n\n/**\n * Subgraph `BalanceChange.type` values for the collateral movements that make up\n * deposit / withdraw history.\n *\n * @remarks\n * Mirrors the `type` strings emitted by the SYMMIO analytics subgraph. The\n * subgraph also emits margin moves (`ALLOCATE` / `DEALLOCATE`); those are out of\n * scope for this slice and are never returned by {@link \"getBalanceHistory\"}.\n */\nexport enum BalanceChangeType {\n /** Collateral deposited into a sub-account. */\n Deposit = \"DEPOSIT\",\n /** Collateral withdrawn from a sub-account. */\n Withdraw = \"WITHDRAW\",\n /** A withdraw routed through a bridge (instant / CCTP). Treated as a withdraw. */\n Bridge = \"BRIDGE\",\n}\n\n/**\n * Filter selecting which movements a {@link \"getBalanceHistory\"} read returns.\n * Maps to the subgraph `type_in` clause via {@link \"balanceHistoryFilterToTypes\"}.\n */\nexport enum BalanceHistoryFilter {\n /** Deposits and withdraws (including bridge withdraws). */\n All = \"All\",\n /** Deposits only. */\n Deposit = \"Deposit\",\n /** Withdraws, including bridge withdraws. */\n Withdraw = \"Withdraw\",\n}\n\n/**\n * The kind of margin transfer an internal-transfer leg belongs to (subgraph\n * `BalanceChange.marginTransferType`). Present only on rows where\n * {@link BalanceHistoryRow.isInternalTransfer} is `true`.\n *\n * @remarks\n * A margin transfer moves collateral between a user's own SubAccount and one of\n * its Virtual Accounts; it expands into a cluster of primitive balance legs that\n * carry this tag (verified against the live analytics subgraph).\n */\nexport enum MarginTransferType {\n /** Funding a Virtual Account's margin from the SubAccount. */\n Add = \"ADD\",\n /** Pulling margin out of a Virtual Account back to the SubAccount. */\n Remove = \"REMOVE\",\n /** Margin automatically returned to the SubAccount (e.g. on close / deallocate). */\n AutoReturn = \"AUTO_RETURN\",\n}\n\n/**\n * How a {@link \"getBalanceHistory\"} read treats **internal margin-transfer legs**\n * — the `WITHDRAW` / `DEPOSIT` rows that are bookkeeping side effects of moving\n * margin between a user's own accounts, not real collateral movements in or out\n * of the protocol. Maps to the subgraph `isMarginTransferSideEffect` filter.\n *\n * @remarks\n * Orthogonal to {@link BalanceHistoryFilter} (which chooses deposit vs withdraw):\n * `filter` picks the direction, `internalTransfers` picks real-vs-transfer.\n */\nexport type InternalTransfersMode =\n /** Only genuine user deposits / withdrawals (`isMarginTransferSideEffect: false`). The default. */\n | \"exclude\"\n /** Only internal-transfer legs (`isMarginTransferSideEffect: true`). */\n | \"only\"\n /** Both — no constraint on `isMarginTransferSideEffect`. */\n | \"include\";\n\n/**\n * One settled collateral movement (deposit or withdraw) on a sub-account.\n *\n * @remarks\n * `amount` is a raw `bigint` in the **collateral token's decimals** (not 18) —\n * scale it with `config.getChainConfig(chainId).addresses.collateralDecimals`\n * (6 on HyperEVM) for display.\n */\nexport interface BalanceHistoryRow {\n /** Subgraph entity id (use as a stable row key). */\n id: string;\n /** Movement kind, decoded from the subgraph `type`. */\n type: BalanceChangeType;\n /** Amount, raw `bigint` in collateral decimals. */\n amount: bigint;\n /** The sub-account the movement belongs to. */\n account: Address;\n /** Block timestamp, unix seconds. */\n timestamp: number;\n /** Transaction hash of the movement. */\n transaction: Hex;\n /**\n * `true` when this row is an internal margin-transfer leg (a side effect of\n * moving margin between the user's own SubAccount and a Virtual Account) rather\n * than a real user deposit / withdrawal. Always `false` under the default\n * `internalTransfers: \"exclude\"`; only meaningful when transfers are included.\n */\n isInternalTransfer: boolean;\n /** The margin-transfer kind when {@link isInternalTransfer} is `true`; otherwise `null`. */\n marginTransferType: MarginTransferType | null;\n}\n"],"mappings":";AAWA,IAAY,IAAL,yBAAA,GAAA;QAEL,EAAA,UAAA,WAEA,EAAA,WAAA,YAEA,EAAA,SAAA;AACF,EAAA,CAAA,CAAA,GAMY,IAAL,yBAAA,GAAA;QAEL,EAAA,MAAA,OAEA,EAAA,UAAA,WAEA,EAAA,WAAA;AACF,EAAA,CAAA,CAAA,GAYY,IAAL,yBAAA,GAAA;QAEL,EAAA,MAAA,OAEA,EAAA,SAAA,UAEA,EAAA,aAAA;AACF,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../src/balance-history/get-balance-history/types.ts"],"sourcesContent":["import type { Address, Hex } from \"viem\";\n\n/**\n * Subgraph `BalanceChange.type` values for the collateral movements that make up\n * deposit / withdraw history.\n *\n * @remarks\n * Mirrors the `type` strings emitted by the SYMMIO analytics subgraph. The\n * subgraph also emits margin moves (`ALLOCATE` / `DEALLOCATE`); those are out of\n * scope for this slice and are never returned by {@link \"getBalanceHistory\"}.\n */\nexport enum BalanceChangeType {\n /** Collateral deposited into a sub-account. */\n Deposit = \"DEPOSIT\",\n /** Collateral withdrawn from a sub-account. */\n Withdraw = \"WITHDRAW\",\n /** A withdraw routed through a bridge (instant / CCTP). Treated as a withdraw. */\n Bridge = \"BRIDGE\",\n}\n\n/**\n * Filter selecting which movements a {@link \"getBalanceHistory\"} read returns.\n * Maps to the subgraph `type_in` clause via {@link \"balanceHistoryFilterToTypes\"}.\n */\nexport enum BalanceHistoryFilter {\n /** Deposits and withdraws (including bridge withdraws). */\n All = \"All\",\n /** Deposits only. */\n Deposit = \"Deposit\",\n /** Withdraws, including bridge withdraws. */\n Withdraw = \"Withdraw\",\n}\n\n/**\n * The kind of margin transfer an internal-transfer leg belongs to (subgraph\n * `BalanceChange.marginTransferType`). Present only on rows where\n * {@link BalanceHistoryRow.isInternalTransfer} is `true`.\n *\n * @remarks\n * A margin transfer moves collateral between a user's own SubAccount and one of\n * its Virtual Accounts; it expands into a cluster of primitive balance legs that\n * carry this tag (verified against the live analytics subgraph).\n */\nexport enum MarginTransferType {\n /** Funding a Virtual Account's margin from the SubAccount. */\n Add = \"ADD\",\n /** Pulling margin out of a Virtual Account back to the SubAccount. */\n Remove = \"REMOVE\",\n /** Margin automatically returned to the SubAccount (e.g. on close / deallocate). */\n AutoReturn = \"AUTO_RETURN\",\n}\n\n/**\n * How a {@link \"getBalanceHistory\"} read treats **internal margin-transfer legs**\n * — the `WITHDRAW` / `DEPOSIT` rows that are bookkeeping side effects of moving\n * margin between a user's own accounts, not real collateral movements in or out\n * of the protocol. Maps to the subgraph `isMarginTransferSideEffect` filter.\n *\n * @remarks\n * Orthogonal to {@link BalanceHistoryFilter} (which chooses deposit vs withdraw):\n * `filter` picks the direction, `internalTransfers` picks real-vs-transfer.\n */\nexport type InternalTransfersMode =\n /** Only genuine user deposits / withdrawals (`isMarginTransferSideEffect: false`). The default. */\n | \"exclude\"\n /** Only internal-transfer legs (`isMarginTransferSideEffect: true`). */\n | \"only\"\n /** Both — no constraint on `isMarginTransferSideEffect`. */\n | \"include\";\n\n/**\n * One settled collateral movement (deposit or withdraw) on a sub-account.\n *\n * @remarks\n * `amount` is a raw `bigint` in the **collateral token's decimals** (not 18) —\n * scale it with `config.getChainConfig(chainId).addresses.collateralDecimals`\n * (6 on Arbitrum) for display.\n */\nexport interface BalanceHistoryRow {\n /** Subgraph entity id (use as a stable row key). */\n id: string;\n /** Movement kind, decoded from the subgraph `type`. */\n type: BalanceChangeType;\n /** Amount, raw `bigint` in collateral decimals. */\n amount: bigint;\n /** The sub-account the movement belongs to. */\n account: Address;\n /** Block timestamp, unix seconds. */\n timestamp: number;\n /** Transaction hash of the movement. */\n transaction: Hex;\n /**\n * `true` when this row is an internal margin-transfer leg (a side effect of\n * moving margin between the user's own SubAccount and a Virtual Account) rather\n * than a real user deposit / withdrawal. Always `false` under the default\n * `internalTransfers: \"exclude\"`; only meaningful when transfers are included.\n */\n isInternalTransfer: boolean;\n /** The margin-transfer kind when {@link isInternalTransfer} is `true`; otherwise `null`. */\n marginTransferType: MarginTransferType | null;\n}\n"],"mappings":";AAWA,IAAY,IAAL,yBAAA,GAAA;QAEL,EAAA,UAAA,WAEA,EAAA,WAAA,YAEA,EAAA,SAAA;AACF,EAAA,CAAA,CAAA,GAMY,IAAL,yBAAA,GAAA;QAEL,EAAA,MAAA,OAEA,EAAA,UAAA,WAEA,EAAA,WAAA;AACF,EAAA,CAAA,CAAA,GAYY,IAAL,yBAAA,GAAA;QAEL,EAAA,MAAA,OAEA,EAAA,SAAA,UAEA,EAAA,aAAA;AACF,EAAA,CAAA,CAAA"}
@@ -8,7 +8,7 @@ import { SymmioChainConfig } from '../types.js';
8
8
  *
9
9
  * @example
10
10
  * ```ts
11
- * const config = getChainConfig(SymmioSupportedChainId.HYPER_EVM);
11
+ * const config = getChainConfig(SymmioSupportedChainId.ARBITRUM);
12
12
  * console.log(config.addresses.accountLayerAddress);
13
13
  * ```
14
14
  */
@@ -1 +1 @@
1
- {"version":3,"file":"get-chain-config.js","names":[],"sources":["../../../../src/core/chains/actions/get-chain-config.ts"],"sourcesContent":["import { SymmError } from \"../../../shared/errors/symm-error\";\nimport { CHAIN_CONFIGS } from \"../registry\";\nimport type { SymmioChainConfig } from \"../types\";\n\n/**\n * Get the complete config for a chain.\n *\n * @param chainId - The chain ID to look up\n * @returns The resolved chain config\n * @throws {SymmError} when the chain is not supported\n *\n * @example\n * ```ts\n * const config = getChainConfig(SymmioSupportedChainId.HYPER_EVM);\n * console.log(config.addresses.accountLayerAddress);\n * ```\n */\nexport function getChainConfig(chainId: number): SymmioChainConfig {\n const config = CHAIN_CONFIGS[chainId];\n\n if (!config) {\n throw new SymmError(\"config\", \"UNSUPPORTED_CHAIN\", `No config registered for chain ${chainId}.`);\n }\n\n return config;\n}\n"],"mappings":";;;AAiBA,SAAgB,EAAe,GAAoC;CACjE,IAAM,IAAS,EAAc;CAE7B,IAAI,CAAC,GACH,MAAM,IAAI,EAAU,UAAU,qBAAqB,kCAAkC,EAAQ,EAAE;CAGjG,OAAO;AACT"}
1
+ {"version":3,"file":"get-chain-config.js","names":[],"sources":["../../../../src/core/chains/actions/get-chain-config.ts"],"sourcesContent":["import { SymmError } from \"../../../shared/errors/symm-error\";\nimport { CHAIN_CONFIGS } from \"../registry\";\nimport type { SymmioChainConfig } from \"../types\";\n\n/**\n * Get the complete config for a chain.\n *\n * @param chainId - The chain ID to look up\n * @returns The resolved chain config\n * @throws {SymmError} when the chain is not supported\n *\n * @example\n * ```ts\n * const config = getChainConfig(SymmioSupportedChainId.ARBITRUM);\n * console.log(config.addresses.accountLayerAddress);\n * ```\n */\nexport function getChainConfig(chainId: number): SymmioChainConfig {\n const config = CHAIN_CONFIGS[chainId];\n\n if (!config) {\n throw new SymmError(\"config\", \"UNSUPPORTED_CHAIN\", `No config registered for chain ${chainId}.`);\n }\n\n return config;\n}\n"],"mappings":";;;AAiBA,SAAgB,EAAe,GAAoC;CACjE,IAAM,IAAS,EAAc;CAE7B,IAAI,CAAC,GACH,MAAM,IAAI,EAAU,UAAU,qBAAqB,kCAAkC,EAAQ,EAAE;CAGjG,OAAO;AACT"}
@@ -14,7 +14,7 @@ import { SymmioResolvedSolver } from '../types.js';
14
14
  *
15
15
  * @example
16
16
  * ```ts
17
- * const solver = getDefaultSolver(SymmioSupportedChainId.HYPER_EVM);
17
+ * const solver = getDefaultSolver(SymmioSupportedChainId.ARBITRUM);
18
18
  * console.log(solver.url); // "https://solver.enigma.bz/api"
19
19
  * ```
20
20
  */
@@ -1 +1 @@
1
- {"version":3,"file":"get-default-solver.js","names":[],"sources":["../../../../src/core/chains/actions/get-default-solver.ts"],"sourcesContent":["import { resolveSolver } from \"../resolve-solver\";\nimport type { SymmioResolvedSolver } from \"../types\";\nimport { getChainConfig } from \"./get-chain-config\";\n\n/**\n * Get the built-in default solver config for a chain.\n *\n * Mirrors {@link getChainConfig} for the solver dimension: it returns the chain's\n * `defaultSolverId` solver. Consumers override or extend a chain's solvers via\n * `createConfig({ symmioConfig })` and resolve the active one with\n * `config.getSolver({ chainId, solverId })`.\n *\n * @param chainId - The chain to look up the default solver for.\n * @returns The chain's default solver config.\n * @throws {SymmError} when the chain is unsupported or its default solver is\n * not configured.\n *\n * @example\n * ```ts\n * const solver = getDefaultSolver(SymmioSupportedChainId.HYPER_EVM);\n * console.log(solver.url); // \"https://solver.enigma.bz/api\"\n * ```\n */\nexport function getDefaultSolver(chainId: number): SymmioResolvedSolver {\n return resolveSolver(getChainConfig(chainId));\n}\n"],"mappings":";;;AAuBA,SAAgB,EAAiB,GAAuC;CACtE,OAAO,EAAc,EAAe,CAAO,CAAC;AAC9C"}
1
+ {"version":3,"file":"get-default-solver.js","names":[],"sources":["../../../../src/core/chains/actions/get-default-solver.ts"],"sourcesContent":["import { resolveSolver } from \"../resolve-solver\";\nimport type { SymmioResolvedSolver } from \"../types\";\nimport { getChainConfig } from \"./get-chain-config\";\n\n/**\n * Get the built-in default solver config for a chain.\n *\n * Mirrors {@link getChainConfig} for the solver dimension: it returns the chain's\n * `defaultSolverId` solver. Consumers override or extend a chain's solvers via\n * `createConfig({ symmioConfig })` and resolve the active one with\n * `config.getSolver({ chainId, solverId })`.\n *\n * @param chainId - The chain to look up the default solver for.\n * @returns The chain's default solver config.\n * @throws {SymmError} when the chain is unsupported or its default solver is\n * not configured.\n *\n * @example\n * ```ts\n * const solver = getDefaultSolver(SymmioSupportedChainId.ARBITRUM);\n * console.log(solver.url); // \"https://solver.enigma.bz/api\"\n * ```\n */\nexport function getDefaultSolver(chainId: number): SymmioResolvedSolver {\n return resolveSolver(getChainConfig(chainId));\n}\n"],"mappings":";;;AAuBA,SAAgB,EAAiB,GAAuC;CACtE,OAAO,EAAc,EAAe,CAAO,CAAC;AAC9C"}
@@ -1 +1 @@
1
- {"version":3,"file":"list-supported-chains.js","names":[],"sources":["../../../../src/core/chains/actions/list-supported-chains.ts"],"sourcesContent":["import { SymmioSupportedChainId } from \"../supported-chains\";\n\n/**\n * List all chain IDs with built-in configs.\n *\n * @returns Array of supported chain IDs\n */\nexport function listSupportedChains(): SymmioSupportedChainId[] {\n /**\n * Numeric enums carry a reverse mapping (`{ 999: \"HYPER_EVM\", HYPER_EVM: 999 }`),\n * so `Object.values` yields the string keys too — keep only the chain ids.\n */\n return Object.values(SymmioSupportedChainId).filter(\n (value): value is SymmioSupportedChainId => typeof value === \"number\",\n );\n}\n"],"mappings":";;AAOA,SAAgB,IAAgD;CAK9D,OAAO,OAAO,OAAO,CAAsB,EAAE,QAC1C,MAA2C,OAAO,KAAU,QAC/D;AACF"}
1
+ {"version":3,"file":"list-supported-chains.js","names":[],"sources":["../../../../src/core/chains/actions/list-supported-chains.ts"],"sourcesContent":["import { SymmioSupportedChainId } from \"../supported-chains\";\n\n/**\n * List all chain IDs with built-in configs.\n *\n * @returns Array of supported chain IDs\n */\nexport function listSupportedChains(): SymmioSupportedChainId[] {\n /**\n * Numeric enums carry a reverse mapping (`{ 42161: \"ARBITRUM\", ARBITRUM: 42161 }`),\n * so `Object.values` yields the string keys too — keep only the chain ids.\n */\n return Object.values(SymmioSupportedChainId).filter(\n (value): value is SymmioSupportedChainId => typeof value === \"number\",\n );\n}\n"],"mappings":";;AAOA,SAAgB,IAAgD;CAK9D,OAAO,OAAO,OAAO,CAAsB,EAAE,QAC1C,MAA2C,OAAO,KAAU,QAC/D;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/core/chains/registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAoJ3D,CAAC"}
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/core/chains/registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAyI3D,CAAC"}
@@ -1,58 +1,9 @@
1
1
  import { SymmioSupportedChainId as e } from "./supported-chains.js";
2
2
  //#region src/core/chains/registry.ts
3
3
  var t = {
4
- [e.HYPER_EVM]: {
5
- chainId: e.HYPER_EVM,
6
- addresses: {
7
- symmioAddress: "0x57331038c21982116EE9b0906E4a5c5cB52dcE2e",
8
- instantLayerAddress: "0x72DBF07457b2712b160F67A85D338F860c1CA620",
9
- accountLayerAddress: "0x46493c376758Da47823D7E3Ae5d417eA6546eEB3",
10
- affiliatesAddress: "0xBcB033C9154401fA000a1Ae60843f79f45741b7c",
11
- collateralAddress: "0xb88339CB7199b77E23DB6E890353E22632Ba630f",
12
- collateralDecimals: 6
13
- },
14
- subgraphs: {
15
- analytics: "https://api.goldsky.com/api/public/project_cm1hfr4527p0f01u85mz499u8/subgraphs/hyperevm_mainnet_analytics/latest/gn",
16
- events: "https://api.goldsky.com/api/public/project_cm1hfr4527p0f01u85mz499u8/subgraphs/hyperevm_mainnet_events/latest/gn"
17
- },
18
- solvers: { enigma: {
19
- name: "Enigma",
20
- address: "0x76bc5889c0cfcC20960b0D81F541595d81a95122",
21
- url: "https://solver.enigma.bz/api",
22
- tpsl: {
23
- url: "https://conditional-orders-handler-lowcap85.rasa.capital",
24
- wsUrl: "wss://notification.rasa.capital/ws/v1/subscribe",
25
- appName: "Hyper-EVM_COH-Low-Cap_Production",
26
- cohWalletAddress: "0xf2afbb3f13Ca72bfb69749f3bC5EbD6528b1fc31"
27
- },
28
- notifications: {
29
- url: "wss://notification.rasa.capital/ws/v1/subscribe",
30
- channel: "Hyper-EVM_Solver-Low-Cap_Production",
31
- protocol: "enigma",
32
- searchUrl: "https://notification.rasa.capital/notification"
33
- },
34
- capabilities: {
35
- groupClose: !0,
36
- listingService: !0
37
- }
38
- } },
39
- defaultSolverId: "enigma",
40
- priceService: {
41
- type: "enigma",
42
- url: "https://lowcap-price.enigma.bz",
43
- wsUrl: "wss://lowcap-price.enigma.bz/ws"
44
- },
45
- muon: { urls: [
46
- "https://muon-oracle1.rasa.capital/v1/",
47
- "https://muon-oracle2.rasa.capital/v1/",
48
- "https://muon-oracle3.rasa.capital/v1/",
49
- "https://muon-oracle4.rasa.capital/v1/"
50
- ] },
51
- listing: { url: "https://listing85.enigma.bz" },
52
- inventory: { url: "https://inventory85.enigma.bz" }
53
- },
54
4
  [e.BASE]: {
55
5
  chainId: e.BASE,
6
+ contractsVersion: "0.8.5",
56
7
  addresses: {
57
8
  symmioAddress: "0x91Cf2D8Ed503EC52768999aA6D8DBeA6e52dbe43",
58
9
  instantLayerAddress: "0x0825435285ac0E5c02c7a7c443F631f3e07fE375",
@@ -87,6 +38,57 @@ var t = {
87
38
  "https://muon-oracle3.rasa.capital/v1/",
88
39
  "https://muon-oracle4.rasa.capital/v1/"
89
40
  ] }
41
+ },
42
+ [e.ARBITRUM]: {
43
+ chainId: e.ARBITRUM,
44
+ contractsVersion: "0.8.6",
45
+ addresses: {
46
+ symmioAddress: "0x57331027091994FCb9c5Aec48ea92cEf0a93CF6A",
47
+ instantLayerAddress: "0xCB8F789d6f7e59B3D266490e1Aa8e35cFb755132",
48
+ accountLayerAddress: "0x573310d1D6ec18cB21E1aB949414470D9bf5c24E",
49
+ affiliatesAddress: "0x58bB5Bdc279321507DfB7AB54B9e7EF3DdA6E24D",
50
+ collateralAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
51
+ collateralDecimals: 6
52
+ },
53
+ subgraphs: {
54
+ analytics: "https://api.goldsky.com/api/public/project_cm1hfr4527p0f01u85mz499u8/subgraphs/arbitrum-vibe-mainnet-analytics/latest/gn",
55
+ events: "https://api.goldsky.com/api/public/project_cm1hfr4527p0f01u85mz499u8/subgraphs/arbitrum-vibe-mainnet-events/stage/gn"
56
+ },
57
+ solvers: { enigma: {
58
+ name: "Enigma",
59
+ address: "0x0420b24359d2DCccA53904042aa36A641162445c",
60
+ url: "https://solver.enigma.bz/api",
61
+ tpsl: {
62
+ url: "https://tpsl.enigma.bz",
63
+ wsUrl: "wss://notification.rasa.capital/ws/v1/subscribe",
64
+ appName: "Arbitrum_COH_Production",
65
+ cohWalletAddress: "0xFC3a98d30AdAA220Ae4150fcaC06Bd200b6E146B"
66
+ },
67
+ notifications: {
68
+ url: "wss://notification.rasa.capital/ws/v1/subscribe",
69
+ channel: "Arbitrum_Solver-Low-Cap_Production",
70
+ protocol: "enigma",
71
+ searchUrl: "https://notification.rasa.capital/notification"
72
+ },
73
+ capabilities: {
74
+ groupClose: !0,
75
+ listingService: !0
76
+ }
77
+ } },
78
+ defaultSolverId: "enigma",
79
+ priceService: {
80
+ type: "enigma",
81
+ url: "https://lowcap-price.enigma.bz",
82
+ wsUrl: "wss://lowcap-price.enigma.bz/ws"
83
+ },
84
+ muon: { urls: [
85
+ "https://muon-oracle1.rasa.capital/v1/",
86
+ "https://muon-oracle2.rasa.capital/v1/",
87
+ "https://muon-oracle3.rasa.capital/v1/",
88
+ "https://muon-oracle4.rasa.capital/v1/"
89
+ ] },
90
+ listing: { url: "https://listing85.enigma.bz" },
91
+ inventory: { url: "https://inventory85.enigma.bz" }
90
92
  }
91
93
  };
92
94
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"registry.js","names":[],"sources":["../../../src/core/chains/registry.ts"],"sourcesContent":["import { SymmioSupportedChainId } from \"./supported-chains\";\nimport type { SymmioChainConfig } from \"./types\";\n\n/**\n * Built-in SYMMIO deployment configs keyed by chain ID.\n *\n * @internal\n */\nexport const CHAIN_CONFIGS: Record<number, SymmioChainConfig> = {\n [SymmioSupportedChainId.HYPER_EVM]: {\n chainId: SymmioSupportedChainId.HYPER_EVM,\n addresses: {\n symmioAddress: \"0x57331038c21982116EE9b0906E4a5c5cB52dcE2e\",\n instantLayerAddress: \"0x72DBF07457b2712b160F67A85D338F860c1CA620\",\n accountLayerAddress: \"0x46493c376758Da47823D7E3Ae5d417eA6546eEB3\",\n affiliatesAddress: \"0xBcB033C9154401fA000a1Ae60843f79f45741b7c\",\n collateralAddress: \"0xb88339CB7199b77E23DB6E890353E22632Ba630f\",\n collateralDecimals: 6,\n },\n subgraphs: {\n analytics:\n \"https://api.goldsky.com/api/public/project_cm1hfr4527p0f01u85mz499u8/subgraphs/hyperevm_mainnet_analytics/latest/gn\",\n events:\n \"https://api.goldsky.com/api/public/project_cm1hfr4527p0f01u85mz499u8/subgraphs/hyperevm_mainnet_events/latest/gn\",\n },\n solvers: {\n enigma: {\n name: \"Enigma\",\n address: \"0x76bc5889c0cfcC20960b0D81F541595d81a95122\",\n url: \"https://solver.enigma.bz/api\",\n tpsl: {\n url: \"https://conditional-orders-handler-lowcap85.rasa.capital\",\n wsUrl: \"wss://notification.rasa.capital/ws/v1/subscribe\",\n appName: \"Hyper-EVM_COH-Low-Cap_Production\",\n cohWalletAddress: \"0xf2afbb3f13Ca72bfb69749f3bC5EbD6528b1fc31\",\n },\n notifications: {\n url: \"wss://notification.rasa.capital/ws/v1/subscribe\",\n channel: \"Hyper-EVM_Solver-Low-Cap_Production\",\n protocol: \"enigma\",\n // Same host as the WebSocket stream; the REST search API is served under\n // the `/notification` prefix (OpenAPI `servers[0].url`).\n searchUrl: \"https://notification.rasa.capital/notification\",\n },\n // VA-per-market/side isolation supports folding a group into one close.\n // `listingService`: declares this solver does the lowcap Pools/listing —\n // declarative only; the listing functions resolve the backend at chain level.\n capabilities: { groupClose: true, listingService: true },\n },\n },\n defaultSolverId: \"enigma\",\n priceService: {\n type: \"enigma\",\n url: \"https://lowcap-price.enigma.bz\",\n wsUrl: \"wss://lowcap-price.enigma.bz/ws\",\n },\n muon: {\n // Muon oracle gateways (https://docs.symm.io/api-endpoints-and-deployments/muon-api),\n // tried in order until one returns a successful attestation.\n urls: [\n \"https://muon-oracle1.rasa.capital/v1/\",\n \"https://muon-oracle2.rasa.capital/v1/\",\n \"https://muon-oracle3.rasa.capital/v1/\",\n \"https://muon-oracle4.rasa.capital/v1/\",\n ],\n },\n listing: {\n // Pools listing backend. Host root only — the generated client's paths\n // already carry `/v2`, so a versioned base would 404.\n // Staging: https://listing-staging.enigma.bz\n url: \"https://listing85.enigma.bz\",\n },\n inventory: {\n // Custody backend behind the Pools; source of system-wide TVL. Host root\n // only — the generated client's paths already carry `/api/v1`.\n // Staging: https://inventory-staging.enigma.bz\n url: \"https://inventory85.enigma.bz\",\n },\n },\n\n [SymmioSupportedChainId.BASE]: {\n chainId: SymmioSupportedChainId.BASE,\n addresses: {\n symmioAddress: \"0x91Cf2D8Ed503EC52768999aA6D8DBeA6e52dbe43\",\n instantLayerAddress: \"0x0825435285ac0E5c02c7a7c443F631f3e07fE375\",\n accountLayerAddress: \"0x56caf00c6C5cB5478570Bb23807B9d1D697863DC\",\n affiliatesAddress: \"0x45Eecd7B4f442388ACD90467E423A5CAAC3a9C3f\",\n collateralAddress: \"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913\", // USDC on Base\n collateralDecimals: 6,\n },\n // Rasa — Base's real solver. Rasa's API shares Enigma's paths for the\n // shared reads (contract-symbols, funding, locked params, error codes,\n // notional_cap/{id}, instant lists), so those work today; the diverging\n // endpoints (`/instant_trade/open|close` execution, `/estimated-price`,\n // `/notional_cap` list) return 404 until per-kind dispatch is wired into\n // the solver actions.\n // No `tpsl` block: Base COH deployment not confirmed yet — absence marks\n // conditional orders unsupported (add the block when the vendor provides it).\n solvers: {\n rasa: {\n name: \"Rasa\",\n address: \"0x81631953E0C093e72935C1CAA4C7D519B2A0E407\",\n // Staging URL — swap to the production solver URL when published.\n url: \"https://stage-archon.rasa.capital\",\n // Rasa's own position-state stream — real Base data. No `searchUrl`: the\n // rasa protocol serves notification history from the solver's own\n // position-state endpoint (via `searchNotifications`), not a REST service.\n notifications: {\n url: \"wss://stage-archon.rasa.capital/ws/position-state-ws3\",\n protocol: \"rasa\",\n },\n // Majors support LIMIT orders (pending open at a user-set price).\n capabilities: { limitOrder: true },\n },\n },\n defaultSolverId: \"rasa\",\n // Base's own analytics and events subgraphs (Goldsky) — real, production endpoints.\n subgraphs: {\n analytics:\n \"https://api.goldsky.com/api/public/project_cm1hfr4527p0f01u85mz499u8/subgraphs/base_analytics/latest/gn\",\n events: \"https://api.goldsky.com/api/public/project_cm1hfr4527p0f01u85mz499u8/subgraphs/base_events/latest/gn\",\n },\n // Rasa serves majors and has no mark-price feed of its own — no REST mark\n // price, no mark-price WebSocket, no index price. Binance USD-M Futures is\n // the price source, matching how the reference UI configures this solver.\n //\n // Both URLs are public constants but stay in config on purpose: they are the\n // escape hatch for Binance's regional restrictions, so an integrator whose\n // users are blocked repoints them at their own proxy with no SDK change.\n priceService: {\n type: \"binance\",\n /** USD-M Futures REST root. The client appends `/fapi/v1/…`. */\n url: \"https://fapi.binance.com\",\n /**\n * All-symbols mark-price broadcast, 1 push/sec.\n *\n * The `/market/ws/` prefix is deliberate and was verified against the live\n * endpoint: Binance's *documented* `/ws/<stream>` form (and\n * `/stream?streams=`) connect and then never push a frame, which would ship\n * a feed that reports `open` and silently never ticks.\n */\n wsUrl: \"wss://fstream.binance.com/market/ws/!markPrice@arr@1s\",\n },\n // Muon is deployment-agnostic: one `symmio` app on one shared gateway set\n // serves every SYMMIO deployment, and the per-deployment input is the\n // `symmio` request param (this chain's diamond, from `addresses` above).\n // So these are Base's real gateways, not a HyperEVM stand-in.\n muon: {\n urls: [\n \"https://muon-oracle1.rasa.capital/v1/\",\n \"https://muon-oracle2.rasa.capital/v1/\",\n \"https://muon-oracle3.rasa.capital/v1/\",\n \"https://muon-oracle4.rasa.capital/v1/\",\n ],\n },\n },\n};\n"],"mappings":";;AAQA,IAAa,IAAmD;EAC7D,EAAuB,YAAY;EAClC,SAAS,EAAuB;EAChC,WAAW;GACT,eAAe;GACf,qBAAqB;GACrB,qBAAqB;GACrB,mBAAmB;GACnB,mBAAmB;GACnB,oBAAoB;EACtB;EACA,WAAW;GACT,WACE;GACF,QACE;EACJ;EACA,SAAS,EACP,QAAQ;GACN,MAAM;GACN,SAAS;GACT,KAAK;GACL,MAAM;IACJ,KAAK;IACL,OAAO;IACP,SAAS;IACT,kBAAkB;GACpB;GACA,eAAe;IACb,KAAK;IACL,SAAS;IACT,UAAU;IAGV,WAAW;GACb;GAIA,cAAc;IAAE,YAAY;IAAM,gBAAgB;GAAK;EACzD,EACF;EACA,iBAAiB;EACjB,cAAc;GACZ,MAAM;GACN,KAAK;GACL,OAAO;EACT;EACA,MAAM,EAGJ,MAAM;GACJ;GACA;GACA;GACA;EACF,EACF;EACA,SAAS,EAIP,KAAK,8BACP;EACA,WAAW,EAIT,KAAK,gCACP;CACF;EAEC,EAAuB,OAAO;EAC7B,SAAS,EAAuB;EAChC,WAAW;GACT,eAAe;GACf,qBAAqB;GACrB,qBAAqB;GACrB,mBAAmB;GACnB,mBAAmB;GACnB,oBAAoB;EACtB;EASA,SAAS,EACP,MAAM;GACJ,MAAM;GACN,SAAS;GAET,KAAK;GAIL,eAAe;IACb,KAAK;IACL,UAAU;GACZ;GAEA,cAAc,EAAE,YAAY,GAAK;EACnC,EACF;EACA,iBAAiB;EAEjB,WAAW;GACT,WACE;GACF,QAAQ;EACV;EAQA,cAAc;GACZ,MAAM;GAEN,KAAK;GASL,OAAO;EACT;EAKA,MAAM,EACJ,MAAM;GACJ;GACA;GACA;GACA;EACF,EACF;CACF;AACF"}
1
+ {"version":3,"file":"registry.js","names":[],"sources":["../../../src/core/chains/registry.ts"],"sourcesContent":["import { SymmioSupportedChainId } from \"./supported-chains\";\nimport type { SymmioChainConfig } from \"./types\";\n\n/**\n * Built-in SYMMIO deployment configs keyed by chain ID.\n *\n * @internal\n */\nexport const CHAIN_CONFIGS: Record<number, SymmioChainConfig> = {\n [SymmioSupportedChainId.BASE]: {\n chainId: SymmioSupportedChainId.BASE,\n contractsVersion: \"0.8.5\",\n addresses: {\n symmioAddress: \"0x91Cf2D8Ed503EC52768999aA6D8DBeA6e52dbe43\",\n instantLayerAddress: \"0x0825435285ac0E5c02c7a7c443F631f3e07fE375\",\n accountLayerAddress: \"0x56caf00c6C5cB5478570Bb23807B9d1D697863DC\",\n affiliatesAddress: \"0x45Eecd7B4f442388ACD90467E423A5CAAC3a9C3f\",\n collateralAddress: \"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913\", // USDC on Base\n collateralDecimals: 6,\n },\n // Rasa — Base's real solver. Rasa's API shares Enigma's paths for the\n // shared reads (contract-symbols, funding, locked params, error codes,\n // notional_cap/{id}, instant lists), so those work today; the diverging\n // endpoints (`/instant_trade/open|close` execution, `/estimated-price`,\n // `/notional_cap` list) return 404 until per-kind dispatch is wired into\n // the solver actions.\n // No `tpsl` block: Base COH deployment not confirmed yet — absence marks\n // conditional orders unsupported (add the block when the vendor provides it).\n solvers: {\n rasa: {\n name: \"Rasa\",\n address: \"0x81631953E0C093e72935C1CAA4C7D519B2A0E407\",\n // Staging URL — swap to the production solver URL when published.\n url: \"https://stage-archon.rasa.capital\",\n // Rasa's own position-state stream — real Base data. No `searchUrl`: the\n // rasa protocol serves notification history from the solver's own\n // position-state endpoint (via `searchNotifications`), not a REST service.\n notifications: {\n url: \"wss://stage-archon.rasa.capital/ws/position-state-ws3\",\n protocol: \"rasa\",\n },\n // Majors support LIMIT orders (pending open at a user-set price).\n capabilities: { limitOrder: true },\n },\n },\n defaultSolverId: \"rasa\",\n // Base's own analytics and events subgraphs (Goldsky) — real, production endpoints.\n subgraphs: {\n analytics:\n \"https://api.goldsky.com/api/public/project_cm1hfr4527p0f01u85mz499u8/subgraphs/base_analytics/latest/gn\",\n events: \"https://api.goldsky.com/api/public/project_cm1hfr4527p0f01u85mz499u8/subgraphs/base_events/latest/gn\",\n },\n // Rasa serves majors and has no mark-price feed of its own — no REST mark\n // price, no mark-price WebSocket, no index price. Binance USD-M Futures is\n // the price source, matching how the reference UI configures this solver.\n //\n // Both URLs are public constants but stay in config on purpose: they are the\n // escape hatch for Binance's regional restrictions, so an integrator whose\n // users are blocked repoints them at their own proxy with no SDK change.\n priceService: {\n type: \"binance\",\n /** USD-M Futures REST root. The client appends `/fapi/v1/…`. */\n url: \"https://fapi.binance.com\",\n /**\n * All-symbols mark-price broadcast, 1 push/sec.\n *\n * The `/market/ws/` prefix is deliberate and was verified against the live\n * endpoint: Binance's *documented* `/ws/<stream>` form (and\n * `/stream?streams=`) connect and then never push a frame, which would ship\n * a feed that reports `open` and silently never ticks.\n */\n wsUrl: \"wss://fstream.binance.com/market/ws/!markPrice@arr@1s\",\n },\n // Muon is deployment-agnostic: one `symmio` app on one shared gateway set\n // serves every SYMMIO deployment, and the per-deployment input is the\n // `symmio` request param (this chain's diamond, from `addresses` above).\n // So these are Base's real gateways, not another chain's stand-in.\n muon: {\n urls: [\n \"https://muon-oracle1.rasa.capital/v1/\",\n \"https://muon-oracle2.rasa.capital/v1/\",\n \"https://muon-oracle3.rasa.capital/v1/\",\n \"https://muon-oracle4.rasa.capital/v1/\",\n ],\n },\n },\n\n [SymmioSupportedChainId.ARBITRUM]: {\n chainId: SymmioSupportedChainId.ARBITRUM,\n contractsVersion: \"0.8.6\",\n addresses: {\n symmioAddress: \"0x57331027091994FCb9c5Aec48ea92cEf0a93CF6A\",\n instantLayerAddress: \"0xCB8F789d6f7e59B3D266490e1Aa8e35cFb755132\",\n accountLayerAddress: \"0x573310d1D6ec18cB21E1aB949414470D9bf5c24E\",\n affiliatesAddress: \"0x58bB5Bdc279321507DfB7AB54B9e7EF3DdA6E24D\",\n collateralAddress: \"0xaf88d065e77c8cC2239327C5EDb3A432268e5831\",\n collateralDecimals: 6,\n },\n subgraphs: {\n analytics:\n \"https://api.goldsky.com/api/public/project_cm1hfr4527p0f01u85mz499u8/subgraphs/arbitrum-vibe-mainnet-analytics/latest/gn\",\n events:\n \"https://api.goldsky.com/api/public/project_cm1hfr4527p0f01u85mz499u8/subgraphs/arbitrum-vibe-mainnet-events/stage/gn\",\n },\n solvers: {\n enigma: {\n name: \"Enigma\",\n address: \"0x0420b24359d2DCccA53904042aa36A641162445c\",\n url: \"https://solver.enigma.bz/api\",\n tpsl: {\n url: \"https://tpsl.enigma.bz\",\n wsUrl: \"wss://notification.rasa.capital/ws/v1/subscribe\",\n appName: \"Arbitrum_COH_Production\",\n cohWalletAddress: \"0xFC3a98d30AdAA220Ae4150fcaC06Bd200b6E146B\",\n },\n notifications: {\n url: \"wss://notification.rasa.capital/ws/v1/subscribe\",\n channel: \"Arbitrum_Solver-Low-Cap_Production\",\n protocol: \"enigma\",\n searchUrl: \"https://notification.rasa.capital/notification\",\n },\n capabilities: { groupClose: true, listingService: true },\n },\n },\n defaultSolverId: \"enigma\",\n priceService: {\n type: \"enigma\",\n url: \"https://lowcap-price.enigma.bz\",\n wsUrl: \"wss://lowcap-price.enigma.bz/ws\",\n },\n muon: {\n urls: [\n \"https://muon-oracle1.rasa.capital/v1/\",\n \"https://muon-oracle2.rasa.capital/v1/\",\n \"https://muon-oracle3.rasa.capital/v1/\",\n \"https://muon-oracle4.rasa.capital/v1/\",\n ],\n },\n listing: {\n url: \"https://listing85.enigma.bz\",\n },\n inventory: {\n url: \"https://inventory85.enigma.bz\",\n },\n },\n};\n"],"mappings":";;AAQA,IAAa,IAAmD;EAC7D,EAAuB,OAAO;EAC7B,SAAS,EAAuB;EAChC,kBAAkB;EAClB,WAAW;GACT,eAAe;GACf,qBAAqB;GACrB,qBAAqB;GACrB,mBAAmB;GACnB,mBAAmB;GACnB,oBAAoB;EACtB;EASA,SAAS,EACP,MAAM;GACJ,MAAM;GACN,SAAS;GAET,KAAK;GAIL,eAAe;IACb,KAAK;IACL,UAAU;GACZ;GAEA,cAAc,EAAE,YAAY,GAAK;EACnC,EACF;EACA,iBAAiB;EAEjB,WAAW;GACT,WACE;GACF,QAAQ;EACV;EAQA,cAAc;GACZ,MAAM;GAEN,KAAK;GASL,OAAO;EACT;EAKA,MAAM,EACJ,MAAM;GACJ;GACA;GACA;GACA;EACF,EACF;CACF;EAEC,EAAuB,WAAW;EACjC,SAAS,EAAuB;EAChC,kBAAkB;EAClB,WAAW;GACT,eAAe;GACf,qBAAqB;GACrB,qBAAqB;GACrB,mBAAmB;GACnB,mBAAmB;GACnB,oBAAoB;EACtB;EACA,WAAW;GACT,WACE;GACF,QACE;EACJ;EACA,SAAS,EACP,QAAQ;GACN,MAAM;GACN,SAAS;GACT,KAAK;GACL,MAAM;IACJ,KAAK;IACL,OAAO;IACP,SAAS;IACT,kBAAkB;GACpB;GACA,eAAe;IACb,KAAK;IACL,SAAS;IACT,UAAU;IACV,WAAW;GACb;GACA,cAAc;IAAE,YAAY;IAAM,gBAAgB;GAAK;EACzD,EACF;EACA,iBAAiB;EACjB,cAAc;GACZ,MAAM;GACN,KAAK;GACL,OAAO;EACT;EACA,MAAM,EACJ,MAAM;GACJ;GACA;GACA;GACA;EACF,EACF;EACA,SAAS,EACP,KAAK,8BACP;EACA,WAAW,EACT,KAAK,gCACP;CACF;AACF"}
@@ -2,11 +2,11 @@
2
2
  * Chain IDs with built-in SYMMIO deployment configs.
3
3
  *
4
4
  * Use these values when calling SDK functions that require a chain ID.
5
- * The SDK ships production and staging configs for each supported chain.
5
+ * The SDK ships a built-in production config for each supported chain.
6
6
  */
7
7
  export declare enum SymmioSupportedChainId {
8
- /** HyperEVM mainnet (chain ID 999) */
9
- HYPER_EVM = 999,
8
+ /** Arbitrum One (chain ID 42161) */
9
+ ARBITRUM = 42161,
10
10
  /** Base mainnet (chain ID 8453) */
11
11
  BASE = 8453
12
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"supported-chains.d.ts","sourceRoot":"","sources":["../../../src/core/chains/supported-chains.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,oBAAY,sBAAsB;IAChC,sCAAsC;IACtC,SAAS,MAAM;IACf,mCAAmC;IACnC,IAAI,OAAO;CACZ"}
1
+ {"version":3,"file":"supported-chains.d.ts","sourceRoot":"","sources":["../../../src/core/chains/supported-chains.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,oBAAY,sBAAsB;IAChC,oCAAoC;IACpC,QAAQ,QAAQ;IAChB,mCAAmC;IACnC,IAAI,OAAO;CACZ"}
@@ -1,6 +1,6 @@
1
1
  //#region src/core/chains/supported-chains.ts
2
2
  var e = /* @__PURE__ */ function(e) {
3
- return e[e.HYPER_EVM = 999] = "HYPER_EVM", e[e.BASE = 8453] = "BASE", e;
3
+ return e[e.ARBITRUM = 42161] = "ARBITRUM", e[e.BASE = 8453] = "BASE", e;
4
4
  }({});
5
5
  //#endregion
6
6
  export { e as SymmioSupportedChainId };
@@ -1 +1 @@
1
- {"version":3,"file":"supported-chains.js","names":[],"sources":["../../../src/core/chains/supported-chains.ts"],"sourcesContent":["/**\n * Chain IDs with built-in SYMMIO deployment configs.\n *\n * Use these values when calling SDK functions that require a chain ID.\n * The SDK ships production and staging configs for each supported chain.\n */\nexport enum SymmioSupportedChainId {\n /** HyperEVM mainnet (chain ID 999) */\n HYPER_EVM = 999,\n /** Base mainnet (chain ID 8453) */\n BASE = 8453,\n}\n"],"mappings":";AAMA,IAAY,IAAL,yBAAA,GAAA;QAEL,EAAA,EAAA,YAAA,OAAA,aAEA,EAAA,EAAA,OAAA,QAAA;AACF,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"supported-chains.js","names":[],"sources":["../../../src/core/chains/supported-chains.ts"],"sourcesContent":["/**\n * Chain IDs with built-in SYMMIO deployment configs.\n *\n * Use these values when calling SDK functions that require a chain ID.\n * The SDK ships a built-in production config for each supported chain.\n */\nexport enum SymmioSupportedChainId {\n /** Arbitrum One (chain ID 42161) */\n ARBITRUM = 42161,\n /** Base mainnet (chain ID 8453) */\n BASE = 8453,\n}\n"],"mappings":";AAMA,IAAY,IAAL,yBAAA,GAAA;QAEL,EAAA,EAAA,WAAA,SAAA,YAEA,EAAA,EAAA,OAAA,QAAA;AACF,EAAA,CAAA,CAAA"}
@@ -102,7 +102,7 @@ export interface SolverCapabilitiesConfig {
102
102
  export interface SymmioSolverConfig {
103
103
  /** Human-readable solver name */
104
104
  name: string;
105
- /** Solver's on-chain address (used as `partyB` in `sendQuoteWithAffiliateAndData`) */
105
+ /** Solver's on-chain address (used as `partyB` in `sendQuote`) */
106
106
  address: Address;
107
107
  /** Solver / hedger API base URL */
108
108
  url: string;
@@ -153,7 +153,7 @@ export interface SymmioTpSlConfig {
153
153
  url: string;
154
154
  /** Handler WebSocket URL — enigma-protocol notifications scoped by `appName`. */
155
155
  wsUrl: string;
156
- /** `App-Name` header value, e.g. `Hyper-EVM_COH-Low-Cap_Production`. */
156
+ /** `App-Name` header value, e.g. `Arbitrum_COH_Production`. */
157
157
  appName: string;
158
158
  /** COH wallet address that must be granted delegation to execute TP/SL orders. */
159
159
  cohWalletAddress: Address;
@@ -277,7 +277,7 @@ export interface SymmioMuonConfig {
277
277
  * — the pool catalogue, per-pool stats, a user's stake/rewards, and the
278
278
  * create/deposit/withdraw/claim actions. It is chain-level: one listing backend
279
279
  * is served per chain (a chain has at most one), with no solver or capability
280
- * involved. Present only where Pools is available (Enigma on HyperEVM); omitted
280
+ * involved. Present only where Pools is available (Enigma on Arbitrum); omitted
281
281
  * elsewhere.
282
282
  *
283
283
  * One deployment serves listings whose collateral was deposited on **several**
@@ -320,12 +320,26 @@ export interface SymmioInventoryConfig {
320
320
  */
321
321
  url: string;
322
322
  }
323
+ /**
324
+ * The perps-core contracts generation a chain's deployment runs.
325
+ *
326
+ * A **deployment fact, declared per chain** — it is not probed at runtime (the
327
+ * diamond exposes no version view). It drives the version-sensitive seams the
328
+ * SDK carries for serving mixed-generation chains from one release: which
329
+ * quote-send call the instant-open flow signs (`sendQuote` with solver-fee caps
330
+ * on `"0.8.6"`, the legacy `sendQuoteWithAffiliateAndData` on `"0.8.5"`), which
331
+ * selector the session-key delegation set includes, and which output shape the
332
+ * withdraw-request reads decode.
333
+ */
334
+ export type SymmioContractsVersion = "0.8.5" | "0.8.6";
323
335
  /**
324
336
  * Complete resolved configuration for a SYMMIO chain deployment.
325
337
  */
326
338
  export interface SymmioChainConfig {
327
339
  /** Chain ID */
328
340
  chainId: number;
341
+ /** Contracts generation deployed on this chain. See {@link SymmioContractsVersion}. */
342
+ contractsVersion: SymmioContractsVersion;
329
343
  /** Contract addresses */
330
344
  addresses: SymmioContractAddresses;
331
345
  /** Subgraph endpoints */
@@ -345,7 +359,7 @@ export interface SymmioChainConfig {
345
359
  muon: SymmioMuonConfig;
346
360
  /**
347
361
  * Optional Pools listing backend, served per chain. Set on chains where the
348
- * lowcap Pools flow is available (Enigma on HyperEVM); omitted elsewhere.
362
+ * lowcap Pools flow is available (Enigma on Arbitrum); omitted elsewhere.
349
363
  * Resolve it with `resolveListingService` / gate on `supportsListingService`.
350
364
  */
351
365
  listing?: SymmioListingConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/chains/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAEpC;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,mCAAmC;IACnC,aAAa,EAAE,OAAO,CAAC;IACvB,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SAAS,MAAM,EAAE,CAAC;CACzB;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;;;;;;OASG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;;;;OAOG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,OAAO,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,eAAe;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,uFAAuF;IACvF,gBAAgB,EAAE,sBAAsB,CAAC;IACzC,yBAAyB;IACzB,SAAS,EAAE,uBAAuB,CAAC;IACnC,yBAAyB;IACzB,SAAS,EAAE,kBAAkB,CAAC;IAC9B;;;;;OAKG;IACH,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAC,CAAC;IACvD,mFAAmF;IACnF,eAAe,EAAE,QAAQ,CAAC;IAC1B,kCAAkC;IAClC,YAAY,EAAE,wBAAwB,CAAC;IACvC,gCAAgC;IAChC,IAAI,EAAE,gBAAgB,CAAC;IACvB;;;;OAIG;IACH,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B;;;;OAIG;IACH,SAAS,CAAC,EAAE,qBAAqB,CAAC;CACnC"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../src/core/chains/types.ts"],"sourcesContent":["import type { Address } from \"viem\";\n\n/**\n * Contract addresses for a SYMMIO chain deployment.\n */\nexport interface SymmioContractAddresses {\n /** Main SYMMIO diamond contract */\n symmioAddress: Address;\n /** InstantLayer contract for instant actions */\n instantLayerAddress: Address;\n /** AccountLayer contract for subaccount management */\n accountLayerAddress: Address;\n /** Affiliates registry contract */\n affiliatesAddress: Address;\n /** Collateral token address (e.g. USDC) */\n collateralAddress: Address;\n /** Decimals of the collateral token */\n collateralDecimals: number;\n}\n\n/**\n * Subgraph endpoints for a SYMMIO chain deployment.\n */\nexport interface SymmioSubgraphUrls {\n /** Analytics subgraph for aggregated data (balance changes, quotes, history). */\n analytics: string;\n /** Events subgraph for raw on-chain events (e.g. `internalTransfers`). */\n events: string;\n}\n\n/**\n * Name of a configured subgraph endpoint (a key of {@link SymmioSubgraphUrls}).\n *\n * Used to pick which subgraph an action queries (`\"analytics\"` | `\"events\"`); the\n * union grows automatically as endpoints are added.\n */\nexport type SymmioSubgraphName = keyof SymmioSubgraphUrls;\n\n/**\n * A solver's id within a chain config — its registry key. Equal to its\n * {@link SymmioSolverKind}: each chain registers at most one solver per kind, so\n * the id *is* the kind (`\"enigma\" | \"rasa\"`). Closed for that reason.\n */\nexport type SolverId = SymmioSolverKind;\n\n/**\n * The solver kinds the SDK can actually serve — one generated client and\n * behavior set per entry. Single source of truth: {@link SymmioSolverKind} is\n * derived from this list, and `createConfig` validates every configured solver\n * against it (`assertSupportedSolver` in `solver-support.ts`). To add a kind,\n * append it here and ship its generated client + dispatch in the same change.\n *\n * @internal\n */\nexport const SUPPORTED_SOLVER_KINDS = [\"enigma\", \"rasa\"] as const;\n\n/**\n * Schema family a solver's REST API speaks — the discriminant used to select a\n * generated client. Closed (derived from {@link SUPPORTED_SOLVER_KINDS}): the\n * SDK ships one client per kind, so dispatch must be exhaustive.\n *\n * There is deliberately no version axis: each SDK release supports exactly one\n * API generation per kind. When a solver ships a new API generation, the SDK\n * regenerates that kind's client in a new release — consumers pick the\n * generation by pinning the SDK version, not through config.\n */\nexport type SymmioSolverKind = (typeof SUPPORTED_SOLVER_KINDS)[number];\n\n/**\n * Solver / hedger configuration for a SYMMIO chain deployment.\n *\n * In this SDK a \"solver\" is the same actor that fronts the lowcap hedger REST\n * API (`/instant_trade/instant_open`, `/contract-symbols`, …) and acts as\n * `partyB` on-chain. Its `url` is the API base URL, its `address` is partyB.\n *\n * Solvers live under {@link SymmioChainConfig.solvers}, keyed by\n * {@link SolverId} — the key is the solver's id, which is also its kind, so the\n * kind is not repeated here. `config.getSolver({ chainId, solverId })` returns a\n * {@link SymmioResolvedSolver} (this config plus its resolved `id`).\n */\n/**\n * Per-solver capability flags. Gate SDK flows and UI on these so a solver that\n * lacks a feature degrades gracefully instead of erroring. Unset flags default\n * to `false` — a solver must **declare** a capability to enable it.\n */\nexport interface SolverCapabilitiesConfig {\n /**\n * Whether the solver supports closing a whole market + side group of quotes in\n * one flow. Enigma (Virtual-Account isolation, one VA per market + side)\n * supports it; rasa (cross-margin) does not. Default `false`.\n */\n groupClose?: boolean;\n /**\n * Whether the solver supports LIMIT orders — placing a pending open at a\n * user-set price. Majors (rasa) support it; enigma (lowcap) does not. Default\n * `false`.\n */\n limitOrder?: boolean;\n /**\n * Whether this solver's markets are the lowcap **Pools** (listing service).\n * Purely declarative: the SDK's listing functions resolve the listing backend\n * **at chain level** ({@link SymmioChainConfig.listing}) and do **not** gate on\n * this flag. It exists so config can express which solvers do listing, readable\n * via `getSolverCapabilities`. Enigma (lowcap) declares it; rasa does not.\n * Default `false`.\n */\n listingService?: boolean;\n}\n\nexport interface SymmioSolverConfig {\n /** Human-readable solver name */\n name: string;\n /** Solver's on-chain address (used as `partyB` in `sendQuoteWithAffiliateAndData`) */\n address: Address;\n /** Solver / hedger API base URL */\n url: string;\n /** Optional TP/SL handler — solver supports conditional orders only when set. */\n tpsl?: SymmioTpSlConfig;\n /**\n * Price source for **this solver's** markets. Falls back to the chain's\n * {@link SymmioChainConfig.priceService} when omitted, so set it only where a\n * solver diverges from the chain default — do not duplicate the default.\n *\n * Needed because a chain may register several solvers that price differently:\n * a lowcap solver reads its own price service while a majors solver reads\n * Binance. A single chain-level value cannot be right for both.\n */\n priceService?: SymmioPriceServiceConfig;\n /**\n * Notifications endpoint for **this solver's** position/quote state stream and\n * history search. Required per solver: notifications are inherently\n * solver-specific — the enigma `channel` and the rasa position-state URL are\n * the solver's own — so there is no chain-level default to inherit.\n */\n notifications: SymmioNotificationsConfig;\n /**\n * Optional per-solver capability flags. Gate SDK flows and UI on these\n * ({@link SolverCapabilitiesConfig}); unset flags default to `false`.\n */\n capabilities?: SolverCapabilitiesConfig;\n}\n\n/**\n * A {@link SymmioSolverConfig} resolved from the registry, with its `id`\n * attached. The `id` is the solver's kind (`\"enigma\" | \"rasa\"`) and drives\n * per-kind dispatch inside solver actions. Returned by `config.getSolver`.\n */\nexport interface SymmioResolvedSolver extends SymmioSolverConfig {\n /** The resolved solver id — equal to its kind. */\n id: SolverId;\n}\n\n/**\n * TP/SL (Conditional Order Handler) configuration for a solver.\n *\n * The handler is an off-chain service that signs and executes\n * `requestToClosePosition` calls when the user's TP/SL trigger fires. To\n * authorize it, every user must grant a delegation to {@link cohWalletAddress}\n * for the standard instant-trade selectors.\n */\nexport interface SymmioTpSlConfig {\n /** Handler REST root URL (no `/api/v5/` suffix — orval-generated paths add it). */\n url: string;\n /** Handler WebSocket URL — enigma-protocol notifications scoped by `appName`. */\n wsUrl: string;\n /** `App-Name` header value, e.g. `Hyper-EVM_COH-Low-Cap_Production`. */\n appName: string;\n /** COH wallet address that must be granted delegation to execute TP/SL orders. */\n cohWalletAddress: Address;\n}\n\n/**\n * The price providers the SDK ships a client for. Closed: it drives exhaustive\n * dispatch in `getMarkPrices` / `watchPrices`, and `createConfig` validates every\n * configured price service against it (`assertSupportedPriceServiceType` in\n * `price-service-support.ts`). To add a provider, append it here and ship its\n * adapter + dispatch in the same change.\n *\n * @internal\n */\nexport const SUPPORTED_PRICE_SERVICE_TYPES = [\"enigma\", \"binance\"] as const;\n\n/**\n * Supported price-service providers.\n *\n * A **second, independent axis** from {@link SymmioSolverKind}: a Rasa solver is\n * priced off Binance today, and nothing in the type system ties the two\n * together. The provider is *derived* from `{ chainId, solverId }` via\n * `solver.priceService ?? chain.priceService` — never selected per call.\n */\nexport type SymmioPriceServiceType = (typeof SUPPORTED_PRICE_SERVICE_TYPES)[number];\n\n/**\n * Price-service configuration for a SYMMIO chain deployment.\n *\n * Both URLs stay **required, including for Binance**. Binance's endpoints are\n * public constants, but keeping them in config is the geo-restriction escape\n * hatch: an integrator whose users are in a blocked region repoints both at\n * their own proxy with no SDK change.\n */\nexport interface SymmioPriceServiceConfig {\n /** Price-service provider type. Selects which client the SDK uses. */\n type: SymmioPriceServiceType;\n /**\n * REST host root, no trailing slash — the client appends the provider's path.\n * `enigma`: `https://lowcap-price.enigma.bz` (+ `/api/v1/prices/names`).\n * `binance`: `https://fapi.binance.com` (+ `/fapi/v1/premiumIndex`).\n */\n url: string;\n /**\n * **Full** WebSocket endpoint — the exact URL the SDK dials, identically for\n * every provider, so nothing downstream needs to know which provider it holds.\n * `enigma`: `wss://lowcap-price.enigma.bz/ws`.\n * `binance`: `wss://fstream.binance.com/market/ws/!markPrice@arr@1s`.\n */\n wsUrl: string;\n}\n\n/**\n * Wire protocol a notifications endpoint speaks. Closed: it drives exhaustive\n * dispatch in `watchNotifications` / `parseNotificationFrame`; to add a\n * protocol, append it here and ship its subscribe + parse path in the same\n * change.\n *\n * - `enigma` — the lowcap solver endpoint (`…/ws/v1/subscribe`). Subscribes\n * with a `channel_patterns` frame and wraps each push as `{ data, address }`.\n * - `rasa` — the Rasa position-state endpoint (`…/ws/position-state-ws3`).\n * Subscribes with an `{ address: [...] }` frame (one socket can carry many\n * SubAccounts) and pushes bare notification frames, no envelope.\n */\nexport type SymmioNotificationsProtocol = \"enigma\" | \"rasa\";\n\n/**\n * Fields every notifications endpoint shares, regardless of wire protocol.\n */\ninterface SymmioNotificationsConfigBase {\n /** Notifications WebSocket URL (`wss://…`). */\n url: string;\n /**\n * Base URL of the notification REST service that backs `searchNotifications`\n * (`POST /api/v1/search`), e.g. `https://notification.rasa.capital/notification`.\n * Optional — when unset, `searchNotifications` requires a per-call `baseUrl`.\n */\n searchUrl?: string;\n}\n\n/**\n * Notifications endpoint speaking the `enigma` protocol (the lowcap\n * solver's channel-scoped stream).\n */\nexport interface SymmioEnigmaNotificationsConfig extends SymmioNotificationsConfigBase {\n /** Wire protocol the endpoint speaks. */\n protocol: \"enigma\";\n /** Channel / `app_name` the subscribe frame targets on this endpoint. */\n channel: string;\n}\n\n/**\n * Notifications endpoint speaking the `rasa` position-state protocol. No\n * channel — the subscribe frame is just the watched SubAccount addresses.\n */\nexport interface SymmioRasaNotificationsConfig extends SymmioNotificationsConfigBase {\n /** Wire protocol the endpoint speaks. */\n protocol: \"rasa\";\n}\n\n/**\n * Notifications WebSocket configuration for a SYMMIO chain deployment.\n *\n * The notifications endpoint streams position/quote state transitions (instant\n * open/close confirmations, fills, cancels, liquidations) for a SubAccount. It\n * is a push channel, not a REST endpoint — `url` is a `ws://`/`wss://` URL.\n * Discriminated on `protocol`; narrow to reach protocol-specific fields\n * (e.g. the enigma `channel`).\n */\nexport type SymmioNotificationsConfig = SymmioEnigmaNotificationsConfig | SymmioRasaNotificationsConfig;\n\n/**\n * Muon oracle configuration for a SYMMIO chain deployment.\n *\n * The Muon network signs off-chain values (e.g. a party's unrealized PnL) that\n * the contracts verify on-chain — `removeMargin` requires such a signature. The\n * gateway is a query-param REST endpoint with no OpenAPI spec; `urls` are tried\n * in order until one returns a successful attestation.\n *\n * @see {@link https://docs.symm.io/api-endpoints-and-deployments/muon-api}\n */\nexport interface SymmioMuonConfig {\n /** Muon oracle gateway base URLs, tried in order (fallback on failure). */\n urls: readonly string[];\n}\n\n/**\n * Pools **listing backend** configuration for a SYMMIO chain deployment.\n *\n * The listing backend is an auth'd REST service that owns the lowcap Pools flow\n * — the pool catalogue, per-pool stats, a user's stake/rewards, and the\n * create/deposit/withdraw/claim actions. It is chain-level: one listing backend\n * is served per chain (a chain has at most one), with no solver or capability\n * involved. Present only where Pools is available (Enigma on HyperEVM); omitted\n * elsewhere.\n *\n * One deployment serves listings whose collateral was deposited on **several**\n * chains — a catalogue row's `chainId` is the token's deposit chain, which is\n * not the chain the resulting market trades on.\n */\nexport interface SymmioListingConfig {\n /**\n * Listing backend **host root** — no version segment and no trailing slash\n * (e.g. `https://listing85.enigma.bz`, staging\n * `https://listing-staging.enigma.bz`).\n *\n * The generated client's own paths already begin with `/v2`, so a versioned\n * base URL here would request `/v2/v2/market/search` and 404. Point this at\n * staging with a `createConfig` override — there is no separate environment\n * axis.\n */\n url: string;\n}\n\n/**\n * Inventory-service configuration for a SYMMIO chain deployment.\n *\n * The inventory service is the custody backend behind the lowcap Pools: it holds\n * the per-market token and collateral inventory that backs trading, and reports\n * the system-wide TVL those balances add up to. It is a **separate vendor** from\n * both the solver and the {@link SymmioListingConfig} listing backend, with its\n * own deployment and its own OpenAPI spec.\n *\n * Chain-level and optional, like `listing`: present where lowcap Pools are\n * available, omitted elsewhere.\n */\nexport interface SymmioInventoryConfig {\n /**\n * Inventory service **host root** — no path segment and no trailing slash\n * (e.g. `https://inventory85.enigma.bz`, staging\n * `https://inventory-staging.enigma.bz`).\n *\n * The generated client's own paths already begin with `/api/v1`, so appending\n * `/api` here would request `/api/api/v1/...` and 404.\n */\n url: string;\n}\n\n/**\n * Complete resolved configuration for a SYMMIO chain deployment.\n */\nexport interface SymmioChainConfig {\n /** Chain ID */\n chainId: number;\n /** Contract addresses */\n addresses: SymmioContractAddresses;\n /** Subgraph endpoints */\n subgraphs: SymmioSubgraphUrls;\n /**\n * Solvers available on this chain, keyed by {@link SolverId} (which is the\n * solver's kind). A chain registers a subset of the kinds, so this is partial.\n * Resolve one with `config.getSolver({ chainId, solverId })`, which defaults to\n * {@link defaultSolverId} when `solverId` is omitted.\n */\n solvers: Partial<Record<SolverId, SymmioSolverConfig>>;\n /** Id of the solver an action targets on this chain when `solverId` is omitted. */\n defaultSolverId: SolverId;\n /** Price-service configuration */\n priceService: SymmioPriceServiceConfig;\n /** Muon oracle configuration */\n muon: SymmioMuonConfig;\n /**\n * Optional Pools listing backend, served per chain. Set on chains where the\n * lowcap Pools flow is available (Enigma on HyperEVM); omitted elsewhere.\n * Resolve it with `resolveListingService` / gate on `supportsListingService`.\n */\n listing?: SymmioListingConfig;\n /**\n * Optional inventory service — the custody backend behind lowcap Pools, and\n * the source of system-wide TVL. Set alongside {@link SymmioChainConfig.listing};\n * resolve it with `resolveInventoryService`.\n */\n inventory?: SymmioInventoryConfig;\n}\n"],"mappings":";AAsDA,IAAa,IAAyB,CAAC,UAAU,MAAM,GA8H1C,IAAgC,CAAC,UAAU,SAAS"}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../src/core/chains/types.ts"],"sourcesContent":["import type { Address } from \"viem\";\n\n/**\n * Contract addresses for a SYMMIO chain deployment.\n */\nexport interface SymmioContractAddresses {\n /** Main SYMMIO diamond contract */\n symmioAddress: Address;\n /** InstantLayer contract for instant actions */\n instantLayerAddress: Address;\n /** AccountLayer contract for subaccount management */\n accountLayerAddress: Address;\n /** Affiliates registry contract */\n affiliatesAddress: Address;\n /** Collateral token address (e.g. USDC) */\n collateralAddress: Address;\n /** Decimals of the collateral token */\n collateralDecimals: number;\n}\n\n/**\n * Subgraph endpoints for a SYMMIO chain deployment.\n */\nexport interface SymmioSubgraphUrls {\n /** Analytics subgraph for aggregated data (balance changes, quotes, history). */\n analytics: string;\n /** Events subgraph for raw on-chain events (e.g. `internalTransfers`). */\n events: string;\n}\n\n/**\n * Name of a configured subgraph endpoint (a key of {@link SymmioSubgraphUrls}).\n *\n * Used to pick which subgraph an action queries (`\"analytics\"` | `\"events\"`); the\n * union grows automatically as endpoints are added.\n */\nexport type SymmioSubgraphName = keyof SymmioSubgraphUrls;\n\n/**\n * A solver's id within a chain config — its registry key. Equal to its\n * {@link SymmioSolverKind}: each chain registers at most one solver per kind, so\n * the id *is* the kind (`\"enigma\" | \"rasa\"`). Closed for that reason.\n */\nexport type SolverId = SymmioSolverKind;\n\n/**\n * The solver kinds the SDK can actually serve — one generated client and\n * behavior set per entry. Single source of truth: {@link SymmioSolverKind} is\n * derived from this list, and `createConfig` validates every configured solver\n * against it (`assertSupportedSolver` in `solver-support.ts`). To add a kind,\n * append it here and ship its generated client + dispatch in the same change.\n *\n * @internal\n */\nexport const SUPPORTED_SOLVER_KINDS = [\"enigma\", \"rasa\"] as const;\n\n/**\n * Schema family a solver's REST API speaks — the discriminant used to select a\n * generated client. Closed (derived from {@link SUPPORTED_SOLVER_KINDS}): the\n * SDK ships one client per kind, so dispatch must be exhaustive.\n *\n * There is deliberately no version axis: each SDK release supports exactly one\n * API generation per kind. When a solver ships a new API generation, the SDK\n * regenerates that kind's client in a new release — consumers pick the\n * generation by pinning the SDK version, not through config.\n */\nexport type SymmioSolverKind = (typeof SUPPORTED_SOLVER_KINDS)[number];\n\n/**\n * Solver / hedger configuration for a SYMMIO chain deployment.\n *\n * In this SDK a \"solver\" is the same actor that fronts the lowcap hedger REST\n * API (`/instant_trade/instant_open`, `/contract-symbols`, …) and acts as\n * `partyB` on-chain. Its `url` is the API base URL, its `address` is partyB.\n *\n * Solvers live under {@link SymmioChainConfig.solvers}, keyed by\n * {@link SolverId} — the key is the solver's id, which is also its kind, so the\n * kind is not repeated here. `config.getSolver({ chainId, solverId })` returns a\n * {@link SymmioResolvedSolver} (this config plus its resolved `id`).\n */\n/**\n * Per-solver capability flags. Gate SDK flows and UI on these so a solver that\n * lacks a feature degrades gracefully instead of erroring. Unset flags default\n * to `false` — a solver must **declare** a capability to enable it.\n */\nexport interface SolverCapabilitiesConfig {\n /**\n * Whether the solver supports closing a whole market + side group of quotes in\n * one flow. Enigma (Virtual-Account isolation, one VA per market + side)\n * supports it; rasa (cross-margin) does not. Default `false`.\n */\n groupClose?: boolean;\n /**\n * Whether the solver supports LIMIT orders — placing a pending open at a\n * user-set price. Majors (rasa) support it; enigma (lowcap) does not. Default\n * `false`.\n */\n limitOrder?: boolean;\n /**\n * Whether this solver's markets are the lowcap **Pools** (listing service).\n * Purely declarative: the SDK's listing functions resolve the listing backend\n * **at chain level** ({@link SymmioChainConfig.listing}) and do **not** gate on\n * this flag. It exists so config can express which solvers do listing, readable\n * via `getSolverCapabilities`. Enigma (lowcap) declares it; rasa does not.\n * Default `false`.\n */\n listingService?: boolean;\n}\n\nexport interface SymmioSolverConfig {\n /** Human-readable solver name */\n name: string;\n /** Solver's on-chain address (used as `partyB` in `sendQuote`) */\n address: Address;\n /** Solver / hedger API base URL */\n url: string;\n /** Optional TP/SL handler — solver supports conditional orders only when set. */\n tpsl?: SymmioTpSlConfig;\n /**\n * Price source for **this solver's** markets. Falls back to the chain's\n * {@link SymmioChainConfig.priceService} when omitted, so set it only where a\n * solver diverges from the chain default — do not duplicate the default.\n *\n * Needed because a chain may register several solvers that price differently:\n * a lowcap solver reads its own price service while a majors solver reads\n * Binance. A single chain-level value cannot be right for both.\n */\n priceService?: SymmioPriceServiceConfig;\n /**\n * Notifications endpoint for **this solver's** position/quote state stream and\n * history search. Required per solver: notifications are inherently\n * solver-specific — the enigma `channel` and the rasa position-state URL are\n * the solver's own — so there is no chain-level default to inherit.\n */\n notifications: SymmioNotificationsConfig;\n /**\n * Optional per-solver capability flags. Gate SDK flows and UI on these\n * ({@link SolverCapabilitiesConfig}); unset flags default to `false`.\n */\n capabilities?: SolverCapabilitiesConfig;\n}\n\n/**\n * A {@link SymmioSolverConfig} resolved from the registry, with its `id`\n * attached. The `id` is the solver's kind (`\"enigma\" | \"rasa\"`) and drives\n * per-kind dispatch inside solver actions. Returned by `config.getSolver`.\n */\nexport interface SymmioResolvedSolver extends SymmioSolverConfig {\n /** The resolved solver id — equal to its kind. */\n id: SolverId;\n}\n\n/**\n * TP/SL (Conditional Order Handler) configuration for a solver.\n *\n * The handler is an off-chain service that signs and executes\n * `requestToClosePosition` calls when the user's TP/SL trigger fires. To\n * authorize it, every user must grant a delegation to {@link cohWalletAddress}\n * for the standard instant-trade selectors.\n */\nexport interface SymmioTpSlConfig {\n /** Handler REST root URL (no `/api/v5/` suffix — orval-generated paths add it). */\n url: string;\n /** Handler WebSocket URL — enigma-protocol notifications scoped by `appName`. */\n wsUrl: string;\n /** `App-Name` header value, e.g. `Arbitrum_COH_Production`. */\n appName: string;\n /** COH wallet address that must be granted delegation to execute TP/SL orders. */\n cohWalletAddress: Address;\n}\n\n/**\n * The price providers the SDK ships a client for. Closed: it drives exhaustive\n * dispatch in `getMarkPrices` / `watchPrices`, and `createConfig` validates every\n * configured price service against it (`assertSupportedPriceServiceType` in\n * `price-service-support.ts`). To add a provider, append it here and ship its\n * adapter + dispatch in the same change.\n *\n * @internal\n */\nexport const SUPPORTED_PRICE_SERVICE_TYPES = [\"enigma\", \"binance\"] as const;\n\n/**\n * Supported price-service providers.\n *\n * A **second, independent axis** from {@link SymmioSolverKind}: a Rasa solver is\n * priced off Binance today, and nothing in the type system ties the two\n * together. The provider is *derived* from `{ chainId, solverId }` via\n * `solver.priceService ?? chain.priceService` — never selected per call.\n */\nexport type SymmioPriceServiceType = (typeof SUPPORTED_PRICE_SERVICE_TYPES)[number];\n\n/**\n * Price-service configuration for a SYMMIO chain deployment.\n *\n * Both URLs stay **required, including for Binance**. Binance's endpoints are\n * public constants, but keeping them in config is the geo-restriction escape\n * hatch: an integrator whose users are in a blocked region repoints both at\n * their own proxy with no SDK change.\n */\nexport interface SymmioPriceServiceConfig {\n /** Price-service provider type. Selects which client the SDK uses. */\n type: SymmioPriceServiceType;\n /**\n * REST host root, no trailing slash — the client appends the provider's path.\n * `enigma`: `https://lowcap-price.enigma.bz` (+ `/api/v1/prices/names`).\n * `binance`: `https://fapi.binance.com` (+ `/fapi/v1/premiumIndex`).\n */\n url: string;\n /**\n * **Full** WebSocket endpoint — the exact URL the SDK dials, identically for\n * every provider, so nothing downstream needs to know which provider it holds.\n * `enigma`: `wss://lowcap-price.enigma.bz/ws`.\n * `binance`: `wss://fstream.binance.com/market/ws/!markPrice@arr@1s`.\n */\n wsUrl: string;\n}\n\n/**\n * Wire protocol a notifications endpoint speaks. Closed: it drives exhaustive\n * dispatch in `watchNotifications` / `parseNotificationFrame`; to add a\n * protocol, append it here and ship its subscribe + parse path in the same\n * change.\n *\n * - `enigma` — the lowcap solver endpoint (`…/ws/v1/subscribe`). Subscribes\n * with a `channel_patterns` frame and wraps each push as `{ data, address }`.\n * - `rasa` — the Rasa position-state endpoint (`…/ws/position-state-ws3`).\n * Subscribes with an `{ address: [...] }` frame (one socket can carry many\n * SubAccounts) and pushes bare notification frames, no envelope.\n */\nexport type SymmioNotificationsProtocol = \"enigma\" | \"rasa\";\n\n/**\n * Fields every notifications endpoint shares, regardless of wire protocol.\n */\ninterface SymmioNotificationsConfigBase {\n /** Notifications WebSocket URL (`wss://…`). */\n url: string;\n /**\n * Base URL of the notification REST service that backs `searchNotifications`\n * (`POST /api/v1/search`), e.g. `https://notification.rasa.capital/notification`.\n * Optional — when unset, `searchNotifications` requires a per-call `baseUrl`.\n */\n searchUrl?: string;\n}\n\n/**\n * Notifications endpoint speaking the `enigma` protocol (the lowcap\n * solver's channel-scoped stream).\n */\nexport interface SymmioEnigmaNotificationsConfig extends SymmioNotificationsConfigBase {\n /** Wire protocol the endpoint speaks. */\n protocol: \"enigma\";\n /** Channel / `app_name` the subscribe frame targets on this endpoint. */\n channel: string;\n}\n\n/**\n * Notifications endpoint speaking the `rasa` position-state protocol. No\n * channel — the subscribe frame is just the watched SubAccount addresses.\n */\nexport interface SymmioRasaNotificationsConfig extends SymmioNotificationsConfigBase {\n /** Wire protocol the endpoint speaks. */\n protocol: \"rasa\";\n}\n\n/**\n * Notifications WebSocket configuration for a SYMMIO chain deployment.\n *\n * The notifications endpoint streams position/quote state transitions (instant\n * open/close confirmations, fills, cancels, liquidations) for a SubAccount. It\n * is a push channel, not a REST endpoint — `url` is a `ws://`/`wss://` URL.\n * Discriminated on `protocol`; narrow to reach protocol-specific fields\n * (e.g. the enigma `channel`).\n */\nexport type SymmioNotificationsConfig = SymmioEnigmaNotificationsConfig | SymmioRasaNotificationsConfig;\n\n/**\n * Muon oracle configuration for a SYMMIO chain deployment.\n *\n * The Muon network signs off-chain values (e.g. a party's unrealized PnL) that\n * the contracts verify on-chain — `removeMargin` requires such a signature. The\n * gateway is a query-param REST endpoint with no OpenAPI spec; `urls` are tried\n * in order until one returns a successful attestation.\n *\n * @see {@link https://docs.symm.io/api-endpoints-and-deployments/muon-api}\n */\nexport interface SymmioMuonConfig {\n /** Muon oracle gateway base URLs, tried in order (fallback on failure). */\n urls: readonly string[];\n}\n\n/**\n * Pools **listing backend** configuration for a SYMMIO chain deployment.\n *\n * The listing backend is an auth'd REST service that owns the lowcap Pools flow\n * — the pool catalogue, per-pool stats, a user's stake/rewards, and the\n * create/deposit/withdraw/claim actions. It is chain-level: one listing backend\n * is served per chain (a chain has at most one), with no solver or capability\n * involved. Present only where Pools is available (Enigma on Arbitrum); omitted\n * elsewhere.\n *\n * One deployment serves listings whose collateral was deposited on **several**\n * chains — a catalogue row's `chainId` is the token's deposit chain, which is\n * not the chain the resulting market trades on.\n */\nexport interface SymmioListingConfig {\n /**\n * Listing backend **host root** — no version segment and no trailing slash\n * (e.g. `https://listing85.enigma.bz`, staging\n * `https://listing-staging.enigma.bz`).\n *\n * The generated client's own paths already begin with `/v2`, so a versioned\n * base URL here would request `/v2/v2/market/search` and 404. Point this at\n * staging with a `createConfig` override — there is no separate environment\n * axis.\n */\n url: string;\n}\n\n/**\n * Inventory-service configuration for a SYMMIO chain deployment.\n *\n * The inventory service is the custody backend behind the lowcap Pools: it holds\n * the per-market token and collateral inventory that backs trading, and reports\n * the system-wide TVL those balances add up to. It is a **separate vendor** from\n * both the solver and the {@link SymmioListingConfig} listing backend, with its\n * own deployment and its own OpenAPI spec.\n *\n * Chain-level and optional, like `listing`: present where lowcap Pools are\n * available, omitted elsewhere.\n */\nexport interface SymmioInventoryConfig {\n /**\n * Inventory service **host root** — no path segment and no trailing slash\n * (e.g. `https://inventory85.enigma.bz`, staging\n * `https://inventory-staging.enigma.bz`).\n *\n * The generated client's own paths already begin with `/api/v1`, so appending\n * `/api` here would request `/api/api/v1/...` and 404.\n */\n url: string;\n}\n\n/**\n * The perps-core contracts generation a chain's deployment runs.\n *\n * A **deployment fact, declared per chain** — it is not probed at runtime (the\n * diamond exposes no version view). It drives the version-sensitive seams the\n * SDK carries for serving mixed-generation chains from one release: which\n * quote-send call the instant-open flow signs (`sendQuote` with solver-fee caps\n * on `\"0.8.6\"`, the legacy `sendQuoteWithAffiliateAndData` on `\"0.8.5\"`), which\n * selector the session-key delegation set includes, and which output shape the\n * withdraw-request reads decode.\n */\nexport type SymmioContractsVersion = \"0.8.5\" | \"0.8.6\";\n\n/**\n * Complete resolved configuration for a SYMMIO chain deployment.\n */\nexport interface SymmioChainConfig {\n /** Chain ID */\n chainId: number;\n /** Contracts generation deployed on this chain. See {@link SymmioContractsVersion}. */\n contractsVersion: SymmioContractsVersion;\n /** Contract addresses */\n addresses: SymmioContractAddresses;\n /** Subgraph endpoints */\n subgraphs: SymmioSubgraphUrls;\n /**\n * Solvers available on this chain, keyed by {@link SolverId} (which is the\n * solver's kind). A chain registers a subset of the kinds, so this is partial.\n * Resolve one with `config.getSolver({ chainId, solverId })`, which defaults to\n * {@link defaultSolverId} when `solverId` is omitted.\n */\n solvers: Partial<Record<SolverId, SymmioSolverConfig>>;\n /** Id of the solver an action targets on this chain when `solverId` is omitted. */\n defaultSolverId: SolverId;\n /** Price-service configuration */\n priceService: SymmioPriceServiceConfig;\n /** Muon oracle configuration */\n muon: SymmioMuonConfig;\n /**\n * Optional Pools listing backend, served per chain. Set on chains where the\n * lowcap Pools flow is available (Enigma on Arbitrum); omitted elsewhere.\n * Resolve it with `resolveListingService` / gate on `supportsListingService`.\n */\n listing?: SymmioListingConfig;\n /**\n * Optional inventory service — the custody backend behind lowcap Pools, and\n * the source of system-wide TVL. Set alongside {@link SymmioChainConfig.listing};\n * resolve it with `resolveInventoryService`.\n */\n inventory?: SymmioInventoryConfig;\n}\n"],"mappings":";AAsDA,IAAa,IAAyB,CAAC,UAAU,MAAM,GA8H1C,IAAgC,CAAC,UAAU,SAAS"}
@@ -48,7 +48,7 @@ export interface CreateConfigParameters {
48
48
  * **Required.** Every supported chain must supply an
49
49
  * `addresses.affiliatesAddress` — your frontend's on-chain **affiliate**
50
50
  * (your identity in SYMMIO on that chain), attached to every quote
51
- * (`sendQuoteWithAffiliateAndData`) so the protocol knows who sourced the trade
51
+ * (`sendQuote`) so the protocol knows who sourced the trade
52
52
  * and routes your share of the trading fee to you. Affiliate addresses are per
53
53
  * chain: a registration on one chain is not valid on another. `createConfig`
54
54
  * throws `AFFILIATE_ADDRESS_REQUIRED` only when it is **missing**, so a trade
@@ -68,8 +68,8 @@ export interface CreateConfigParameters {
68
68
  * @example
69
69
  * ```ts
70
70
  * symmioConfig: {
71
- * [SymmioSupportedChainId.HYPER_EVM]: {
72
- * addresses: { affiliatesAddress: "0xYourHyperEvmAffiliate…" },
71
+ * [SymmioSupportedChainId.ARBITRUM]: {
72
+ * addresses: { affiliatesAddress: "0xYourArbitrumAffiliate…" },
73
73
  * // optional: subgraphs, solvers, priceService, notifications, muon
74
74
  * },
75
75
  * }
@@ -213,13 +213,13 @@ export interface ConfigParameter {
213
213
  * ```ts
214
214
  * import { createConfig } from "@symmio/trading-core";
215
215
  * import { createPublicClient, createWalletClient, http } from "viem";
216
- * import { hyperEvm } from "viem/chains";
216
+ * import { arbitrum } from "viem/chains";
217
217
  *
218
- * const publicClient = createPublicClient({ chain: hyperEvm, transport: http() });
219
- * const walletClient = createWalletClient({ account, chain: hyperEvm, transport: http() });
218
+ * const publicClient = createPublicClient({ chain: arbitrum, transport: http() });
219
+ * const walletClient = createWalletClient({ account, chain: arbitrum, transport: http() });
220
220
  *
221
221
  * const config = createConfig({
222
- * symmioConfig: { [SymmioSupportedChainId.HYPER_EVM]: { addresses: { affiliatesAddress: "0xYourHyperEvmAffiliate…" } } },
222
+ * symmioConfig: { [SymmioSupportedChainId.ARBITRUM]: { addresses: { affiliatesAddress: "0xYourArbitrumAffiliate…" } } },
223
223
  * getClient: () => publicClient,
224
224
  * getWalletClient: async () => walletClient,
225
225
  * });
@@ -1 +1 @@
1
- {"version":3,"file":"create-config.d.ts","sourceRoot":"","sources":["../../../src/core/config/create-config.ts"],"names":[],"mappings":"AAAA,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