@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
@@ -1,4 +1,4 @@
1
- import { symmioAbi as e } from "../../abi/v0.8.5/symmio.js";
1
+ import { symmioAbi as e } from "../../abi/v0.8.6/symmio.js";
2
2
  import { callAsSubAccount as t } from "../internal/call-as-sub-account.js";
3
3
  import { encodeFunctionData as n } from "viem";
4
4
  //#region src/symmio-contracts/symmio/actions/allocate.ts
@@ -1 +1 @@
1
- {"version":3,"file":"allocate.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/allocate.ts"],"sourcesContent":["import { encodeFunctionData, type Address, type Hash } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { Compute, WriteContractParameter } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.5/symmio\";\nimport { callAsSubAccount } from \"../internal/call-as-sub-account\";\n\n/**\n * Parameters for {@link allocate}.\n */\nexport type AllocateParameters = Compute<\n WriteContractParameter & {\n /**\n * The subaccount to allocate into. The call is routed through the\n * AccountLayer `_call` proxy; the connected wallet must be its on-chain `owner`.\n */\n account: Address;\n /**\n * Amount to move from the available balance into the allocated balance, in\n * **18 decimals** (not the collateral token's decimals). Capped by the\n * per-user balance limit.\n */\n amount: bigint;\n }\n>;\n\n/** Return type of {@link allocate}: the submitted transaction hash. */\nexport type AllocateReturnType = Hash;\n\n/**\n * Move collateral from a subaccount's **available balance** into its **allocated\n * (tradeable) balance** on the SYMMIO core.\n *\n * Allocated balance is what Party A actually trades against. The subaccount's\n * available balance is debited and its allocated balance credited, in 18-decimal\n * units, capped by the per-user balance limit. The subaccount must not be\n * suspended or currently in liquidation as Party A.\n *\n * Encodes the SYMMIO core `allocate(amount)` call and routes it through\n * `AccountLayer._call(account, …)` so the core attributes it to the subaccount.\n *\n * Dry-runs the call with {@link simulateAllocate} first unless `simulateBeforeWrite`\n * is `false` (per-call, falling back to the config default).\n *\n * @param config - The SDK config (must have a `getWalletClient` resolver).\n * @param parameters - Subaccount, amount (18 decimals), optional chain id.\n * @returns The submitted transaction hash. The caller waits on the receipt.\n * @throws {SymmError} when the chain is unsupported or no wallet is available.\n * @throws Viem's write errors (`ContractFunctionExecutionError`, ...).\n *\n * @example\n * ```ts\n * const hash = await allocate(config, { account: \"0xsub…\", amount: 1_000000000000000000n });\n * ```\n */\nexport async function allocate(config: Config, parameters: AllocateParameters): Promise<AllocateReturnType> {\n const { chainId, account, amount } = parameters;\n\n const data = encodeFunctionData({\n abi: symmioAbi,\n functionName: \"allocate\",\n args: [amount],\n });\n\n return callAsSubAccount(config, {\n account,\n data,\n chainId,\n from: parameters.from,\n simulateBeforeWrite: parameters.simulateBeforeWrite,\n });\n}\n"],"mappings":";;;;AAsDA,eAAsB,EAAS,GAAgB,GAA6D;CAC1G,IAAM,EAAE,YAAS,YAAS,cAAW;CAQrC,OAAO,EAAiB,GAAQ;EAC9B;EACA,MARW,EAAmB;GAC9B,KAAK;GACL,cAAc;GACd,MAAM,CAAC,CAAM;EACf,CAIE;EACA;EACA,MAAM,EAAW;EACjB,qBAAqB,EAAW;CAClC,CAAC;AACH"}
1
+ {"version":3,"file":"allocate.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/allocate.ts"],"sourcesContent":["import { encodeFunctionData, type Address, type Hash } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { Compute, WriteContractParameter } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.6/symmio\";\nimport { callAsSubAccount } from \"../internal/call-as-sub-account\";\n\n/**\n * Parameters for {@link allocate}.\n */\nexport type AllocateParameters = Compute<\n WriteContractParameter & {\n /**\n * The subaccount to allocate into. The call is routed through the\n * AccountLayer `_call` proxy; the connected wallet must be its on-chain `owner`.\n */\n account: Address;\n /**\n * Amount to move from the available balance into the allocated balance, in\n * **18 decimals** (not the collateral token's decimals). Capped by the\n * per-user balance limit.\n */\n amount: bigint;\n }\n>;\n\n/** Return type of {@link allocate}: the submitted transaction hash. */\nexport type AllocateReturnType = Hash;\n\n/**\n * Move collateral from a subaccount's **available balance** into its **allocated\n * (tradeable) balance** on the SYMMIO core.\n *\n * Allocated balance is what Party A actually trades against. The subaccount's\n * available balance is debited and its allocated balance credited, in 18-decimal\n * units, capped by the per-user balance limit. The subaccount must not be\n * suspended or currently in liquidation as Party A.\n *\n * Encodes the SYMMIO core `allocate(amount)` call and routes it through\n * `AccountLayer._call(account, …)` so the core attributes it to the subaccount.\n *\n * Dry-runs the call with {@link simulateAllocate} first unless `simulateBeforeWrite`\n * is `false` (per-call, falling back to the config default).\n *\n * @param config - The SDK config (must have a `getWalletClient` resolver).\n * @param parameters - Subaccount, amount (18 decimals), optional chain id.\n * @returns The submitted transaction hash. The caller waits on the receipt.\n * @throws {SymmError} when the chain is unsupported or no wallet is available.\n * @throws Viem's write errors (`ContractFunctionExecutionError`, ...).\n *\n * @example\n * ```ts\n * const hash = await allocate(config, { account: \"0xsub…\", amount: 1_000000000000000000n });\n * ```\n */\nexport async function allocate(config: Config, parameters: AllocateParameters): Promise<AllocateReturnType> {\n const { chainId, account, amount } = parameters;\n\n const data = encodeFunctionData({\n abi: symmioAbi,\n functionName: \"allocate\",\n args: [amount],\n });\n\n return callAsSubAccount(config, {\n account,\n data,\n chainId,\n from: parameters.from,\n simulateBeforeWrite: parameters.simulateBeforeWrite,\n });\n}\n"],"mappings":";;;;AAsDA,eAAsB,EAAS,GAAgB,GAA6D;CAC1G,IAAM,EAAE,YAAS,YAAS,cAAW;CAQrC,OAAO,EAAiB,GAAQ;EAC9B;EACA,MARW,EAAmB;GAC9B,KAAK;GACL,cAAc;GACd,MAAM,CAAC,CAAM;EACf,CAIE;EACA;EACA,MAAM,EAAW;EACjB,qBAAqB,EAAW;CAClC,CAAC;AACH"}
@@ -82,7 +82,7 @@ export type DeallocateAndInitiateWithdrawReturnType = Hash;
82
82
  *
83
83
  * @example
84
84
  * ```ts
85
- * const part = createClassicWithdrawPart({ id: 0n, amount: 1_000000n, receiver: "0xabc…", chainId: 999n });
85
+ * const part = createClassicWithdrawPart({ id: 0n, amount: 1_000000n, receiver: "0xabc…", chainId: 42161n });
86
86
  * // upnlSig fetched automatically:
87
87
  * const hash = await deallocateAndInitiateWithdraw(config, {
88
88
  * account: "0xsub…",
@@ -1,4 +1,4 @@
1
- import { symmioAbi as e } from "../../abi/v0.8.5/symmio.js";
1
+ import { symmioAbi as e } from "../../abi/v0.8.6/symmio.js";
2
2
  import { callAsSubAccount as t } from "../internal/call-as-sub-account.js";
3
3
  import { getDeallocateUpnlSig as n } from "../../../muon/deallocate-upnl-sig/get-deallocate-upnl-sig.js";
4
4
  import { encodeFunctionData as r } from "viem";
@@ -1 +1 @@
1
- {"version":3,"file":"deallocate-and-initiate-withdraw.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/deallocate-and-initiate-withdraw.ts"],"sourcesContent":["import { encodeFunctionData, type Address, type Hash, type Hex } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport { getDeallocateUpnlSig } from \"../../../muon/deallocate-upnl-sig/get-deallocate-upnl-sig\";\nimport type { Compute, WriteContractParameter } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.5/symmio\";\nimport type { SingleUpnlSig } from \"../../account-layer/types\";\nimport { callAsSubAccount } from \"../internal/call-as-sub-account\";\nimport type { WithdrawReceiverPart } from \"../types\";\n\n/**\n * Parameters for {@link deallocateAndInitiateWithdraw}.\n */\nexport type DeallocateAndInitiateWithdrawParameters = Compute<\n WriteContractParameter & {\n /**\n * The subaccount to deallocate from and initiate the withdrawal for. Both\n * inner calls are routed through the AccountLayer `_call` proxy so the core\n * attributes them to this subaccount; the connected wallet must be its\n * on-chain `owner`.\n */\n account: Address;\n /**\n * Amount to move from the allocated balance back into the available balance,\n * in **18 decimals** (not the collateral token's decimals). This is the\n * `deallocate` leg; the freed collateral is what the withdrawal then requests.\n */\n amount: bigint;\n /**\n * The receiver parts the withdrawal is split into. A plain same-chain\n * withdrawal is a single part with both provider fields set to the zero\n * address — see `createClassicWithdrawPart`.\n */\n parts: readonly WithdrawReceiverPart[];\n /**\n * Opt into the cooldown speed-up flow. Only effective for speed-up-eligible\n * users; ignored otherwise.\n * @default false\n */\n speedUp?: boolean;\n /**\n * Opaque provider data forwarded to express/virtual providers (e.g. a signed\n * option). Pass `0x` for a classic withdrawal.\n * @default \"0x\"\n */\n providerData?: Hex;\n /**\n * A fresh Muon uPnL (`uPnl_A`) attestation for `account`, required by the\n * `deallocate` leg to prove the subaccount stays solvent. It is timestamped\n * and short-lived, so **omit it** to have the action fetch a fresh one (via\n * {@link getDeallocateUpnlSig}) immediately before submitting; pass one only\n * to reuse a signature you already fetched.\n */\n upnlSig?: SingleUpnlSig;\n }\n>;\n\n/** Return type of {@link deallocateAndInitiateWithdraw}: the submitted transaction hash. */\nexport type DeallocateAndInitiateWithdrawReturnType = Hash;\n\n/**\n * Batch a subaccount's **deallocate** and **initiate-withdraw** into a single\n * atomic transaction — the cross-margin / Base withdraw path.\n *\n * Encodes the SYMMIO core `deallocate(amount, upnlSig)` and\n * `initiateWithdraw(parts, speedUp, data)` calls and routes **both** through one\n * `AccountLayer._call(account, [deallocateData, withdrawData])`. `_call` runs the\n * calldatas in order in a single transaction and reverts the whole transaction if\n * any inner call reverts, so the two legs are all-or-nothing: the caller never\n * ends up with a deallocation that failed to produce its withdraw request.\n *\n * **Order matters.** `deallocate` (allocated → available) is encoded first so the\n * freed collateral exists in the available balance before `initiateWithdraw`\n * requests it.\n *\n * @remarks\n * The `deallocate` leg is subject to the on-chain **deallocate debounce** and\n * requires a fresh Muon `upnlSig`; a stale attestation or too-soon a call reverts\n * the whole batch. Dry-runs the batched `_call` with the pre-flight simulation\n * first unless `simulateBeforeWrite` is `false` (per-call, falling back to the\n * config default). For separate control over the two legs, call {@link deallocate}\n * and {@link initiateWithdraw} individually.\n *\n * @param config - The SDK config (must have a `getWalletClient` resolver).\n * @param parameters - Subaccount, amount (18 decimals), receiver parts, optional\n * speed-up / provider data, optional Muon `upnlSig` (fetched automatically via\n * {@link getDeallocateUpnlSig} when omitted), optional chain id.\n * @returns The submitted transaction hash. The caller waits on the receipt.\n * @throws {SymmError} when the chain is unsupported or no wallet is available.\n * @throws Viem's write errors (`ContractFunctionExecutionError`, ...).\n *\n * @example\n * ```ts\n * const part = createClassicWithdrawPart({ id: 0n, amount: 1_000000n, receiver: \"0xabc…\", chainId: 999n });\n * // upnlSig fetched automatically:\n * const hash = await deallocateAndInitiateWithdraw(config, {\n * account: \"0xsub…\",\n * amount: 1_000000000000000000n,\n * parts: [part],\n * });\n * ```\n */\nexport async function deallocateAndInitiateWithdraw(\n config: Config,\n parameters: DeallocateAndInitiateWithdrawParameters,\n): Promise<DeallocateAndInitiateWithdrawReturnType> {\n const { chainId, account, amount, parts, speedUp = false, providerData = \"0x\", from } = parameters;\n\n const upnlSig = parameters.upnlSig ?? (await getDeallocateUpnlSig(config, { virtualAccount: account, chainId }));\n\n const deallocateData = encodeFunctionData({\n abi: symmioAbi,\n functionName: \"deallocate\",\n args: [amount, upnlSig],\n });\n\n const withdrawData = encodeFunctionData({\n abi: symmioAbi,\n functionName: \"initiateWithdraw\",\n args: [parts, speedUp, providerData],\n });\n\n // Order matters: deallocate (allocated → available) MUST precede initiateWithdraw.\n return callAsSubAccount(config, {\n account,\n data: [deallocateData, withdrawData],\n chainId,\n from,\n simulateBeforeWrite: parameters.simulateBeforeWrite,\n });\n}\n"],"mappings":";;;;;AAqGA,eAAsB,EACpB,GACA,GACkD;CAClD,IAAM,EAAE,YAAS,YAAS,WAAQ,UAAO,aAAU,IAAO,kBAAe,MAAM,YAAS;CAiBxF,OAAO,EAAiB,GAAQ;EAC9B;EACA,MAAM,CAfe,EAAmB;GACxC,KAAK;GACL,cAAc;GACd,MAAM,CAAC,GALO,EAAW,WAAY,MAAM,EAAqB,GAAQ;IAAE,gBAAgB;IAAS;GAAQ,CAAC,CAKtF;EACxB,CAWS,GATY,EAAmB;GACtC,KAAK;GACL,cAAc;GACd,MAAM;IAAC;IAAO;IAAS;GAAY;EACrC,CAKyB,CAAY;EACnC;EACA;EACA,qBAAqB,EAAW;CAClC,CAAC;AACH"}
1
+ {"version":3,"file":"deallocate-and-initiate-withdraw.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/deallocate-and-initiate-withdraw.ts"],"sourcesContent":["import { encodeFunctionData, type Address, type Hash, type Hex } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport { getDeallocateUpnlSig } from \"../../../muon/deallocate-upnl-sig/get-deallocate-upnl-sig\";\nimport type { Compute, WriteContractParameter } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.6/symmio\";\nimport type { SingleUpnlSig } from \"../../account-layer/types\";\nimport { callAsSubAccount } from \"../internal/call-as-sub-account\";\nimport type { WithdrawReceiverPart } from \"../types\";\n\n/**\n * Parameters for {@link deallocateAndInitiateWithdraw}.\n */\nexport type DeallocateAndInitiateWithdrawParameters = Compute<\n WriteContractParameter & {\n /**\n * The subaccount to deallocate from and initiate the withdrawal for. Both\n * inner calls are routed through the AccountLayer `_call` proxy so the core\n * attributes them to this subaccount; the connected wallet must be its\n * on-chain `owner`.\n */\n account: Address;\n /**\n * Amount to move from the allocated balance back into the available balance,\n * in **18 decimals** (not the collateral token's decimals). This is the\n * `deallocate` leg; the freed collateral is what the withdrawal then requests.\n */\n amount: bigint;\n /**\n * The receiver parts the withdrawal is split into. A plain same-chain\n * withdrawal is a single part with both provider fields set to the zero\n * address — see `createClassicWithdrawPart`.\n */\n parts: readonly WithdrawReceiverPart[];\n /**\n * Opt into the cooldown speed-up flow. Only effective for speed-up-eligible\n * users; ignored otherwise.\n * @default false\n */\n speedUp?: boolean;\n /**\n * Opaque provider data forwarded to express/virtual providers (e.g. a signed\n * option). Pass `0x` for a classic withdrawal.\n * @default \"0x\"\n */\n providerData?: Hex;\n /**\n * A fresh Muon uPnL (`uPnl_A`) attestation for `account`, required by the\n * `deallocate` leg to prove the subaccount stays solvent. It is timestamped\n * and short-lived, so **omit it** to have the action fetch a fresh one (via\n * {@link getDeallocateUpnlSig}) immediately before submitting; pass one only\n * to reuse a signature you already fetched.\n */\n upnlSig?: SingleUpnlSig;\n }\n>;\n\n/** Return type of {@link deallocateAndInitiateWithdraw}: the submitted transaction hash. */\nexport type DeallocateAndInitiateWithdrawReturnType = Hash;\n\n/**\n * Batch a subaccount's **deallocate** and **initiate-withdraw** into a single\n * atomic transaction — the cross-margin / Base withdraw path.\n *\n * Encodes the SYMMIO core `deallocate(amount, upnlSig)` and\n * `initiateWithdraw(parts, speedUp, data)` calls and routes **both** through one\n * `AccountLayer._call(account, [deallocateData, withdrawData])`. `_call` runs the\n * calldatas in order in a single transaction and reverts the whole transaction if\n * any inner call reverts, so the two legs are all-or-nothing: the caller never\n * ends up with a deallocation that failed to produce its withdraw request.\n *\n * **Order matters.** `deallocate` (allocated → available) is encoded first so the\n * freed collateral exists in the available balance before `initiateWithdraw`\n * requests it.\n *\n * @remarks\n * The `deallocate` leg is subject to the on-chain **deallocate debounce** and\n * requires a fresh Muon `upnlSig`; a stale attestation or too-soon a call reverts\n * the whole batch. Dry-runs the batched `_call` with the pre-flight simulation\n * first unless `simulateBeforeWrite` is `false` (per-call, falling back to the\n * config default). For separate control over the two legs, call {@link deallocate}\n * and {@link initiateWithdraw} individually.\n *\n * @param config - The SDK config (must have a `getWalletClient` resolver).\n * @param parameters - Subaccount, amount (18 decimals), receiver parts, optional\n * speed-up / provider data, optional Muon `upnlSig` (fetched automatically via\n * {@link getDeallocateUpnlSig} when omitted), optional chain id.\n * @returns The submitted transaction hash. The caller waits on the receipt.\n * @throws {SymmError} when the chain is unsupported or no wallet is available.\n * @throws Viem's write errors (`ContractFunctionExecutionError`, ...).\n *\n * @example\n * ```ts\n * const part = createClassicWithdrawPart({ id: 0n, amount: 1_000000n, receiver: \"0xabc…\", chainId: 42161n });\n * // upnlSig fetched automatically:\n * const hash = await deallocateAndInitiateWithdraw(config, {\n * account: \"0xsub…\",\n * amount: 1_000000000000000000n,\n * parts: [part],\n * });\n * ```\n */\nexport async function deallocateAndInitiateWithdraw(\n config: Config,\n parameters: DeallocateAndInitiateWithdrawParameters,\n): Promise<DeallocateAndInitiateWithdrawReturnType> {\n const { chainId, account, amount, parts, speedUp = false, providerData = \"0x\", from } = parameters;\n\n const upnlSig = parameters.upnlSig ?? (await getDeallocateUpnlSig(config, { virtualAccount: account, chainId }));\n\n const deallocateData = encodeFunctionData({\n abi: symmioAbi,\n functionName: \"deallocate\",\n args: [amount, upnlSig],\n });\n\n const withdrawData = encodeFunctionData({\n abi: symmioAbi,\n functionName: \"initiateWithdraw\",\n args: [parts, speedUp, providerData],\n });\n\n // Order matters: deallocate (allocated → available) MUST precede initiateWithdraw.\n return callAsSubAccount(config, {\n account,\n data: [deallocateData, withdrawData],\n chainId,\n from,\n simulateBeforeWrite: parameters.simulateBeforeWrite,\n });\n}\n"],"mappings":";;;;;AAqGA,eAAsB,EACpB,GACA,GACkD;CAClD,IAAM,EAAE,YAAS,YAAS,WAAQ,UAAO,aAAU,IAAO,kBAAe,MAAM,YAAS;CAiBxF,OAAO,EAAiB,GAAQ;EAC9B;EACA,MAAM,CAfe,EAAmB;GACxC,KAAK;GACL,cAAc;GACd,MAAM,CAAC,GALO,EAAW,WAAY,MAAM,EAAqB,GAAQ;IAAE,gBAAgB;IAAS;GAAQ,CAAC,CAKtF;EACxB,CAWS,GATY,EAAmB;GACtC,KAAK;GACL,cAAc;GACd,MAAM;IAAC;IAAO;IAAS;GAAY;EACrC,CAKyB,CAAY;EACnC;EACA;EACA,qBAAqB,EAAW;CAClC,CAAC;AACH"}
@@ -1,4 +1,4 @@
1
- import { symmioAbi as e } from "../../abi/v0.8.5/symmio.js";
1
+ import { symmioAbi as e } from "../../abi/v0.8.6/symmio.js";
2
2
  import { callAsSubAccount as t } from "../internal/call-as-sub-account.js";
3
3
  import { getDeallocateUpnlSig as n } from "../../../muon/deallocate-upnl-sig/get-deallocate-upnl-sig.js";
4
4
  import { encodeFunctionData as r } from "viem";
@@ -1 +1 @@
1
- {"version":3,"file":"deallocate.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/deallocate.ts"],"sourcesContent":["import { encodeFunctionData, type Address, type Hash } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport { getDeallocateUpnlSig } from \"../../../muon/deallocate-upnl-sig/get-deallocate-upnl-sig\";\nimport type { Compute, WriteContractParameter } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.5/symmio\";\nimport type { SingleUpnlSig } from \"../../account-layer/types\";\nimport { callAsSubAccount } from \"../internal/call-as-sub-account\";\n\n/**\n * Parameters for {@link deallocate}.\n */\nexport type DeallocateParameters = Compute<\n WriteContractParameter & {\n /**\n * The subaccount to deallocate from. The call is routed through the\n * AccountLayer `_call` proxy; the connected wallet must be its on-chain `owner`.\n */\n account: Address;\n /**\n * Amount to move from the allocated balance back into the available balance,\n * in **18 decimals** (not the collateral token's decimals).\n */\n amount: bigint;\n /**\n * A fresh Muon uPnL (`uPnl_A`) attestation for `account`. The contract\n * verifies it to prove the subaccount stays solvent after the deallocation.\n * It is timestamped and short-lived, so **omit it** to have the action fetch a\n * fresh one (via {@link getDeallocateUpnlSig}) immediately before submitting;\n * pass one only to reuse a signature you already fetched.\n */\n upnlSig?: SingleUpnlSig;\n }\n>;\n\n/** Return type of {@link deallocate}: the submitted transaction hash. */\nexport type DeallocateReturnType = Hash;\n\n/**\n * Move collateral from a subaccount's **allocated (tradeable) balance** back into\n * its **available balance** on the SYMMIO core.\n *\n * The reverse of {@link allocate}: the subaccount's allocated balance is debited\n * and its available balance credited, in 18-decimal units, after the contract\n * verifies the Muon uPnL signature keeps the subaccount solvent. The freed\n * collateral can then be withdrawn (subject to the separate withdraw cooldown).\n *\n * Encodes the SYMMIO core `deallocate(amount, upnlSig)` call and routes it through\n * `AccountLayer._call(account, …)` so the core attributes it to the subaccount.\n *\n * @remarks\n * Subject to the on-chain **deallocate debounce**: calling too soon after a prior\n * deallocate reverts (\"Too many deallocate in a short window\"). This is distinct\n * from the withdraw cooldown that later gates moving the freed collateral to the\n * wallet. The `upnlSig` must be freshly fetched — a stale attestation reverts.\n *\n * Dry-runs the call with {@link simulateDeallocate} first unless `simulateBeforeWrite`\n * is `false` (per-call, falling back to the config default).\n *\n * @param config - The SDK config (must have a `getWalletClient` resolver).\n * @param parameters - Subaccount, amount (18 decimals), optional Muon `upnlSig`\n * (fetched automatically via {@link getDeallocateUpnlSig} when omitted), optional chain id.\n * @returns The submitted transaction hash. The caller waits on the receipt.\n * @throws {SymmError} when the chain is unsupported or no wallet is available.\n * @throws Viem's write errors (`ContractFunctionExecutionError`, ...).\n *\n * @example\n * ```ts\n * // upnlSig fetched automatically:\n * const hash = await deallocate(config, { account: \"0xsub…\", amount: 1_000000000000000000n });\n * // or reuse a pre-fetched signature:\n * const upnlSig = await getDeallocateUpnlSig(config, { virtualAccount: \"0xsub…\" });\n * await deallocate(config, { account: \"0xsub…\", amount: 1_000000000000000000n, upnlSig });\n * ```\n */\nexport async function deallocate(config: Config, parameters: DeallocateParameters): Promise<DeallocateReturnType> {\n const { chainId, account, amount } = parameters;\n\n const upnlSig =\n parameters.upnlSig ?? (await getDeallocateUpnlSig(config, { virtualAccount: parameters.account, chainId }));\n\n const data = encodeFunctionData({\n abi: symmioAbi,\n functionName: \"deallocate\",\n args: [amount, upnlSig],\n });\n\n return callAsSubAccount(config, {\n account,\n data,\n chainId,\n from: parameters.from,\n simulateBeforeWrite: parameters.simulateBeforeWrite,\n });\n}\n"],"mappings":";;;;;AA0EA,eAAsB,EAAW,GAAgB,GAAiE;CAChH,IAAM,EAAE,YAAS,YAAS,cAAW;CAWrC,OAAO,EAAiB,GAAQ;EAC9B;EACA,MARW,EAAmB;GAC9B,KAAK;GACL,cAAc;GACd,MAAM,CAAC,GALP,EAAW,WAAY,MAAM,EAAqB,GAAQ;IAAE,gBAAgB,EAAW;IAAS;GAAQ,CAAC,CAKnF;EACxB,CAIE;EACA;EACA,MAAM,EAAW;EACjB,qBAAqB,EAAW;CAClC,CAAC;AACH"}
1
+ {"version":3,"file":"deallocate.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/deallocate.ts"],"sourcesContent":["import { encodeFunctionData, type Address, type Hash } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport { getDeallocateUpnlSig } from \"../../../muon/deallocate-upnl-sig/get-deallocate-upnl-sig\";\nimport type { Compute, WriteContractParameter } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.6/symmio\";\nimport type { SingleUpnlSig } from \"../../account-layer/types\";\nimport { callAsSubAccount } from \"../internal/call-as-sub-account\";\n\n/**\n * Parameters for {@link deallocate}.\n */\nexport type DeallocateParameters = Compute<\n WriteContractParameter & {\n /**\n * The subaccount to deallocate from. The call is routed through the\n * AccountLayer `_call` proxy; the connected wallet must be its on-chain `owner`.\n */\n account: Address;\n /**\n * Amount to move from the allocated balance back into the available balance,\n * in **18 decimals** (not the collateral token's decimals).\n */\n amount: bigint;\n /**\n * A fresh Muon uPnL (`uPnl_A`) attestation for `account`. The contract\n * verifies it to prove the subaccount stays solvent after the deallocation.\n * It is timestamped and short-lived, so **omit it** to have the action fetch a\n * fresh one (via {@link getDeallocateUpnlSig}) immediately before submitting;\n * pass one only to reuse a signature you already fetched.\n */\n upnlSig?: SingleUpnlSig;\n }\n>;\n\n/** Return type of {@link deallocate}: the submitted transaction hash. */\nexport type DeallocateReturnType = Hash;\n\n/**\n * Move collateral from a subaccount's **allocated (tradeable) balance** back into\n * its **available balance** on the SYMMIO core.\n *\n * The reverse of {@link allocate}: the subaccount's allocated balance is debited\n * and its available balance credited, in 18-decimal units, after the contract\n * verifies the Muon uPnL signature keeps the subaccount solvent. The freed\n * collateral can then be withdrawn (subject to the separate withdraw cooldown).\n *\n * Encodes the SYMMIO core `deallocate(amount, upnlSig)` call and routes it through\n * `AccountLayer._call(account, …)` so the core attributes it to the subaccount.\n *\n * @remarks\n * Subject to the on-chain **deallocate debounce**: calling too soon after a prior\n * deallocate reverts (\"Too many deallocate in a short window\"). This is distinct\n * from the withdraw cooldown that later gates moving the freed collateral to the\n * wallet. The `upnlSig` must be freshly fetched — a stale attestation reverts.\n *\n * Dry-runs the call with {@link simulateDeallocate} first unless `simulateBeforeWrite`\n * is `false` (per-call, falling back to the config default).\n *\n * @param config - The SDK config (must have a `getWalletClient` resolver).\n * @param parameters - Subaccount, amount (18 decimals), optional Muon `upnlSig`\n * (fetched automatically via {@link getDeallocateUpnlSig} when omitted), optional chain id.\n * @returns The submitted transaction hash. The caller waits on the receipt.\n * @throws {SymmError} when the chain is unsupported or no wallet is available.\n * @throws Viem's write errors (`ContractFunctionExecutionError`, ...).\n *\n * @example\n * ```ts\n * // upnlSig fetched automatically:\n * const hash = await deallocate(config, { account: \"0xsub…\", amount: 1_000000000000000000n });\n * // or reuse a pre-fetched signature:\n * const upnlSig = await getDeallocateUpnlSig(config, { virtualAccount: \"0xsub…\" });\n * await deallocate(config, { account: \"0xsub…\", amount: 1_000000000000000000n, upnlSig });\n * ```\n */\nexport async function deallocate(config: Config, parameters: DeallocateParameters): Promise<DeallocateReturnType> {\n const { chainId, account, amount } = parameters;\n\n const upnlSig =\n parameters.upnlSig ?? (await getDeallocateUpnlSig(config, { virtualAccount: parameters.account, chainId }));\n\n const data = encodeFunctionData({\n abi: symmioAbi,\n functionName: \"deallocate\",\n args: [amount, upnlSig],\n });\n\n return callAsSubAccount(config, {\n account,\n data,\n chainId,\n from: parameters.from,\n simulateBeforeWrite: parameters.simulateBeforeWrite,\n });\n}\n"],"mappings":";;;;;AA0EA,eAAsB,EAAW,GAAgB,GAAiE;CAChH,IAAM,EAAE,YAAS,YAAS,cAAW;CAWrC,OAAO,EAAiB,GAAQ;EAC9B;EACA,MARW,EAAmB;GAC9B,KAAK;GACL,cAAc;GACd,MAAM,CAAC,GALP,EAAW,WAAY,MAAM,EAAqB,GAAQ;IAAE,gBAAgB,EAAW;IAAS;GAAQ,CAAC,CAKnF;EACxB,CAIE;EACA;EACA,MAAM,EAAW;EACjB,qBAAqB,EAAW;CAClC,CAAC;AACH"}
@@ -1,4 +1,4 @@
1
- import { symmioAbi as e } from "../../abi/v0.8.5/symmio.js";
1
+ import { symmioAbi as e } from "../../abi/v0.8.6/symmio.js";
2
2
  import { shouldSimulateBeforeWrite as t } from "../../../shared/utils/simulate-before-write.js";
3
3
  import { simulateFinalizeWithdrawRequest as n } from "./simulate-finalize-withdraw-request.js";
4
4
  //#region src/symmio-contracts/symmio/actions/finalize-withdraw-request.ts
@@ -1 +1 @@
1
- {"version":3,"file":"finalize-withdraw-request.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/finalize-withdraw-request.ts"],"sourcesContent":["import type { Address, Hash } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { Compute, WriteContractParameter } from \"../../../shared/types/properties\";\nimport { shouldSimulateBeforeWrite } from \"../../../shared/utils/simulate-before-write\";\nimport { symmioAbi } from \"../../abi/v0.8.5/symmio\";\nimport { simulateFinalizeWithdrawRequest } from \"./simulate-finalize-withdraw-request\";\n\n/**\n * Parameters for {@link finalizeWithdrawRequest}.\n */\nexport type FinalizeWithdrawRequestParameters = Compute<\n WriteContractParameter & {\n /** The subaccount that owns the request (the request's on-chain `user`). */\n user: Address;\n /** Id of the withdraw request to finalize. */\n requestId: bigint;\n }\n>;\n\n/** Return type of {@link finalizeWithdrawRequest}: the submitted transaction hash. */\nexport type FinalizeWithdrawRequestReturnType = Hash;\n\n/**\n * Finalize a matured withdraw request, paying out collateral to its receivers.\n *\n * Calls the SYMMIO core `finalizeWithdrawRequest(user, requestId)` **directly** —\n * the function is permissionless (it only checks that the cooldown has elapsed and\n * the status is valid), so it does not need the AccountLayer `_call` proxy and any\n * wallet may submit it. Funds go to the `receiver` baked into each part, not to\n * the caller.\n *\n * Dry-runs the call with {@link simulateFinalizeWithdrawRequest} first unless\n * `simulateBeforeWrite` is `false` (per-call, falling back to the config default).\n *\n * @param config - The SDK config (must have a `getWalletClient` resolver).\n * @param parameters - The request's owner subaccount, request id, optional chain id.\n * @returns The submitted transaction hash. The caller waits on the receipt.\n * @throws {SymmError} when the chain is unsupported or no wallet is available.\n * @throws Viem's write errors (`ContractFunctionExecutionError`, ...) — including\n * when the cooldown has not yet elapsed.\n *\n * @example\n * ```ts\n * const hash = await finalizeWithdrawRequest(config, { user: \"0xsub…\", requestId: 1n });\n * ```\n */\nexport async function finalizeWithdrawRequest(\n config: Config,\n parameters: FinalizeWithdrawRequestParameters,\n): Promise<FinalizeWithdrawRequestReturnType> {\n const { chainId, user, requestId, from } = parameters;\n\n const { addresses } = config.getChainConfig(chainId);\n const walletClient = await config.getWalletClient({ chainId, from });\n\n if (shouldSimulateBeforeWrite(config, parameters)) {\n await simulateFinalizeWithdrawRequest(config, { chainId, user, requestId, from: walletClient.account.address });\n }\n\n return walletClient.writeContract({\n address: addresses.symmioAddress,\n abi: symmioAbi,\n functionName: \"finalizeWithdrawRequest\",\n args: [user, requestId],\n account: walletClient.account,\n chain: walletClient.chain,\n });\n}\n"],"mappings":";;;;AA8CA,eAAsB,EACpB,GACA,GAC4C;CAC5C,IAAM,EAAE,YAAS,SAAM,cAAW,YAAS,GAErC,EAAE,iBAAc,EAAO,eAAe,CAAO,GAC7C,IAAe,MAAM,EAAO,gBAAgB;EAAE;EAAS;CAAK,CAAC;CAMnE,OAJI,EAA0B,GAAQ,CAAU,KAC9C,MAAM,EAAgC,GAAQ;EAAE;EAAS;EAAM;EAAW,MAAM,EAAa,QAAQ;CAAQ,CAAC,GAGzG,EAAa,cAAc;EAChC,SAAS,EAAU;EACnB,KAAK;EACL,cAAc;EACd,MAAM,CAAC,GAAM,CAAS;EACtB,SAAS,EAAa;EACtB,OAAO,EAAa;CACtB,CAAC;AACH"}
1
+ {"version":3,"file":"finalize-withdraw-request.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/finalize-withdraw-request.ts"],"sourcesContent":["import type { Address, Hash } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { Compute, WriteContractParameter } from \"../../../shared/types/properties\";\nimport { shouldSimulateBeforeWrite } from \"../../../shared/utils/simulate-before-write\";\nimport { symmioAbi } from \"../../abi/v0.8.6/symmio\";\nimport { simulateFinalizeWithdrawRequest } from \"./simulate-finalize-withdraw-request\";\n\n/**\n * Parameters for {@link finalizeWithdrawRequest}.\n */\nexport type FinalizeWithdrawRequestParameters = Compute<\n WriteContractParameter & {\n /** The subaccount that owns the request (the request's on-chain `user`). */\n user: Address;\n /** Id of the withdraw request to finalize. */\n requestId: bigint;\n }\n>;\n\n/** Return type of {@link finalizeWithdrawRequest}: the submitted transaction hash. */\nexport type FinalizeWithdrawRequestReturnType = Hash;\n\n/**\n * Finalize a matured withdraw request, paying out collateral to its receivers.\n *\n * Calls the SYMMIO core `finalizeWithdrawRequest(user, requestId)` **directly** —\n * the function is permissionless (it only checks that the cooldown has elapsed and\n * the status is valid), so it does not need the AccountLayer `_call` proxy and any\n * wallet may submit it. Funds go to the `receiver` baked into each part, not to\n * the caller.\n *\n * Dry-runs the call with {@link simulateFinalizeWithdrawRequest} first unless\n * `simulateBeforeWrite` is `false` (per-call, falling back to the config default).\n *\n * @param config - The SDK config (must have a `getWalletClient` resolver).\n * @param parameters - The request's owner subaccount, request id, optional chain id.\n * @returns The submitted transaction hash. The caller waits on the receipt.\n * @throws {SymmError} when the chain is unsupported or no wallet is available.\n * @throws Viem's write errors (`ContractFunctionExecutionError`, ...) — including\n * when the cooldown has not yet elapsed.\n *\n * @example\n * ```ts\n * const hash = await finalizeWithdrawRequest(config, { user: \"0xsub…\", requestId: 1n });\n * ```\n */\nexport async function finalizeWithdrawRequest(\n config: Config,\n parameters: FinalizeWithdrawRequestParameters,\n): Promise<FinalizeWithdrawRequestReturnType> {\n const { chainId, user, requestId, from } = parameters;\n\n const { addresses } = config.getChainConfig(chainId);\n const walletClient = await config.getWalletClient({ chainId, from });\n\n if (shouldSimulateBeforeWrite(config, parameters)) {\n await simulateFinalizeWithdrawRequest(config, { chainId, user, requestId, from: walletClient.account.address });\n }\n\n return walletClient.writeContract({\n address: addresses.symmioAddress,\n abi: symmioAbi,\n functionName: \"finalizeWithdrawRequest\",\n args: [user, requestId],\n account: walletClient.account,\n chain: walletClient.chain,\n });\n}\n"],"mappings":";;;;AA8CA,eAAsB,EACpB,GACA,GAC4C;CAC5C,IAAM,EAAE,YAAS,SAAM,cAAW,YAAS,GAErC,EAAE,iBAAc,EAAO,eAAe,CAAO,GAC7C,IAAe,MAAM,EAAO,gBAAgB;EAAE;EAAS;CAAK,CAAC;CAMnE,OAJI,EAA0B,GAAQ,CAAU,KAC9C,MAAM,EAAgC,GAAQ;EAAE;EAAS;EAAM;EAAW,MAAM,EAAa,QAAQ;CAAQ,CAAC,GAGzG,EAAa,cAAc;EAChC,SAAS,EAAU;EACnB,KAAK;EACL,cAAc;EACd,MAAM,CAAC,GAAM,CAAS;EACtB,SAAS,EAAa;EACtB,OAAO,EAAa;CACtB,CAAC;AACH"}
@@ -1,4 +1,4 @@
1
- import { symmioAbi as e } from "../../abi/v0.8.5/symmio.js";
1
+ import { symmioAbi as e } from "../../abi/v0.8.6/symmio.js";
2
2
  import { callAsSubAccount as t } from "../internal/call-as-sub-account.js";
3
3
  import { encodeFunctionData as n } from "viem";
4
4
  //#region src/symmio-contracts/symmio/actions/force-cancel-close-request.ts
@@ -1 +1 @@
1
- {"version":3,"file":"force-cancel-close-request.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/force-cancel-close-request.ts"],"sourcesContent":["import { encodeFunctionData, type Address, type Hash } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { Compute, WriteContractParameter } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.5/symmio\";\nimport { callAsSubAccount } from \"../internal/call-as-sub-account\";\n\n/**\n * Parameters for {@link forceCancelCloseRequest}.\n */\nexport type ForceCancelCloseRequestParameters = Compute<\n WriteContractParameter & {\n /**\n * The subaccount (partyA) that owns the quote. Routed through the AccountLayer\n * `_call` proxy so the core sees this subaccount as the caller; the connected\n * wallet must be its on-chain `owner`.\n */\n account: Address;\n /** The `CANCEL_CLOSE_PENDING` quote id to force-cancel the close on. */\n quoteId: bigint;\n }\n>;\n\n/** Return type of {@link forceCancelCloseRequest}: the submitted transaction hash. */\nexport type ForceCancelCloseRequestReturnType = Hash;\n\n/**\n * Force-cancel a stuck close request (`forceCancelCloseRequest`) — the escalation\n * when partyB stalls on a close-cancel request.\n *\n * A quote reaches `CANCEL_CLOSE_PENDING` only when it was `CLOSE_PENDING` and\n * partyA called `requestToCancelCloseRequest`. If partyB does not acknowledge\n * within `coolDownsOfMA()[2]` (`forceCancelCloseCooldown`) after the request,\n * partyA may force it — the quote returns to `OPENED`. The core\n * `forceCancelCloseRequest(quoteId)` is routed through `AccountLayer._call(account, …)`;\n * the connected wallet must be the sub-account's `owner`.\n *\n * @param config - The SDK config (must have a `getWalletClient` resolver).\n * @param parameters - The owning subaccount, the quote id, optional `from` / pre-flight / chain id.\n * @returns The submitted transaction hash.\n * @throws {SymmError} when the chain is unsupported or no wallet client is available.\n *\n * @example\n * ```ts\n * const hash = await forceCancelCloseRequest(config, { account: \"0xsub…\", quoteId: 42n });\n * ```\n */\nexport async function forceCancelCloseRequest(\n config: Config,\n parameters: ForceCancelCloseRequestParameters,\n): Promise<ForceCancelCloseRequestReturnType> {\n const { chainId, account, quoteId } = parameters;\n\n const data = encodeFunctionData({\n abi: symmioAbi,\n functionName: \"forceCancelCloseRequest\",\n args: [quoteId],\n });\n\n return callAsSubAccount(config, {\n account,\n data,\n chainId,\n from: parameters.from,\n simulateBeforeWrite: parameters.simulateBeforeWrite,\n });\n}\n"],"mappings":";;;;AA8CA,eAAsB,EACpB,GACA,GAC4C;CAC5C,IAAM,EAAE,YAAS,YAAS,eAAY;CAQtC,OAAO,EAAiB,GAAQ;EAC9B;EACA,MARW,EAAmB;GAC9B,KAAK;GACL,cAAc;GACd,MAAM,CAAC,CAAO;EAChB,CAIE;EACA;EACA,MAAM,EAAW;EACjB,qBAAqB,EAAW;CAClC,CAAC;AACH"}
1
+ {"version":3,"file":"force-cancel-close-request.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/force-cancel-close-request.ts"],"sourcesContent":["import { encodeFunctionData, type Address, type Hash } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { Compute, WriteContractParameter } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.6/symmio\";\nimport { callAsSubAccount } from \"../internal/call-as-sub-account\";\n\n/**\n * Parameters for {@link forceCancelCloseRequest}.\n */\nexport type ForceCancelCloseRequestParameters = Compute<\n WriteContractParameter & {\n /**\n * The subaccount (partyA) that owns the quote. Routed through the AccountLayer\n * `_call` proxy so the core sees this subaccount as the caller; the connected\n * wallet must be its on-chain `owner`.\n */\n account: Address;\n /** The `CANCEL_CLOSE_PENDING` quote id to force-cancel the close on. */\n quoteId: bigint;\n }\n>;\n\n/** Return type of {@link forceCancelCloseRequest}: the submitted transaction hash. */\nexport type ForceCancelCloseRequestReturnType = Hash;\n\n/**\n * Force-cancel a stuck close request (`forceCancelCloseRequest`) — the escalation\n * when partyB stalls on a close-cancel request.\n *\n * A quote reaches `CANCEL_CLOSE_PENDING` only when it was `CLOSE_PENDING` and\n * partyA called `requestToCancelCloseRequest`. If partyB does not acknowledge\n * within `coolDownsOfMA()[2]` (`forceCancelCloseCooldown`) after the request,\n * partyA may force it — the quote returns to `OPENED`. The core\n * `forceCancelCloseRequest(quoteId)` is routed through `AccountLayer._call(account, …)`;\n * the connected wallet must be the sub-account's `owner`.\n *\n * @param config - The SDK config (must have a `getWalletClient` resolver).\n * @param parameters - The owning subaccount, the quote id, optional `from` / pre-flight / chain id.\n * @returns The submitted transaction hash.\n * @throws {SymmError} when the chain is unsupported or no wallet client is available.\n *\n * @example\n * ```ts\n * const hash = await forceCancelCloseRequest(config, { account: \"0xsub…\", quoteId: 42n });\n * ```\n */\nexport async function forceCancelCloseRequest(\n config: Config,\n parameters: ForceCancelCloseRequestParameters,\n): Promise<ForceCancelCloseRequestReturnType> {\n const { chainId, account, quoteId } = parameters;\n\n const data = encodeFunctionData({\n abi: symmioAbi,\n functionName: \"forceCancelCloseRequest\",\n args: [quoteId],\n });\n\n return callAsSubAccount(config, {\n account,\n data,\n chainId,\n from: parameters.from,\n simulateBeforeWrite: parameters.simulateBeforeWrite,\n });\n}\n"],"mappings":";;;;AA8CA,eAAsB,EACpB,GACA,GAC4C;CAC5C,IAAM,EAAE,YAAS,YAAS,eAAY;CAQtC,OAAO,EAAiB,GAAQ;EAC9B;EACA,MARW,EAAmB;GAC9B,KAAK;GACL,cAAc;GACd,MAAM,CAAC,CAAO;EAChB,CAIE;EACA;EACA,MAAM,EAAW;EACjB,qBAAqB,EAAW;CAClC,CAAC;AACH"}
@@ -1,4 +1,4 @@
1
- import { symmioAbi as e } from "../../abi/v0.8.5/symmio.js";
1
+ import { symmioAbi as e } from "../../abi/v0.8.6/symmio.js";
2
2
  import { callAsSubAccount as t } from "../internal/call-as-sub-account.js";
3
3
  import { encodeFunctionData as n } from "viem";
4
4
  //#region src/symmio-contracts/symmio/actions/force-cancel-quote.ts
@@ -1 +1 @@
1
- {"version":3,"file":"force-cancel-quote.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/force-cancel-quote.ts"],"sourcesContent":["import { encodeFunctionData, type Address, type Hash } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { Compute, WriteContractParameter } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.5/symmio\";\nimport { callAsSubAccount } from \"../internal/call-as-sub-account\";\n\n/**\n * Parameters for {@link forceCancelQuote}.\n */\nexport type ForceCancelQuoteParameters = Compute<\n WriteContractParameter & {\n /**\n * The subaccount (partyA) that owns the quote. Routed through the AccountLayer\n * `_call` proxy so the core sees this subaccount as the caller; the connected\n * wallet must be its on-chain `owner`.\n */\n account: Address;\n /** The `CANCEL_PENDING` quote id to force-cancel. */\n quoteId: bigint;\n }\n>;\n\n/** Return type of {@link forceCancelQuote}: the submitted transaction hash. */\nexport type ForceCancelQuoteReturnType = Hash;\n\n/**\n * Force-cancel a stuck quote (`forceCancelQuote`) — the escalation when partyB\n * stalls on a cancel request.\n *\n * A quote reaches `CANCEL_PENDING` only when it was `LOCKED` and partyA called\n * `requestToCancelQuote` (a `PENDING` quote cancels instantly and never needs\n * this). If partyB does not acknowledge within `coolDownsOfMA()[1]`\n * (`forceCancelCooldown`) after the request, partyA may force it. The core\n * `forceCancelQuote(quoteId)` is routed through `AccountLayer._call(account, …)`;\n * the connected wallet must be the sub-account's `owner`.\n *\n * @param config - The SDK config (must have a `getWalletClient` resolver).\n * @param parameters - The owning subaccount, the quote id, optional `from` / pre-flight / chain id.\n * @returns The submitted transaction hash.\n * @throws {SymmError} when the chain is unsupported or no wallet client is available.\n *\n * @example\n * ```ts\n * const hash = await forceCancelQuote(config, { account: \"0xsub…\", quoteId: 42n });\n * ```\n */\nexport async function forceCancelQuote(\n config: Config,\n parameters: ForceCancelQuoteParameters,\n): Promise<ForceCancelQuoteReturnType> {\n const { chainId, account, quoteId } = parameters;\n\n const data = encodeFunctionData({\n abi: symmioAbi,\n functionName: \"forceCancelQuote\",\n args: [quoteId],\n });\n\n return callAsSubAccount(config, {\n account,\n data,\n chainId,\n from: parameters.from,\n simulateBeforeWrite: parameters.simulateBeforeWrite,\n });\n}\n"],"mappings":";;;;AA8CA,eAAsB,EACpB,GACA,GACqC;CACrC,IAAM,EAAE,YAAS,YAAS,eAAY;CAQtC,OAAO,EAAiB,GAAQ;EAC9B;EACA,MARW,EAAmB;GAC9B,KAAK;GACL,cAAc;GACd,MAAM,CAAC,CAAO;EAChB,CAIE;EACA;EACA,MAAM,EAAW;EACjB,qBAAqB,EAAW;CAClC,CAAC;AACH"}
1
+ {"version":3,"file":"force-cancel-quote.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/force-cancel-quote.ts"],"sourcesContent":["import { encodeFunctionData, type Address, type Hash } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { Compute, WriteContractParameter } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.6/symmio\";\nimport { callAsSubAccount } from \"../internal/call-as-sub-account\";\n\n/**\n * Parameters for {@link forceCancelQuote}.\n */\nexport type ForceCancelQuoteParameters = Compute<\n WriteContractParameter & {\n /**\n * The subaccount (partyA) that owns the quote. Routed through the AccountLayer\n * `_call` proxy so the core sees this subaccount as the caller; the connected\n * wallet must be its on-chain `owner`.\n */\n account: Address;\n /** The `CANCEL_PENDING` quote id to force-cancel. */\n quoteId: bigint;\n }\n>;\n\n/** Return type of {@link forceCancelQuote}: the submitted transaction hash. */\nexport type ForceCancelQuoteReturnType = Hash;\n\n/**\n * Force-cancel a stuck quote (`forceCancelQuote`) — the escalation when partyB\n * stalls on a cancel request.\n *\n * A quote reaches `CANCEL_PENDING` only when it was `LOCKED` and partyA called\n * `requestToCancelQuote` (a `PENDING` quote cancels instantly and never needs\n * this). If partyB does not acknowledge within `coolDownsOfMA()[1]`\n * (`forceCancelCooldown`) after the request, partyA may force it. The core\n * `forceCancelQuote(quoteId)` is routed through `AccountLayer._call(account, …)`;\n * the connected wallet must be the sub-account's `owner`.\n *\n * @param config - The SDK config (must have a `getWalletClient` resolver).\n * @param parameters - The owning subaccount, the quote id, optional `from` / pre-flight / chain id.\n * @returns The submitted transaction hash.\n * @throws {SymmError} when the chain is unsupported or no wallet client is available.\n *\n * @example\n * ```ts\n * const hash = await forceCancelQuote(config, { account: \"0xsub…\", quoteId: 42n });\n * ```\n */\nexport async function forceCancelQuote(\n config: Config,\n parameters: ForceCancelQuoteParameters,\n): Promise<ForceCancelQuoteReturnType> {\n const { chainId, account, quoteId } = parameters;\n\n const data = encodeFunctionData({\n abi: symmioAbi,\n functionName: \"forceCancelQuote\",\n args: [quoteId],\n });\n\n return callAsSubAccount(config, {\n account,\n data,\n chainId,\n from: parameters.from,\n simulateBeforeWrite: parameters.simulateBeforeWrite,\n });\n}\n"],"mappings":";;;;AA8CA,eAAsB,EACpB,GACA,GACqC;CACrC,IAAM,EAAE,YAAS,YAAS,eAAY;CAQtC,OAAO,EAAiB,GAAQ;EAC9B;EACA,MARW,EAAmB;GAC9B,KAAK;GACL,cAAc;GACd,MAAM,CAAC,CAAO;EAChB,CAIE;EACA;EACA,MAAM,EAAW;EACjB,qBAAqB,EAAW;CAClC,CAAC;AACH"}
@@ -1,4 +1,4 @@
1
- import { symmioAbi as e } from "../../abi/v0.8.5/symmio.js";
1
+ import { symmioAbi as e } from "../../abi/v0.8.6/symmio.js";
2
2
  //#region src/symmio-contracts/symmio/actions/get-cool-downs-of-ma.ts
3
3
  async function t(t, n = {}) {
4
4
  let { chainId: r } = n, { addresses: i } = t.getChainConfig(r);
@@ -1 +1 @@
1
- {"version":3,"file":"get-cool-downs-of-ma.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/get-cool-downs-of-ma.ts"],"sourcesContent":["import type { Config } from \"../../../core/config\";\nimport type { ChainIdParameter, Compute } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.5/symmio\";\n\n/**\n * Parameters for {@link getCoolDownsOfMA}.\n */\nexport type GetCoolDownsOfMAParameters = Compute<ChainIdParameter>;\n\n/**\n * Return type of {@link getCoolDownsOfMA}: the four cooldown periods from\n * `coolDownsOfMA()`, in contract order (unix seconds) —\n * `(withdrawCooldownPeriod, forceCancelCooldown, forceCancelCloseCooldown, forceCloseFirstCooldown)`.\n *\n * Index **1** is the **force-cancel cooldown** — the wait after a quote enters\n * `CANCEL_PENDING` before `forceCancelQuote` is allowed.\n */\nexport type GetCoolDownsOfMAReturnType = readonly [bigint, bigint, bigint, bigint];\n\n/**\n * Read the protocol cooldown periods (`coolDownsOfMA()`), in unix seconds.\n *\n * The value at index **1** is the `forceCancelCooldown`: once a `CANCEL_PENDING`\n * quote's `statusModifyTimestamp + coolDownsOfMA()[1]` has passed, partyA may\n * call {@link \"forceCancelQuote\"}.\n *\n * @param config - The SDK config.\n * @param parameters - Optional chain id.\n * @returns The four cooldown values `[_, forceCancelCooldown, _, _]`.\n * @throws {SymmError} when the chain is not supported.\n *\n * @example\n * ```ts\n * const [, forceCancelCooldown] = await getCoolDownsOfMA(config);\n * ```\n */\nexport async function getCoolDownsOfMA(\n config: Config,\n parameters: GetCoolDownsOfMAParameters = {},\n): Promise<GetCoolDownsOfMAReturnType> {\n const { chainId } = parameters;\n\n const { addresses } = config.getChainConfig(chainId);\n const client = config.getClient({ chainId });\n\n return client.readContract({\n address: addresses.symmioAddress,\n abi: symmioAbi,\n functionName: \"coolDownsOfMA\",\n });\n}\n"],"mappings":";;AAoCA,eAAsB,EACpB,GACA,IAAyC,CAAC,GACL;CACrC,IAAM,EAAE,eAAY,GAEd,EAAE,iBAAc,EAAO,eAAe,CAAO;CAGnD,OAFe,EAAO,UAAU,EAAE,WAAQ,CAEnC,EAAO,aAAa;EACzB,SAAS,EAAU;EACnB,KAAK;EACL,cAAc;CAChB,CAAC;AACH"}
1
+ {"version":3,"file":"get-cool-downs-of-ma.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/get-cool-downs-of-ma.ts"],"sourcesContent":["import type { Config } from \"../../../core/config\";\nimport type { ChainIdParameter, Compute } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.6/symmio\";\n\n/**\n * Parameters for {@link getCoolDownsOfMA}.\n */\nexport type GetCoolDownsOfMAParameters = Compute<ChainIdParameter>;\n\n/**\n * Return type of {@link getCoolDownsOfMA}: the four cooldown periods from\n * `coolDownsOfMA()`, in contract order (unix seconds) —\n * `(withdrawCooldownPeriod, forceCancelCooldown, forceCancelCloseCooldown, forceCloseFirstCooldown)`.\n *\n * Index **1** is the **force-cancel cooldown** — the wait after a quote enters\n * `CANCEL_PENDING` before `forceCancelQuote` is allowed.\n */\nexport type GetCoolDownsOfMAReturnType = readonly [bigint, bigint, bigint, bigint];\n\n/**\n * Read the protocol cooldown periods (`coolDownsOfMA()`), in unix seconds.\n *\n * The value at index **1** is the `forceCancelCooldown`: once a `CANCEL_PENDING`\n * quote's `statusModifyTimestamp + coolDownsOfMA()[1]` has passed, partyA may\n * call {@link \"forceCancelQuote\"}.\n *\n * @param config - The SDK config.\n * @param parameters - Optional chain id.\n * @returns The four cooldown values `[_, forceCancelCooldown, _, _]`.\n * @throws {SymmError} when the chain is not supported.\n *\n * @example\n * ```ts\n * const [, forceCancelCooldown] = await getCoolDownsOfMA(config);\n * ```\n */\nexport async function getCoolDownsOfMA(\n config: Config,\n parameters: GetCoolDownsOfMAParameters = {},\n): Promise<GetCoolDownsOfMAReturnType> {\n const { chainId } = parameters;\n\n const { addresses } = config.getChainConfig(chainId);\n const client = config.getClient({ chainId });\n\n return client.readContract({\n address: addresses.symmioAddress,\n abi: symmioAbi,\n functionName: \"coolDownsOfMA\",\n });\n}\n"],"mappings":";;AAoCA,eAAsB,EACpB,GACA,IAAyC,CAAC,GACL;CACrC,IAAM,EAAE,eAAY,GAEd,EAAE,iBAAc,EAAO,eAAe,CAAO;CAGnD,OAFe,EAAO,UAAU,EAAE,WAAQ,CAEnC,EAAO,aAAa;EACzB,SAAS,EAAU;EACnB,KAAK;EACL,cAAc;CAChB,CAAC;AACH"}
@@ -1,4 +1,4 @@
1
- import { symmioAbi as e } from "../../abi/v0.8.5/symmio.js";
1
+ import { symmioAbi as e } from "../../abi/v0.8.6/symmio.js";
2
2
  //#region src/symmio-contracts/symmio/actions/get-fee-for-user.ts
3
3
  async function t(t, n) {
4
4
  let { chainId: r, affiliate: i, user: a, symbolId: o } = n, { addresses: s } = t.getChainConfig(r), c = await t.getClient({ chainId: r }).readContract({
@@ -1 +1 @@
1
- {"version":3,"file":"get-fee-for-user.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/get-fee-for-user.ts"],"sourcesContent":["import type { Address } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { ChainIdParameter, Compute } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.5/symmio\";\n\n/** Fee settings returned by SYMMIO for a user, affiliate, and symbol id. */\nexport interface FeeForUser {\n /** Opening fee rate in 18-decimal fixed point units. */\n openFee: bigint;\n /** Closing fee rate in 18-decimal fixed point units. */\n closeFee: bigint;\n /** Whether the contract has an explicit fee entry for the pair. */\n isSet: boolean;\n}\n\n/**\n * Parameters for {@link getFeeForUser}.\n */\nexport type GetFeeForUserParameters = Compute<\n ChainIdParameter & {\n /** Affiliate address used by the fee lookup. Defaults to the chain config affiliate. */\n affiliate?: Address;\n /** User/account address passed to `getFeeForUser`. */\n user: Address;\n /** SYMMIO symbol id passed to `getFeeForUser`. */\n symbolId: bigint | number;\n }\n>;\n\n/** Return type of {@link getFeeForUser}: normalized fee tuple fields. */\nexport type GetFeeForUserReturnType = FeeForUser;\n\n/**\n * Read the SYMMIO fee configuration for a user and symbol.\n *\n * If `affiliate` is omitted, the chain config's `addresses.affiliatesAddress`\n * is used. Fee values are raw 18-decimal fixed point rates from the contract.\n *\n * @param config - The SDK config.\n * @param parameters - User/account, symbol id, optional affiliate, and optional chain id.\n * @returns The open fee, close fee, and `isSet` flag.\n * @throws {SymmError} when the chain is not supported.\n * @throws Viem's `ContractFunctionExecutionError` and friends for on-chain failures.\n *\n * @example\n * ```ts\n * const fee = await getFeeForUser(config, { user, symbolId: 1n });\n * console.log(fee.openFee);\n * ```\n */\nexport async function getFeeForUser(\n config: Config,\n parameters: GetFeeForUserParameters,\n): Promise<GetFeeForUserReturnType> {\n const { chainId, affiliate, user, symbolId } = parameters;\n\n const { addresses } = config.getChainConfig(chainId);\n const client = config.getClient({ chainId });\n\n const fee = await client.readContract({\n address: addresses.symmioAddress,\n abi: symmioAbi,\n functionName: \"getFeeForUser\",\n args: [affiliate ?? addresses.affiliatesAddress, user, BigInt(symbolId)],\n });\n\n return {\n openFee: fee.openFee,\n closeFee: fee.closeFee,\n isSet: fee.isSet,\n };\n}\n"],"mappings":";;AAkDA,eAAsB,EACpB,GACA,GACkC;CAClC,IAAM,EAAE,YAAS,cAAW,SAAM,gBAAa,GAEzC,EAAE,iBAAc,EAAO,eAAe,CAAO,GAG7C,IAAM,MAFG,EAAO,UAAU,EAAE,WAAQ,CAExB,EAAO,aAAa;EACpC,SAAS,EAAU;EACnB,KAAK;EACL,cAAc;EACd,MAAM;GAAC,KAAa,EAAU;GAAmB;GAAM,OAAO,CAAQ;EAAC;CACzE,CAAC;CAED,OAAO;EACL,SAAS,EAAI;EACb,UAAU,EAAI;EACd,OAAO,EAAI;CACb;AACF"}
1
+ {"version":3,"file":"get-fee-for-user.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/get-fee-for-user.ts"],"sourcesContent":["import type { Address } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { ChainIdParameter, Compute } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.6/symmio\";\n\n/** Fee settings returned by SYMMIO for a user, affiliate, and symbol id. */\nexport interface FeeForUser {\n /** Opening fee rate in 18-decimal fixed point units. */\n openFee: bigint;\n /** Closing fee rate in 18-decimal fixed point units. */\n closeFee: bigint;\n /** Whether the contract has an explicit fee entry for the pair. */\n isSet: boolean;\n}\n\n/**\n * Parameters for {@link getFeeForUser}.\n */\nexport type GetFeeForUserParameters = Compute<\n ChainIdParameter & {\n /** Affiliate address used by the fee lookup. Defaults to the chain config affiliate. */\n affiliate?: Address;\n /** User/account address passed to `getFeeForUser`. */\n user: Address;\n /** SYMMIO symbol id passed to `getFeeForUser`. */\n symbolId: bigint | number;\n }\n>;\n\n/** Return type of {@link getFeeForUser}: normalized fee tuple fields. */\nexport type GetFeeForUserReturnType = FeeForUser;\n\n/**\n * Read the SYMMIO fee configuration for a user and symbol.\n *\n * If `affiliate` is omitted, the chain config's `addresses.affiliatesAddress`\n * is used. Fee values are raw 18-decimal fixed point rates from the contract.\n *\n * @param config - The SDK config.\n * @param parameters - User/account, symbol id, optional affiliate, and optional chain id.\n * @returns The open fee, close fee, and `isSet` flag.\n * @throws {SymmError} when the chain is not supported.\n * @throws Viem's `ContractFunctionExecutionError` and friends for on-chain failures.\n *\n * @example\n * ```ts\n * const fee = await getFeeForUser(config, { user, symbolId: 1n });\n * console.log(fee.openFee);\n * ```\n */\nexport async function getFeeForUser(\n config: Config,\n parameters: GetFeeForUserParameters,\n): Promise<GetFeeForUserReturnType> {\n const { chainId, affiliate, user, symbolId } = parameters;\n\n const { addresses } = config.getChainConfig(chainId);\n const client = config.getClient({ chainId });\n\n const fee = await client.readContract({\n address: addresses.symmioAddress,\n abi: symmioAbi,\n functionName: \"getFeeForUser\",\n args: [affiliate ?? addresses.affiliatesAddress, user, BigInt(symbolId)],\n });\n\n return {\n openFee: fee.openFee,\n closeFee: fee.closeFee,\n isSet: fee.isSet,\n };\n}\n"],"mappings":";;AAkDA,eAAsB,EACpB,GACA,GACkC;CAClC,IAAM,EAAE,YAAS,cAAW,SAAM,gBAAa,GAEzC,EAAE,iBAAc,EAAO,eAAe,CAAO,GAG7C,IAAM,MAFG,EAAO,UAAU,EAAE,WAAQ,CAExB,EAAO,aAAa;EACpC,SAAS,EAAU;EACnB,KAAK;EACL,cAAc;EACd,MAAM;GAAC,KAAa,EAAU;GAAmB;GAAM,OAAO,CAAQ;EAAC;CACzE,CAAC;CAED,OAAO;EACL,SAAS,EAAI;EACb,UAAU,EAAI;EACd,OAAO,EAAI;CACb;AACF"}
@@ -1,4 +1,4 @@
1
- import { symmioAbi as e } from "../../abi/v0.8.5/symmio.js";
1
+ import { symmioAbi as e } from "../../abi/v0.8.6/symmio.js";
2
2
  //#region src/symmio-contracts/symmio/actions/get-last-withdraw-request-id.ts
3
3
  async function t(t, n) {
4
4
  let { chainId: r, user: i } = n, { addresses: a } = t.getChainConfig(r);
@@ -1 +1 @@
1
- {"version":3,"file":"get-last-withdraw-request-id.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/get-last-withdraw-request-id.ts"],"sourcesContent":["import type { Address } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { ChainIdParameter, Compute } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.5/symmio\";\n\n/**\n * Parameters for {@link getLastWithdrawRequestId}.\n */\nexport type GetLastWithdrawRequestIdParameters = Compute<\n ChainIdParameter & {\n /** The subaccount whose latest request id to read. */\n user: Address;\n }\n>;\n\n/**\n * Return type of {@link getLastWithdrawRequestId}: the highest request id (or `0n`\n * when the subaccount has no requests).\n */\nexport type GetLastWithdrawRequestIdReturnType = bigint;\n\n/**\n * Read the most recent withdraw request id for a subaccount.\n *\n * Request ids are sequential per user starting at 1; this returns the upper bound\n * of the id range (0 when there are none). Use it to paginate\n * {@link \"getPendingWithdrawRequests\"} or fetch individual requests with\n * {@link \"getWithdrawRequests\"}.\n *\n * @param config - The SDK config.\n * @param parameters - Subaccount, optional chain id.\n * @returns The last assigned request id, or `0n`.\n * @throws {SymmError} when the chain is not supported.\n * @throws Viem's `ContractFunctionExecutionError` and friends for on-chain failures.\n *\n * @example\n * ```ts\n * const lastId = await getLastWithdrawRequestId(config, { user: \"0xsub…\" });\n * ```\n */\nexport async function getLastWithdrawRequestId(\n config: Config,\n parameters: GetLastWithdrawRequestIdParameters,\n): Promise<GetLastWithdrawRequestIdReturnType> {\n const { chainId, user } = parameters;\n\n const { addresses } = config.getChainConfig(chainId);\n const client = config.getClient({ chainId });\n\n return client.readContract({\n address: addresses.symmioAddress,\n abi: symmioAbi,\n functionName: \"getLastWithdrawRequestId\",\n args: [user],\n });\n}\n"],"mappings":";;AAwCA,eAAsB,EACpB,GACA,GAC6C;CAC7C,IAAM,EAAE,YAAS,YAAS,GAEpB,EAAE,iBAAc,EAAO,eAAe,CAAO;CAGnD,OAFe,EAAO,UAAU,EAAE,WAAQ,CAEnC,EAAO,aAAa;EACzB,SAAS,EAAU;EACnB,KAAK;EACL,cAAc;EACd,MAAM,CAAC,CAAI;CACb,CAAC;AACH"}
1
+ {"version":3,"file":"get-last-withdraw-request-id.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/get-last-withdraw-request-id.ts"],"sourcesContent":["import type { Address } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { ChainIdParameter, Compute } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.6/symmio\";\n\n/**\n * Parameters for {@link getLastWithdrawRequestId}.\n */\nexport type GetLastWithdrawRequestIdParameters = Compute<\n ChainIdParameter & {\n /** The subaccount whose latest request id to read. */\n user: Address;\n }\n>;\n\n/**\n * Return type of {@link getLastWithdrawRequestId}: the highest request id (or `0n`\n * when the subaccount has no requests).\n */\nexport type GetLastWithdrawRequestIdReturnType = bigint;\n\n/**\n * Read the most recent withdraw request id for a subaccount.\n *\n * Request ids are sequential per user starting at 1; this returns the upper bound\n * of the id range (0 when there are none). Use it to paginate\n * {@link \"getPendingWithdrawRequests\"} or fetch individual requests with\n * {@link \"getWithdrawRequests\"}.\n *\n * @param config - The SDK config.\n * @param parameters - Subaccount, optional chain id.\n * @returns The last assigned request id, or `0n`.\n * @throws {SymmError} when the chain is not supported.\n * @throws Viem's `ContractFunctionExecutionError` and friends for on-chain failures.\n *\n * @example\n * ```ts\n * const lastId = await getLastWithdrawRequestId(config, { user: \"0xsub…\" });\n * ```\n */\nexport async function getLastWithdrawRequestId(\n config: Config,\n parameters: GetLastWithdrawRequestIdParameters,\n): Promise<GetLastWithdrawRequestIdReturnType> {\n const { chainId, user } = parameters;\n\n const { addresses } = config.getChainConfig(chainId);\n const client = config.getClient({ chainId });\n\n return client.readContract({\n address: addresses.symmioAddress,\n abi: symmioAbi,\n functionName: \"getLastWithdrawRequestId\",\n args: [user],\n });\n}\n"],"mappings":";;AAwCA,eAAsB,EACpB,GACA,GAC6C;CAC7C,IAAM,EAAE,YAAS,YAAS,GAEpB,EAAE,iBAAc,EAAO,eAAe,CAAO;CAGnD,OAFe,EAAO,UAAU,EAAE,WAAQ,CAEnC,EAAO,aAAa;EACzB,SAAS,EAAU;EACnB,KAAK;EACL,cAAc;EACd,MAAM,CAAC,CAAI;CACb,CAAC;AACH"}
@@ -1,4 +1,4 @@
1
- import { symmioAbi as e } from "../../abi/v0.8.5/symmio.js";
1
+ import { symmioAbi as e } from "../../abi/v0.8.6/symmio.js";
2
2
  //#region src/symmio-contracts/symmio/actions/get-onchain-contract-markets.ts
3
3
  async function t(t, n) {
4
4
  let { chainId: r, start: i, size: a } = n, { addresses: o } = t.getChainConfig(r);
@@ -1 +1 @@
1
- {"version":3,"file":"get-onchain-contract-markets.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/get-onchain-contract-markets.ts"],"sourcesContent":["import type { Config } from \"../../../core/config\";\nimport type { ChainIdParameter, Compute } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.5/symmio\";\n\n/** On-chain market metadata returned by SYMMIO core `getSymbols`. */\nexport interface OnchainContractMarket {\n /** SYMMIO symbol id. */\n symbolId: bigint;\n /** Contract-level market name, such as `BTCUSDT`. */\n name: string;\n /** Whether the market is currently valid for trading. */\n isValid: boolean;\n /** Minimum acceptable quote value in raw 18-decimal units. */\n minAcceptableQuoteValue: bigint;\n /** Minimum acceptable liquidation-fee portion in raw 18-decimal units. */\n minAcceptablePortionLF: bigint;\n /** Trading fee rate in raw 18-decimal fixed point units. */\n tradingFee: bigint;\n /** Maximum leverage in raw 18-decimal fixed point units. */\n maxLeverage: bigint;\n /** Funding-rate epoch duration in seconds. */\n fundingRateEpochDuration: bigint;\n /** Funding-rate window time in seconds. */\n fundingRateWindowTime: bigint;\n}\n\n/**\n * Parameters for {@link getOnchainContractMarkets}.\n */\nexport type GetOnchainContractMarketsParameters = Compute<\n ChainIdParameter & {\n /** Start offset passed to SYMMIO core `getSymbols`. */\n start: bigint | number;\n /** Page size passed to SYMMIO core `getSymbols`. */\n size: bigint | number;\n }\n>;\n\n/** Return type of {@link getOnchainContractMarkets}: on-chain contract markets. */\nexport type GetOnchainContractMarketsReturnType = readonly OnchainContractMarket[];\n\n/**\n * Read paginated on-chain contract markets from SYMMIO core.\n *\n * This calls the SYMMIO core `getSymbols(start, size)` view and returns its\n * named symbol fields.\n *\n * @param config - The SDK config.\n * @param parameters - Start offset, page size, and optional chain id.\n * @returns A page of on-chain contract markets.\n * @throws {SymmError} when the chain is not supported.\n * @throws Viem's `ContractFunctionExecutionError` and friends for on-chain failures.\n *\n * @example\n * ```ts\n * const markets = await getOnchainContractMarkets(config, { start: 0, size: 100 });\n * console.log(markets[0]?.name);\n * ```\n */\nexport async function getOnchainContractMarkets(\n config: Config,\n parameters: GetOnchainContractMarketsParameters,\n): Promise<GetOnchainContractMarketsReturnType> {\n const { chainId, start, size } = parameters;\n\n const { addresses } = config.getChainConfig(chainId);\n const client = config.getClient({ chainId });\n\n return client.readContract({\n address: addresses.symmioAddress,\n abi: symmioAbi,\n functionName: \"getSymbols\",\n args: [BigInt(start), BigInt(size)],\n });\n}\n"],"mappings":";;AA2DA,eAAsB,EACpB,GACA,GAC8C;CAC9C,IAAM,EAAE,YAAS,UAAO,YAAS,GAE3B,EAAE,iBAAc,EAAO,eAAe,CAAO;CAGnD,OAFe,EAAO,UAAU,EAAE,WAAQ,CAEnC,EAAO,aAAa;EACzB,SAAS,EAAU;EACnB,KAAK;EACL,cAAc;EACd,MAAM,CAAC,OAAO,CAAK,GAAG,OAAO,CAAI,CAAC;CACpC,CAAC;AACH"}
1
+ {"version":3,"file":"get-onchain-contract-markets.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/get-onchain-contract-markets.ts"],"sourcesContent":["import type { Config } from \"../../../core/config\";\nimport type { ChainIdParameter, Compute } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.6/symmio\";\n\n/** On-chain market metadata returned by SYMMIO core `getSymbols`. */\nexport interface OnchainContractMarket {\n /** SYMMIO symbol id. */\n symbolId: bigint;\n /** Contract-level market name, such as `BTCUSDT`. */\n name: string;\n /** Whether the market is currently valid for trading. */\n isValid: boolean;\n /** Minimum acceptable quote value in raw 18-decimal units. */\n minAcceptableQuoteValue: bigint;\n /** Minimum acceptable liquidation-fee portion in raw 18-decimal units. */\n minAcceptablePortionLF: bigint;\n /** Trading fee rate in raw 18-decimal fixed point units. */\n tradingFee: bigint;\n /** Maximum leverage in raw 18-decimal fixed point units. */\n maxLeverage: bigint;\n /** Funding-rate epoch duration in seconds. */\n fundingRateEpochDuration: bigint;\n /** Funding-rate window time in seconds. */\n fundingRateWindowTime: bigint;\n}\n\n/**\n * Parameters for {@link getOnchainContractMarkets}.\n */\nexport type GetOnchainContractMarketsParameters = Compute<\n ChainIdParameter & {\n /** Start offset passed to SYMMIO core `getSymbols`. */\n start: bigint | number;\n /** Page size passed to SYMMIO core `getSymbols`. */\n size: bigint | number;\n }\n>;\n\n/** Return type of {@link getOnchainContractMarkets}: on-chain contract markets. */\nexport type GetOnchainContractMarketsReturnType = readonly OnchainContractMarket[];\n\n/**\n * Read paginated on-chain contract markets from SYMMIO core.\n *\n * This calls the SYMMIO core `getSymbols(start, size)` view and returns its\n * named symbol fields.\n *\n * @param config - The SDK config.\n * @param parameters - Start offset, page size, and optional chain id.\n * @returns A page of on-chain contract markets.\n * @throws {SymmError} when the chain is not supported.\n * @throws Viem's `ContractFunctionExecutionError` and friends for on-chain failures.\n *\n * @example\n * ```ts\n * const markets = await getOnchainContractMarkets(config, { start: 0, size: 100 });\n * console.log(markets[0]?.name);\n * ```\n */\nexport async function getOnchainContractMarkets(\n config: Config,\n parameters: GetOnchainContractMarketsParameters,\n): Promise<GetOnchainContractMarketsReturnType> {\n const { chainId, start, size } = parameters;\n\n const { addresses } = config.getChainConfig(chainId);\n const client = config.getClient({ chainId });\n\n return client.readContract({\n address: addresses.symmioAddress,\n abi: symmioAbi,\n functionName: \"getSymbols\",\n args: [BigInt(start), BigInt(size)],\n });\n}\n"],"mappings":";;AA2DA,eAAsB,EACpB,GACA,GAC8C;CAC9C,IAAM,EAAE,YAAS,UAAO,YAAS,GAE3B,EAAE,iBAAc,EAAO,eAAe,CAAO;CAGnD,OAFe,EAAO,UAAU,EAAE,WAAQ,CAEnC,EAAO,aAAa;EACzB,SAAS,EAAU;EACnB,KAAK;EACL,cAAc;EACd,MAAM,CAAC,OAAO,CAAK,GAAG,OAAO,CAAI,CAAC;CACpC,CAAC;AACH"}
@@ -1,4 +1,4 @@
1
- import { symmioAbi as e } from "../../abi/v0.8.5/symmio.js";
1
+ import { symmioAbi as e } from "../../abi/v0.8.6/symmio.js";
2
2
  //#region src/symmio-contracts/symmio/actions/get-party-a-open-positions.ts
3
3
  async function t(t, n) {
4
4
  let { chainId: r, partyA: i, start: a = 0n, size: o = 200n } = n, { addresses: s } = t.getChainConfig(r);
@@ -1 +1 @@
1
- {"version":3,"file":"get-party-a-open-positions.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/get-party-a-open-positions.ts"],"sourcesContent":["import type { Address } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { ChainIdParameter, Compute } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.5/symmio\";\nimport type { Quote } from \"../types\";\n\n/**\n * Parameters for {@link getPartyAOpenPositions}.\n */\nexport type GetPartyAOpenPositionsParameters = Compute<\n ChainIdParameter & {\n /** The partyA (virtual account, lowcap) whose open positions to read. */\n partyA: Address;\n /**\n * Pagination offset into partyA's open-positions list.\n * @default 0n\n */\n start?: bigint;\n /**\n * Maximum number of positions to return from `start`. Clamped on-chain to the\n * number remaining.\n * @default 200n\n */\n size?: bigint;\n }\n>;\n\n/** Return type of {@link getPartyAOpenPositions}: the open-position quotes in range. */\nexport type GetPartyAOpenPositionsReturnType = readonly Quote[];\n\n/**\n * Read a partyA's open positions (full {@link Quote} structs) within a paginated\n * range.\n *\n * Returns only quotes in `OPENED`, `CLOSE_PENDING`, `CANCEL_CLOSE_PENDING`, or\n * `LIQUIDATED_PENDING` status. The underlying storage list is maintained with\n * swap-and-pop removal, so **ordering is not stable** — closing or liquidating a\n * position can reorder the list between calls; do not rely on index positions\n * across paginated reads.\n *\n * @remarks\n * `size` is clamped on-chain to the number of positions remaining after `start`,\n * so `start === length` yields an empty array. A `start` **greater than** the\n * list length reverts (Solidity arithmetic panic); read the count first if you\n * cannot bound `start`.\n *\n * @param config - The SDK config.\n * @param parameters - PartyA, optional pagination (`start`/`size`), optional chain id.\n * @returns The open-position quotes found in the scanned range.\n * @throws {SymmError} when the chain is not supported.\n * @throws Viem's `ContractFunctionExecutionError` and friends for on-chain failures.\n *\n * @example\n * ```ts\n * const positions = await getPartyAOpenPositions(config, { partyA: \"0xva…\" });\n * ```\n */\nexport async function getPartyAOpenPositions(\n config: Config,\n parameters: GetPartyAOpenPositionsParameters,\n): Promise<GetPartyAOpenPositionsReturnType> {\n const { chainId, partyA, start = 0n, size = 200n } = parameters;\n\n const { addresses } = config.getChainConfig(chainId);\n const client = config.getClient({ chainId });\n\n return client.readContract({\n address: addresses.symmioAddress,\n abi: symmioAbi,\n functionName: \"getPartyAOpenPositions\",\n args: [partyA, start, size],\n });\n}\n"],"mappings":";;AAyDA,eAAsB,EACpB,GACA,GAC2C;CAC3C,IAAM,EAAE,YAAS,WAAQ,WAAQ,IAAI,UAAO,SAAS,GAE/C,EAAE,iBAAc,EAAO,eAAe,CAAO;CAGnD,OAFe,EAAO,UAAU,EAAE,WAAQ,CAEnC,EAAO,aAAa;EACzB,SAAS,EAAU;EACnB,KAAK;EACL,cAAc;EACd,MAAM;GAAC;GAAQ;GAAO;EAAI;CAC5B,CAAC;AACH"}
1
+ {"version":3,"file":"get-party-a-open-positions.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/get-party-a-open-positions.ts"],"sourcesContent":["import type { Address } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { ChainIdParameter, Compute } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.6/symmio\";\nimport type { Quote } from \"../types\";\n\n/**\n * Parameters for {@link getPartyAOpenPositions}.\n */\nexport type GetPartyAOpenPositionsParameters = Compute<\n ChainIdParameter & {\n /** The partyA (virtual account, lowcap) whose open positions to read. */\n partyA: Address;\n /**\n * Pagination offset into partyA's open-positions list.\n * @default 0n\n */\n start?: bigint;\n /**\n * Maximum number of positions to return from `start`. Clamped on-chain to the\n * number remaining.\n * @default 200n\n */\n size?: bigint;\n }\n>;\n\n/** Return type of {@link getPartyAOpenPositions}: the open-position quotes in range. */\nexport type GetPartyAOpenPositionsReturnType = readonly Quote[];\n\n/**\n * Read a partyA's open positions (full {@link Quote} structs) within a paginated\n * range.\n *\n * Returns only quotes in `OPENED`, `CLOSE_PENDING`, `CANCEL_CLOSE_PENDING`, or\n * `LIQUIDATED_PENDING` status. The underlying storage list is maintained with\n * swap-and-pop removal, so **ordering is not stable** — closing or liquidating a\n * position can reorder the list between calls; do not rely on index positions\n * across paginated reads.\n *\n * @remarks\n * `size` is clamped on-chain to the number of positions remaining after `start`,\n * so `start === length` yields an empty array. A `start` **greater than** the\n * list length reverts (Solidity arithmetic panic); read the count first if you\n * cannot bound `start`.\n *\n * @param config - The SDK config.\n * @param parameters - PartyA, optional pagination (`start`/`size`), optional chain id.\n * @returns The open-position quotes found in the scanned range.\n * @throws {SymmError} when the chain is not supported.\n * @throws Viem's `ContractFunctionExecutionError` and friends for on-chain failures.\n *\n * @example\n * ```ts\n * const positions = await getPartyAOpenPositions(config, { partyA: \"0xva…\" });\n * ```\n */\nexport async function getPartyAOpenPositions(\n config: Config,\n parameters: GetPartyAOpenPositionsParameters,\n): Promise<GetPartyAOpenPositionsReturnType> {\n const { chainId, partyA, start = 0n, size = 200n } = parameters;\n\n const { addresses } = config.getChainConfig(chainId);\n const client = config.getClient({ chainId });\n\n return client.readContract({\n address: addresses.symmioAddress,\n abi: symmioAbi,\n functionName: \"getPartyAOpenPositions\",\n args: [partyA, start, size],\n });\n}\n"],"mappings":";;AAyDA,eAAsB,EACpB,GACA,GAC2C;CAC3C,IAAM,EAAE,YAAS,WAAQ,WAAQ,IAAI,UAAO,SAAS,GAE/C,EAAE,iBAAc,EAAO,eAAe,CAAO;CAGnD,OAFe,EAAO,UAAU,EAAE,WAAQ,CAEnC,EAAO,aAAa;EACzB,SAAS,EAAU;EACnB,KAAK;EACL,cAAc;EACd,MAAM;GAAC;GAAQ;GAAO;EAAI;CAC5B,CAAC;AACH"}
@@ -1,4 +1,4 @@
1
- import { symmioAbi as e } from "../../abi/v0.8.5/symmio.js";
1
+ import { symmioAbi as e } from "../../abi/v0.8.6/symmio.js";
2
2
  //#region src/symmio-contracts/symmio/actions/get-party-a-pending-quotes.ts
3
3
  async function t(t, n) {
4
4
  let { chainId: r, partyA: i } = n, { addresses: a } = t.getChainConfig(r);
@@ -1 +1 @@
1
- {"version":3,"file":"get-party-a-pending-quotes.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/get-party-a-pending-quotes.ts"],"sourcesContent":["import type { Address } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { ChainIdParameter, Compute } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.5/symmio\";\n\n/**\n * Parameters for {@link getPartyAPendingQuotes}.\n */\nexport type GetPartyAPendingQuotesParameters = Compute<\n ChainIdParameter & {\n /** The partyA (virtual account, lowcap) whose pending quote ids to read. */\n partyA: Address;\n }\n>;\n\n/** Return type of {@link getPartyAPendingQuotes}: the pending quote ids. */\nexport type GetPartyAPendingQuotesReturnType = readonly bigint[];\n\n/**\n * Read the ids of a partyA's pending quotes — those in `PENDING`, `LOCKED`, or\n * `CANCEL_PENDING` status (limit orders and not-yet-opened quotes).\n *\n * The contract returns the **whole** id array with no pagination. The ids are\n * returned, not the full structs; hydrate them with {@link \"getQuote\"} (one read\n * per id, e.g. via a viem multicall).\n *\n * @param config - The SDK config.\n * @param parameters - PartyA, optional chain id.\n * @returns The pending quote ids.\n * @throws {SymmError} when the chain is not supported.\n * @throws Viem's `ContractFunctionExecutionError` and friends for on-chain failures.\n *\n * @example\n * ```ts\n * const ids = await getPartyAPendingQuotes(config, { partyA: \"0xva…\" });\n * const quotes = await Promise.all(ids.map((quoteId) => getQuote(config, { quoteId })));\n * ```\n */\nexport async function getPartyAPendingQuotes(\n config: Config,\n parameters: GetPartyAPendingQuotesParameters,\n): Promise<GetPartyAPendingQuotesReturnType> {\n const { chainId, partyA } = parameters;\n\n const { addresses } = config.getChainConfig(chainId);\n const client = config.getClient({ chainId });\n\n return client.readContract({\n address: addresses.symmioAddress,\n abi: symmioAbi,\n functionName: \"getPartyAPendingQuotes\",\n args: [partyA],\n });\n}\n"],"mappings":";;AAsCA,eAAsB,EACpB,GACA,GAC2C;CAC3C,IAAM,EAAE,YAAS,cAAW,GAEtB,EAAE,iBAAc,EAAO,eAAe,CAAO;CAGnD,OAFe,EAAO,UAAU,EAAE,WAAQ,CAEnC,EAAO,aAAa;EACzB,SAAS,EAAU;EACnB,KAAK;EACL,cAAc;EACd,MAAM,CAAC,CAAM;CACf,CAAC;AACH"}
1
+ {"version":3,"file":"get-party-a-pending-quotes.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/get-party-a-pending-quotes.ts"],"sourcesContent":["import type { Address } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { ChainIdParameter, Compute } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.6/symmio\";\n\n/**\n * Parameters for {@link getPartyAPendingQuotes}.\n */\nexport type GetPartyAPendingQuotesParameters = Compute<\n ChainIdParameter & {\n /** The partyA (virtual account, lowcap) whose pending quote ids to read. */\n partyA: Address;\n }\n>;\n\n/** Return type of {@link getPartyAPendingQuotes}: the pending quote ids. */\nexport type GetPartyAPendingQuotesReturnType = readonly bigint[];\n\n/**\n * Read the ids of a partyA's pending quotes — those in `PENDING`, `LOCKED`, or\n * `CANCEL_PENDING` status (limit orders and not-yet-opened quotes).\n *\n * The contract returns the **whole** id array with no pagination. The ids are\n * returned, not the full structs; hydrate them with {@link \"getQuote\"} (one read\n * per id, e.g. via a viem multicall).\n *\n * @param config - The SDK config.\n * @param parameters - PartyA, optional chain id.\n * @returns The pending quote ids.\n * @throws {SymmError} when the chain is not supported.\n * @throws Viem's `ContractFunctionExecutionError` and friends for on-chain failures.\n *\n * @example\n * ```ts\n * const ids = await getPartyAPendingQuotes(config, { partyA: \"0xva…\" });\n * const quotes = await Promise.all(ids.map((quoteId) => getQuote(config, { quoteId })));\n * ```\n */\nexport async function getPartyAPendingQuotes(\n config: Config,\n parameters: GetPartyAPendingQuotesParameters,\n): Promise<GetPartyAPendingQuotesReturnType> {\n const { chainId, partyA } = parameters;\n\n const { addresses } = config.getChainConfig(chainId);\n const client = config.getClient({ chainId });\n\n return client.readContract({\n address: addresses.symmioAddress,\n abi: symmioAbi,\n functionName: \"getPartyAPendingQuotes\",\n args: [partyA],\n });\n}\n"],"mappings":";;AAsCA,eAAsB,EACpB,GACA,GAC2C;CAC3C,IAAM,EAAE,YAAS,cAAW,GAEtB,EAAE,iBAAc,EAAO,eAAe,CAAO;CAGnD,OAFe,EAAO,UAAU,EAAE,WAAQ,CAEnC,EAAO,aAAa;EACzB,SAAS,EAAU;EACnB,KAAK;EACL,cAAc;EACd,MAAM,CAAC,CAAM;CACf,CAAC;AACH"}
@@ -1,4 +1,4 @@
1
- import { symmioAbi as e } from "../../abi/v0.8.5/symmio.js";
1
+ import { symmioAbi as e } from "../../abi/v0.8.6/symmio.js";
2
2
  import { getPartyAPendingQuotes as t } from "./get-party-a-pending-quotes.js";
3
3
  //#region src/symmio-contracts/symmio/actions/get-pending-quotes.ts
4
4
  var n = 10;
@@ -1 +1 @@
1
- {"version":3,"file":"get-pending-quotes.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/get-pending-quotes.ts"],"sourcesContent":["import type { Address } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { ChainIdParameter, Compute } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.5/symmio\";\nimport type { Quote } from \"../types\";\nimport { getPartyAPendingQuotes } from \"./get-party-a-pending-quotes\";\n\n/** Default number of `getQuote` reads per multicall batch. */\nconst DEFAULT_BATCH_SIZE = 10;\n\n/**\n * Parameters for {@link getPendingQuotes}.\n */\nexport type GetPendingQuotesParameters = Compute<\n ChainIdParameter & {\n /** PartyA (virtual account, or the sub-account for cross-margin) whose resting limit orders to read. */\n partyA: Address;\n /** How many `getQuote` reads to bundle per multicall. @default 10 */\n batchSize?: number;\n }\n>;\n\n/** Return type of {@link getPendingQuotes}: the hydrated resting limit-order {@link Quote} structs. */\nexport type GetPendingQuotesReturnType = Quote[];\n\n/**\n * Read a partyA's resting **LIMIT orders** as **full {@link Quote} structs**. A\n * pending quote is one that has not opened yet — in practice a limit order\n * waiting to fill (`PENDING` / `LOCKED` / `CANCEL_PENDING`), since a market order\n * never rests here.\n *\n * The contract exposes only the pending quote ids ({@link getPartyAPendingQuotes})\n * and a per-id `getQuote`, so this hydrates them: fetch the ids, then read the\n * quotes with `getQuote` bundled into **multicalls of `batchSize`** (default 10)\n * to keep each RPC round-trip small. Zeroed (`id === 0n`) entries are dropped.\n *\n * @param config - The SDK config.\n * @param parameters - PartyA, optional chain id and batch size.\n * @returns The hydrated limit orders (empty when partyA has none).\n * @throws {SymmError} when the chain is not supported.\n * @throws Viem's `ContractFunctionExecutionError` / multicall errors for on-chain failures.\n *\n * @example\n * ```ts\n * const limitOrders = await getPendingQuotes(config, { partyA: \"0xsub…\" });\n * ```\n */\nexport async function getPendingQuotes(\n config: Config,\n parameters: GetPendingQuotesParameters,\n): Promise<GetPendingQuotesReturnType> {\n const { chainId, partyA, batchSize = DEFAULT_BATCH_SIZE } = parameters;\n\n const ids = await getPartyAPendingQuotes(config, { chainId, partyA });\n if (ids.length === 0) return [];\n\n const { addresses } = config.getChainConfig(chainId);\n const client = config.getClient({ chainId });\n\n const quotes: Quote[] = [];\n for (let start = 0; start < ids.length; start += batchSize) {\n const batch = ids.slice(start, start + batchSize);\n const results = await client.multicall({\n allowFailure: false,\n contracts: batch.map(\n (quoteId) =>\n ({\n address: addresses.symmioAddress,\n abi: symmioAbi,\n functionName: \"getQuote\",\n args: [quoteId],\n }) as const,\n ),\n });\n for (const quote of results) {\n // `getQuote` returns a zeroed struct for an unknown id (ids are 1-based).\n if (quote.id !== 0n) quotes.push(quote);\n }\n }\n\n return quotes;\n}\n"],"mappings":";;;AAQA,IAAM,IAAqB;AAuC3B,eAAsB,EACpB,GACA,GACqC;CACrC,IAAM,EAAE,YAAS,WAAQ,eAAY,MAAuB,GAEtD,IAAM,MAAM,EAAuB,GAAQ;EAAE;EAAS;CAAO,CAAC;CACpE,IAAI,EAAI,WAAW,GAAG,OAAO,CAAC;CAE9B,IAAM,EAAE,iBAAc,EAAO,eAAe,CAAO,GAC7C,IAAS,EAAO,UAAU,EAAE,WAAQ,CAAC,GAErC,IAAkB,CAAC;CACzB,KAAK,IAAI,IAAQ,GAAG,IAAQ,EAAI,QAAQ,KAAS,GAAW;EAC1D,IAAM,IAAQ,EAAI,MAAM,GAAO,IAAQ,CAAS,GAC1C,IAAU,MAAM,EAAO,UAAU;GACrC,cAAc;GACd,WAAW,EAAM,KACd,OACE;IACC,SAAS,EAAU;IACnB,KAAK;IACL,cAAc;IACd,MAAM,CAAC,CAAO;GAChB,EACJ;EACF,CAAC;EACD,KAAK,IAAM,KAAS,GAElB,AAAI,EAAM,OAAO,MAAI,EAAO,KAAK,CAAK;CAE1C;CAEA,OAAO;AACT"}
1
+ {"version":3,"file":"get-pending-quotes.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/get-pending-quotes.ts"],"sourcesContent":["import type { Address } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { ChainIdParameter, Compute } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.6/symmio\";\nimport type { Quote } from \"../types\";\nimport { getPartyAPendingQuotes } from \"./get-party-a-pending-quotes\";\n\n/** Default number of `getQuote` reads per multicall batch. */\nconst DEFAULT_BATCH_SIZE = 10;\n\n/**\n * Parameters for {@link getPendingQuotes}.\n */\nexport type GetPendingQuotesParameters = Compute<\n ChainIdParameter & {\n /** PartyA (virtual account, or the sub-account for cross-margin) whose resting limit orders to read. */\n partyA: Address;\n /** How many `getQuote` reads to bundle per multicall. @default 10 */\n batchSize?: number;\n }\n>;\n\n/** Return type of {@link getPendingQuotes}: the hydrated resting limit-order {@link Quote} structs. */\nexport type GetPendingQuotesReturnType = Quote[];\n\n/**\n * Read a partyA's resting **LIMIT orders** as **full {@link Quote} structs**. A\n * pending quote is one that has not opened yet — in practice a limit order\n * waiting to fill (`PENDING` / `LOCKED` / `CANCEL_PENDING`), since a market order\n * never rests here.\n *\n * The contract exposes only the pending quote ids ({@link getPartyAPendingQuotes})\n * and a per-id `getQuote`, so this hydrates them: fetch the ids, then read the\n * quotes with `getQuote` bundled into **multicalls of `batchSize`** (default 10)\n * to keep each RPC round-trip small. Zeroed (`id === 0n`) entries are dropped.\n *\n * @param config - The SDK config.\n * @param parameters - PartyA, optional chain id and batch size.\n * @returns The hydrated limit orders (empty when partyA has none).\n * @throws {SymmError} when the chain is not supported.\n * @throws Viem's `ContractFunctionExecutionError` / multicall errors for on-chain failures.\n *\n * @example\n * ```ts\n * const limitOrders = await getPendingQuotes(config, { partyA: \"0xsub…\" });\n * ```\n */\nexport async function getPendingQuotes(\n config: Config,\n parameters: GetPendingQuotesParameters,\n): Promise<GetPendingQuotesReturnType> {\n const { chainId, partyA, batchSize = DEFAULT_BATCH_SIZE } = parameters;\n\n const ids = await getPartyAPendingQuotes(config, { chainId, partyA });\n if (ids.length === 0) return [];\n\n const { addresses } = config.getChainConfig(chainId);\n const client = config.getClient({ chainId });\n\n const quotes: Quote[] = [];\n for (let start = 0; start < ids.length; start += batchSize) {\n const batch = ids.slice(start, start + batchSize);\n const results = await client.multicall({\n allowFailure: false,\n contracts: batch.map(\n (quoteId) =>\n ({\n address: addresses.symmioAddress,\n abi: symmioAbi,\n functionName: \"getQuote\",\n args: [quoteId],\n }) as const,\n ),\n });\n for (const quote of results) {\n // `getQuote` returns a zeroed struct for an unknown id (ids are 1-based).\n if (quote.id !== 0n) quotes.push(quote);\n }\n }\n\n return quotes;\n}\n"],"mappings":";;;AAQA,IAAM,IAAqB;AAuC3B,eAAsB,EACpB,GACA,GACqC;CACrC,IAAM,EAAE,YAAS,WAAQ,eAAY,MAAuB,GAEtD,IAAM,MAAM,EAAuB,GAAQ;EAAE;EAAS;CAAO,CAAC;CACpE,IAAI,EAAI,WAAW,GAAG,OAAO,CAAC;CAE9B,IAAM,EAAE,iBAAc,EAAO,eAAe,CAAO,GAC7C,IAAS,EAAO,UAAU,EAAE,WAAQ,CAAC,GAErC,IAAkB,CAAC;CACzB,KAAK,IAAI,IAAQ,GAAG,IAAQ,EAAI,QAAQ,KAAS,GAAW;EAC1D,IAAM,IAAQ,EAAI,MAAM,GAAO,IAAQ,CAAS,GAC1C,IAAU,MAAM,EAAO,UAAU;GACrC,cAAc;GACd,WAAW,EAAM,KACd,OACE;IACC,SAAS,EAAU;IACnB,KAAK;IACL,cAAc;IACd,MAAM,CAAC,CAAO;GAChB,EACJ;EACF,CAAC;EACD,KAAK,IAAM,KAAS,GAElB,AAAI,EAAM,OAAO,MAAI,EAAO,KAAK,CAAK;CAE1C;CAEA,OAAO;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-pending-withdraw-requests.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/symmio/actions/get-pending-withdraw-requests.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAElF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG,OAAO,CACxD,gBAAgB,GAAG;IACjB,qDAAqD;IACrD,IAAI,EAAE,OAAO,CAAC;IACd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CACF,CAAC;AAEF,6FAA6F;AAC7F,MAAM,MAAM,oCAAoC,GAAG,SAAS,eAAe,EAAE,CAAC;AAE9E;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,oCAAoC,GAC/C,OAAO,CAAC,oCAAoC,CAAC,CAY/C"}
1
+ {"version":3,"file":"get-pending-withdraw-requests.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/symmio/actions/get-pending-withdraw-requests.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAGlF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG,OAAO,CACxD,gBAAgB,GAAG;IACjB,qDAAqD;IACrD,IAAI,EAAE,OAAO,CAAC;IACd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CACF,CAAC;AAEF,6FAA6F;AAC7F,MAAM,MAAM,oCAAoC,GAAG,SAAS,eAAe,EAAE,CAAC;AAE9E;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,oCAAoC,GAC/C,OAAO,CAAC,oCAAoC,CAAC,CAmB/C"}
@@ -1,19 +1,20 @@
1
- import { symmioAbi as e } from "../../abi/v0.8.5/symmio.js";
1
+ import { symmioAbi as e } from "../../abi/v0.8.6/symmio.js";
2
+ import { getPendingWithdrawRequestsAbiV085 as t } from "../internal/withdraw-requests-v0-8-5.js";
2
3
  //#region src/symmio-contracts/symmio/actions/get-pending-withdraw-requests.ts
3
- async function t(t, n) {
4
- let { chainId: r, user: i, start: a = 1n, size: o = 200n } = n, { addresses: s } = t.getChainConfig(r);
5
- return t.getClient({ chainId: r }).readContract({
6
- address: s.symmioAddress,
7
- abi: e,
4
+ async function n(n, r) {
5
+ let { chainId: i, user: a, start: o = 1n, size: s = 200n } = r, { addresses: c, contractsVersion: l } = n.getChainConfig(i), u = n.getClient({ chainId: i }), d = l === "0.8.5" ? t : e;
6
+ return u.readContract({
7
+ address: c.symmioAddress,
8
+ abi: d,
8
9
  functionName: "getPendingWithdrawRequests",
9
10
  args: [
10
- i,
11
11
  a,
12
- o
12
+ o,
13
+ s
13
14
  ]
14
15
  });
15
16
  }
16
17
  //#endregion
17
- export { t as getPendingWithdrawRequests };
18
+ export { n as getPendingWithdrawRequests };
18
19
 
19
20
  //# sourceMappingURL=get-pending-withdraw-requests.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-pending-withdraw-requests.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/get-pending-withdraw-requests.ts"],"sourcesContent":["import type { Address } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { ChainIdParameter, Compute } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.5/symmio\";\nimport type { WithdrawRequest } from \"../types\";\n\n/**\n * Parameters for {@link getPendingWithdrawRequests}.\n */\nexport type GetPendingWithdrawRequestsParameters = Compute<\n ChainIdParameter & {\n /** The subaccount whose pending requests to list. */\n user: Address;\n /**\n * First request id to scan (inclusive). Request ids start at 1.\n * @default 1n\n */\n start?: bigint;\n /**\n * Number of request ids to scan from `start`. The returned array contains only\n * the non-terminal requests found in that range, so its length may be smaller.\n * @default 200n\n */\n size?: bigint;\n }\n>;\n\n/** Return type of {@link getPendingWithdrawRequests}: the non-terminal requests in range. */\nexport type GetPendingWithdrawRequestsReturnType = readonly WithdrawRequest[];\n\n/**\n * List a subaccount's non-terminal (active) withdraw requests within a paginated\n * id range.\n *\n * Only requests with status `PENDING`, `PROVIDER_ACCEPTED`, `CANCEL_REQUESTED`, or\n * `SUSPENDED` are returned; `COMPLETED`, `CANCELLED`, and `PROVIDER_REJECTED` are\n * excluded. Call {@link \"getLastWithdrawRequestId\"} first to size the range.\n *\n * @param config - The SDK config.\n * @param parameters - Subaccount, optional pagination (`start`/`size`), optional chain id.\n * @returns The active withdraw requests found in the scanned range.\n * @throws {SymmError} when the chain is not supported.\n * @throws Viem's `ContractFunctionExecutionError` and friends for on-chain failures.\n *\n * @example\n * ```ts\n * const pending = await getPendingWithdrawRequests(config, { user: \"0xsub…\" });\n * ```\n */\nexport async function getPendingWithdrawRequests(\n config: Config,\n parameters: GetPendingWithdrawRequestsParameters,\n): Promise<GetPendingWithdrawRequestsReturnType> {\n const { chainId, user, start = 1n, size = 200n } = parameters;\n\n const { addresses } = config.getChainConfig(chainId);\n const client = config.getClient({ chainId });\n\n return client.readContract({\n address: addresses.symmioAddress,\n abi: symmioAbi,\n functionName: \"getPendingWithdrawRequests\",\n args: [user, start, size],\n });\n}\n"],"mappings":";;AAiDA,eAAsB,EACpB,GACA,GAC+C;CAC/C,IAAM,EAAE,YAAS,SAAM,WAAQ,IAAI,UAAO,SAAS,GAE7C,EAAE,iBAAc,EAAO,eAAe,CAAO;CAGnD,OAFe,EAAO,UAAU,EAAE,WAAQ,CAEnC,EAAO,aAAa;EACzB,SAAS,EAAU;EACnB,KAAK;EACL,cAAc;EACd,MAAM;GAAC;GAAM;GAAO;EAAI;CAC1B,CAAC;AACH"}
1
+ {"version":3,"file":"get-pending-withdraw-requests.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/get-pending-withdraw-requests.ts"],"sourcesContent":["import type { Address } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { ChainIdParameter, Compute } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.6/symmio\";\nimport { getPendingWithdrawRequestsAbiV085 } from \"../internal/withdraw-requests-v0-8-5\";\nimport type { WithdrawRequest } from \"../types\";\n\n/**\n * Parameters for {@link getPendingWithdrawRequests}.\n */\nexport type GetPendingWithdrawRequestsParameters = Compute<\n ChainIdParameter & {\n /** The subaccount whose pending requests to list. */\n user: Address;\n /**\n * First request id to scan (inclusive). Request ids start at 1.\n * @default 1n\n */\n start?: bigint;\n /**\n * Number of request ids to scan from `start`. The returned array contains only\n * the non-terminal requests found in that range, so its length may be smaller.\n * @default 200n\n */\n size?: bigint;\n }\n>;\n\n/** Return type of {@link getPendingWithdrawRequests}: the non-terminal requests in range. */\nexport type GetPendingWithdrawRequestsReturnType = readonly WithdrawRequest[];\n\n/**\n * List a subaccount's non-terminal (active) withdraw requests within a paginated\n * id range.\n *\n * Only requests with status `PENDING`, `PROVIDER_ACCEPTED`, `CANCEL_REQUESTED`, or\n * `SUSPENDED` are returned; `COMPLETED`, `CANCELLED`, and `PROVIDER_REJECTED` are\n * excluded. Call {@link \"getLastWithdrawRequestId\"} first to size the range.\n *\n * @param config - The SDK config.\n * @param parameters - Subaccount, optional pagination (`start`/`size`), optional chain id.\n * @returns The active withdraw requests found in the scanned range.\n * @throws {SymmError} when the chain is not supported.\n * @throws Viem's `ContractFunctionExecutionError` and friends for on-chain failures.\n *\n * @example\n * ```ts\n * const pending = await getPendingWithdrawRequests(config, { user: \"0xsub…\" });\n * ```\n */\nexport async function getPendingWithdrawRequests(\n config: Config,\n parameters: GetPendingWithdrawRequestsParameters,\n): Promise<GetPendingWithdrawRequestsReturnType> {\n const { chainId, user, start = 1n, size = 200n } = parameters;\n\n const { addresses, contractsVersion } = config.getChainConfig(chainId);\n const client = config.getClient({ chainId });\n\n /**\n * The output struct grew in v0.8.6 (`advancedAmount`), so a v0.8.5 chain's\n * response is decoded with the v0.8.5 fragment and returned as-is —\n * `advancedAmount` stays `undefined` there, per the version-grown-field rule.\n */\n const abi = contractsVersion === \"0.8.5\" ? getPendingWithdrawRequestsAbiV085 : symmioAbi;\n\n return client.readContract({\n address: addresses.symmioAddress,\n abi,\n functionName: \"getPendingWithdrawRequests\",\n args: [user, start, size],\n });\n}\n"],"mappings":";;;AAkDA,eAAsB,EACpB,GACA,GAC+C;CAC/C,IAAM,EAAE,YAAS,SAAM,WAAQ,IAAI,UAAO,SAAS,GAE7C,EAAE,cAAW,wBAAqB,EAAO,eAAe,CAAO,GAC/D,IAAS,EAAO,UAAU,EAAE,WAAQ,CAAC,GAOrC,IAAM,MAAqB,UAAU,IAAoC;CAE/E,OAAO,EAAO,aAAa;EACzB,SAAS,EAAU;EACnB;EACA,cAAc;EACd,MAAM;GAAC;GAAM;GAAO;EAAI;CAC1B,CAAC;AACH"}
@@ -1,4 +1,4 @@
1
- import { symmioAbi as e } from "../../abi/v0.8.5/symmio.js";
1
+ import { symmioAbi as e } from "../../abi/v0.8.6/symmio.js";
2
2
  //#region src/symmio-contracts/symmio/actions/get-quote.ts
3
3
  async function t(t, n) {
4
4
  let { chainId: r, quoteId: i } = n, { addresses: a } = t.getChainConfig(r), o = await t.getClient({ chainId: r }).readContract({
@@ -1 +1 @@
1
- {"version":3,"file":"get-quote.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/get-quote.ts"],"sourcesContent":["import type { Config } from \"../../../core/config\";\nimport type { ChainIdParameter, Compute } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.5/symmio\";\nimport type { Quote } from \"../types\";\n\n/**\n * Parameters for {@link getQuote}.\n */\nexport type GetQuoteParameters = Compute<\n ChainIdParameter & {\n /** The quote id to read. Quote ids are 1-based. */\n quoteId: bigint;\n }\n>;\n\n/** Return type of {@link getQuote}: the quote, or `null` when no quote has that id. */\nexport type GetQuoteReturnType = Quote | null;\n\n/**\n * Read a single {@link Quote} by id.\n *\n * The underlying view reads a storage mapping and does **not** revert for an\n * unknown id — it returns a zeroed struct. Because quote ids start at 1, a result\n * with `id === 0n` means \"not found\"; this action maps that sentinel to `null`.\n *\n * @param config - The SDK config.\n * @param parameters - Quote id, optional chain id.\n * @returns The quote, or `null` if no quote exists with that id.\n * @throws {SymmError} when the chain is not supported.\n * @throws Viem's `ContractFunctionExecutionError` and friends for on-chain failures.\n *\n * @example\n * ```ts\n * const quote = await getQuote(config, { quoteId: 42n });\n * if (quote) console.log(quote.quoteStatus);\n * ```\n */\nexport async function getQuote(config: Config, parameters: GetQuoteParameters): Promise<GetQuoteReturnType> {\n const { chainId, quoteId } = parameters;\n\n const { addresses } = config.getChainConfig(chainId);\n const client = config.getClient({ chainId });\n\n const quote = await client.readContract({\n address: addresses.symmioAddress,\n abi: symmioAbi,\n functionName: \"getQuote\",\n args: [quoteId],\n });\n\n return quote.id === 0n ? null : quote;\n}\n"],"mappings":";;AAqCA,eAAsB,EAAS,GAAgB,GAA6D;CAC1G,IAAM,EAAE,YAAS,eAAY,GAEvB,EAAE,iBAAc,EAAO,eAAe,CAAO,GAG7C,IAAQ,MAFC,EAAO,UAAU,EAAE,WAAQ,CAEtB,EAAO,aAAa;EACtC,SAAS,EAAU;EACnB,KAAK;EACL,cAAc;EACd,MAAM,CAAC,CAAO;CAChB,CAAC;CAED,OAAO,EAAM,OAAO,KAAK,OAAO;AAClC"}
1
+ {"version":3,"file":"get-quote.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/get-quote.ts"],"sourcesContent":["import type { Config } from \"../../../core/config\";\nimport type { ChainIdParameter, Compute } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.6/symmio\";\nimport type { Quote } from \"../types\";\n\n/**\n * Parameters for {@link getQuote}.\n */\nexport type GetQuoteParameters = Compute<\n ChainIdParameter & {\n /** The quote id to read. Quote ids are 1-based. */\n quoteId: bigint;\n }\n>;\n\n/** Return type of {@link getQuote}: the quote, or `null` when no quote has that id. */\nexport type GetQuoteReturnType = Quote | null;\n\n/**\n * Read a single {@link Quote} by id.\n *\n * The underlying view reads a storage mapping and does **not** revert for an\n * unknown id — it returns a zeroed struct. Because quote ids start at 1, a result\n * with `id === 0n` means \"not found\"; this action maps that sentinel to `null`.\n *\n * @param config - The SDK config.\n * @param parameters - Quote id, optional chain id.\n * @returns The quote, or `null` if no quote exists with that id.\n * @throws {SymmError} when the chain is not supported.\n * @throws Viem's `ContractFunctionExecutionError` and friends for on-chain failures.\n *\n * @example\n * ```ts\n * const quote = await getQuote(config, { quoteId: 42n });\n * if (quote) console.log(quote.quoteStatus);\n * ```\n */\nexport async function getQuote(config: Config, parameters: GetQuoteParameters): Promise<GetQuoteReturnType> {\n const { chainId, quoteId } = parameters;\n\n const { addresses } = config.getChainConfig(chainId);\n const client = config.getClient({ chainId });\n\n const quote = await client.readContract({\n address: addresses.symmioAddress,\n abi: symmioAbi,\n functionName: \"getQuote\",\n args: [quoteId],\n });\n\n return quote.id === 0n ? null : quote;\n}\n"],"mappings":";;AAqCA,eAAsB,EAAS,GAAgB,GAA6D;CAC1G,IAAM,EAAE,YAAS,eAAY,GAEvB,EAAE,iBAAc,EAAO,eAAe,CAAO,GAG7C,IAAQ,MAFC,EAAO,UAAU,EAAE,WAAQ,CAEtB,EAAO,aAAa;EACtC,SAAS,EAAU;EACnB,KAAK;EACL,cAAc;EACd,MAAM,CAAC,CAAO;CAChB,CAAC;CAED,OAAO,EAAM,OAAO,KAAK,OAAO;AAClC"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-withdraw-requests.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/symmio/actions/get-withdraw-requests.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAElF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,OAAO,CACjD,gBAAgB,GAAG;IACjB,4CAA4C;IAC5C,IAAI,EAAE,OAAO,CAAC;IACd,iEAAiE;IACjE,SAAS,EAAE,MAAM,CAAC;CACnB,CACF,CAAC;AAEF,6EAA6E;AAC7E,MAAM,MAAM,6BAA6B,GAAG,eAAe,CAAC;AAE5D;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,6BAA6B,GACxC,OAAO,CAAC,6BAA6B,CAAC,CAYxC"}
1
+ {"version":3,"file":"get-withdraw-requests.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/symmio/actions/get-withdraw-requests.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAGlF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,OAAO,CACjD,gBAAgB,GAAG;IACjB,4CAA4C;IAC5C,IAAI,EAAE,OAAO,CAAC;IACd,iEAAiE;IACjE,SAAS,EAAE,MAAM,CAAC;CACnB,CACF,CAAC;AAEF,6EAA6E;AAC7E,MAAM,MAAM,6BAA6B,GAAG,eAAe,CAAC;AAE5D;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,6BAA6B,GACxC,OAAO,CAAC,6BAA6B,CAAC,CAmBxC"}
@@ -1,15 +1,16 @@
1
- import { symmioAbi as e } from "../../abi/v0.8.5/symmio.js";
1
+ import { symmioAbi as e } from "../../abi/v0.8.6/symmio.js";
2
+ import { getWithdrawRequestsAbiV085 as t } from "../internal/withdraw-requests-v0-8-5.js";
2
3
  //#region src/symmio-contracts/symmio/actions/get-withdraw-requests.ts
3
- async function t(t, n) {
4
- let { chainId: r, user: i, requestId: a } = n, { addresses: o } = t.getChainConfig(r);
5
- return t.getClient({ chainId: r }).readContract({
6
- address: o.symmioAddress,
7
- abi: e,
4
+ async function n(n, r) {
5
+ let { chainId: i, user: a, requestId: o } = r, { addresses: s, contractsVersion: c } = n.getChainConfig(i), l = n.getClient({ chainId: i }), u = c === "0.8.5" ? t : e;
6
+ return l.readContract({
7
+ address: s.symmioAddress,
8
+ abi: u,
8
9
  functionName: "getWithdrawRequests",
9
- args: [i, a]
10
+ args: [a, o]
10
11
  });
11
12
  }
12
13
  //#endregion
13
- export { t as getWithdrawRequests };
14
+ export { n as getWithdrawRequests };
14
15
 
15
16
  //# sourceMappingURL=get-withdraw-requests.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-withdraw-requests.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/get-withdraw-requests.ts"],"sourcesContent":["import type { Address } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { ChainIdParameter, Compute } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.5/symmio\";\nimport type { WithdrawRequest } from \"../types\";\n\n/**\n * Parameters for {@link getWithdrawRequests}.\n */\nexport type GetWithdrawRequestsParameters = Compute<\n ChainIdParameter & {\n /** The subaccount whose request to read. */\n user: Address;\n /** Id of the withdraw request (1-based, sequential per user). */\n requestId: bigint;\n }\n>;\n\n/** Return type of {@link getWithdrawRequests}: a single withdraw request. */\nexport type GetWithdrawRequestsReturnType = WithdrawRequest;\n\n/**\n * Read a single withdraw request by `user` and `requestId`.\n *\n * Mirrors the SYMMIO core view function name exactly (it returns one request\n * despite the plural). Use {@link \"getLastWithdrawRequestId\"} to discover the id\n * range and {@link \"getPendingWithdrawRequests\"} to list active ones.\n *\n * @param config - The SDK config.\n * @param parameters - Subaccount, request id, optional chain id.\n * @returns The withdraw request, including its {@link WithdrawStatus} and `cooldownEndTime`.\n * @throws {SymmError} when the chain is not supported.\n * @throws Viem's `ContractFunctionExecutionError` and friends for on-chain failures.\n *\n * @example\n * ```ts\n * const request = await getWithdrawRequests(config, { user: \"0xsub…\", requestId: 1n });\n * ```\n */\nexport async function getWithdrawRequests(\n config: Config,\n parameters: GetWithdrawRequestsParameters,\n): Promise<GetWithdrawRequestsReturnType> {\n const { chainId, user, requestId } = parameters;\n\n const { addresses } = config.getChainConfig(chainId);\n const client = config.getClient({ chainId });\n\n return client.readContract({\n address: addresses.symmioAddress,\n abi: symmioAbi,\n functionName: \"getWithdrawRequests\",\n args: [user, requestId],\n });\n}\n"],"mappings":";;AAuCA,eAAsB,EACpB,GACA,GACwC;CACxC,IAAM,EAAE,YAAS,SAAM,iBAAc,GAE/B,EAAE,iBAAc,EAAO,eAAe,CAAO;CAGnD,OAFe,EAAO,UAAU,EAAE,WAAQ,CAEnC,EAAO,aAAa;EACzB,SAAS,EAAU;EACnB,KAAK;EACL,cAAc;EACd,MAAM,CAAC,GAAM,CAAS;CACxB,CAAC;AACH"}
1
+ {"version":3,"file":"get-withdraw-requests.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/get-withdraw-requests.ts"],"sourcesContent":["import type { Address } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { ChainIdParameter, Compute } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.6/symmio\";\nimport { getWithdrawRequestsAbiV085 } from \"../internal/withdraw-requests-v0-8-5\";\nimport type { WithdrawRequest } from \"../types\";\n\n/**\n * Parameters for {@link getWithdrawRequests}.\n */\nexport type GetWithdrawRequestsParameters = Compute<\n ChainIdParameter & {\n /** The subaccount whose request to read. */\n user: Address;\n /** Id of the withdraw request (1-based, sequential per user). */\n requestId: bigint;\n }\n>;\n\n/** Return type of {@link getWithdrawRequests}: a single withdraw request. */\nexport type GetWithdrawRequestsReturnType = WithdrawRequest;\n\n/**\n * Read a single withdraw request by `user` and `requestId`.\n *\n * Mirrors the SYMMIO core view function name exactly (it returns one request\n * despite the plural). Use {@link \"getLastWithdrawRequestId\"} to discover the id\n * range and {@link \"getPendingWithdrawRequests\"} to list active ones.\n *\n * @param config - The SDK config.\n * @param parameters - Subaccount, request id, optional chain id.\n * @returns The withdraw request, including its {@link WithdrawStatus} and `cooldownEndTime`.\n * @throws {SymmError} when the chain is not supported.\n * @throws Viem's `ContractFunctionExecutionError` and friends for on-chain failures.\n *\n * @example\n * ```ts\n * const request = await getWithdrawRequests(config, { user: \"0xsub…\", requestId: 1n });\n * ```\n */\nexport async function getWithdrawRequests(\n config: Config,\n parameters: GetWithdrawRequestsParameters,\n): Promise<GetWithdrawRequestsReturnType> {\n const { chainId, user, requestId } = parameters;\n\n const { addresses, contractsVersion } = config.getChainConfig(chainId);\n const client = config.getClient({ chainId });\n\n /**\n * The output struct grew in v0.8.6 (`advancedAmount`), so a v0.8.5 chain's\n * response is decoded with the v0.8.5 fragment and returned as-is —\n * `advancedAmount` stays `undefined` there, per the version-grown-field rule.\n */\n const abi = contractsVersion === \"0.8.5\" ? getWithdrawRequestsAbiV085 : symmioAbi;\n\n return client.readContract({\n address: addresses.symmioAddress,\n abi,\n functionName: \"getWithdrawRequests\",\n args: [user, requestId],\n });\n}\n"],"mappings":";;;AAwCA,eAAsB,EACpB,GACA,GACwC;CACxC,IAAM,EAAE,YAAS,SAAM,iBAAc,GAE/B,EAAE,cAAW,wBAAqB,EAAO,eAAe,CAAO,GAC/D,IAAS,EAAO,UAAU,EAAE,WAAQ,CAAC,GAOrC,IAAM,MAAqB,UAAU,IAA6B;CAExE,OAAO,EAAO,aAAa;EACzB,SAAS,EAAU;EACnB;EACA,cAAc;EACd,MAAM,CAAC,GAAM,CAAS;CACxB,CAAC;AACH"}
@@ -1,4 +1,4 @@
1
- import { symmioAbi as e } from "../../abi/v0.8.5/symmio.js";
1
+ import { symmioAbi as e } from "../../abi/v0.8.6/symmio.js";
2
2
  //#region src/symmio-contracts/symmio/actions/get-withdrawable-time.ts
3
3
  async function t(t, n) {
4
4
  let { chainId: r, user: i } = n, { addresses: a } = t.getChainConfig(r);
@@ -1 +1 @@
1
- {"version":3,"file":"get-withdrawable-time.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/get-withdrawable-time.ts"],"sourcesContent":["import type { Address } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { ChainIdParameter, Compute } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.5/symmio\";\n\n/**\n * Parameters for {@link getWithdrawableTime}.\n */\nexport type GetWithdrawableTimeParameters = Compute<\n ChainIdParameter & {\n /** The subaccount whose earliest withdrawable time to read. */\n user: Address;\n }\n>;\n\n/**\n * Return type of {@link getWithdrawableTime}: a Unix timestamp (seconds) as a\n * `bigint`.\n */\nexport type GetWithdrawableTimeReturnType = bigint;\n\n/**\n * Read the earliest timestamp at which a withdrawal initiated now could be\n * finalized for a subaccount.\n *\n * Returns `max(lastDeallocation + cooldownPeriod, block.timestamp)` — because the\n * cooldown is tied to the last deallocation, a subaccount whose funds have been\n * idle past the cooldown can finalize immediately. Useful to render a\n * \"withdrawable at …\" hint before {@link \"initiateWithdraw\"}.\n *\n * @param config - The SDK config.\n * @param parameters - Subaccount, optional chain id.\n * @returns The earliest finalizable timestamp, in seconds.\n * @throws {SymmError} when the chain is not supported.\n * @throws Viem's `ContractFunctionExecutionError` and friends for on-chain failures.\n *\n * @example\n * ```ts\n * const at = await getWithdrawableTime(config, { user: \"0xsub…\" });\n * ```\n */\nexport async function getWithdrawableTime(\n config: Config,\n parameters: GetWithdrawableTimeParameters,\n): Promise<GetWithdrawableTimeReturnType> {\n const { chainId, user } = parameters;\n\n const { addresses } = config.getChainConfig(chainId);\n const client = config.getClient({ chainId });\n\n return client.readContract({\n address: addresses.symmioAddress,\n abi: symmioAbi,\n functionName: \"getWithdrawableTime\",\n args: [user],\n });\n}\n"],"mappings":";;AAyCA,eAAsB,EACpB,GACA,GACwC;CACxC,IAAM,EAAE,YAAS,YAAS,GAEpB,EAAE,iBAAc,EAAO,eAAe,CAAO;CAGnD,OAFe,EAAO,UAAU,EAAE,WAAQ,CAEnC,EAAO,aAAa;EACzB,SAAS,EAAU;EACnB,KAAK;EACL,cAAc;EACd,MAAM,CAAC,CAAI;CACb,CAAC;AACH"}
1
+ {"version":3,"file":"get-withdrawable-time.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/get-withdrawable-time.ts"],"sourcesContent":["import type { Address } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { ChainIdParameter, Compute } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.6/symmio\";\n\n/**\n * Parameters for {@link getWithdrawableTime}.\n */\nexport type GetWithdrawableTimeParameters = Compute<\n ChainIdParameter & {\n /** The subaccount whose earliest withdrawable time to read. */\n user: Address;\n }\n>;\n\n/**\n * Return type of {@link getWithdrawableTime}: a Unix timestamp (seconds) as a\n * `bigint`.\n */\nexport type GetWithdrawableTimeReturnType = bigint;\n\n/**\n * Read the earliest timestamp at which a withdrawal initiated now could be\n * finalized for a subaccount.\n *\n * Returns `max(lastDeallocation + cooldownPeriod, block.timestamp)` — because the\n * cooldown is tied to the last deallocation, a subaccount whose funds have been\n * idle past the cooldown can finalize immediately. Useful to render a\n * \"withdrawable at …\" hint before {@link \"initiateWithdraw\"}.\n *\n * @param config - The SDK config.\n * @param parameters - Subaccount, optional chain id.\n * @returns The earliest finalizable timestamp, in seconds.\n * @throws {SymmError} when the chain is not supported.\n * @throws Viem's `ContractFunctionExecutionError` and friends for on-chain failures.\n *\n * @example\n * ```ts\n * const at = await getWithdrawableTime(config, { user: \"0xsub…\" });\n * ```\n */\nexport async function getWithdrawableTime(\n config: Config,\n parameters: GetWithdrawableTimeParameters,\n): Promise<GetWithdrawableTimeReturnType> {\n const { chainId, user } = parameters;\n\n const { addresses } = config.getChainConfig(chainId);\n const client = config.getClient({ chainId });\n\n return client.readContract({\n address: addresses.symmioAddress,\n abi: symmioAbi,\n functionName: \"getWithdrawableTime\",\n args: [user],\n });\n}\n"],"mappings":";;AAyCA,eAAsB,EACpB,GACA,GACwC;CACxC,IAAM,EAAE,YAAS,YAAS,GAEpB,EAAE,iBAAc,EAAO,eAAe,CAAO;CAGnD,OAFe,EAAO,UAAU,EAAE,WAAQ,CAEnC,EAAO,aAAa;EACzB,SAAS,EAAU;EACnB,KAAK;EACL,cAAc;EACd,MAAM,CAAC,CAAI;CACb,CAAC;AACH"}
@@ -60,7 +60,7 @@ export type InitiateWithdrawReturnType = Hash;
60
60
  *
61
61
  * @example
62
62
  * ```ts
63
- * const part = createClassicWithdrawPart({ id: 0n, amount: 1_000000n, receiver: "0xabc…", chainId: 999n });
63
+ * const part = createClassicWithdrawPart({ id: 0n, amount: 1_000000n, receiver: "0xabc…", chainId: 42161n });
64
64
  * const hash = await initiateWithdraw(config, { account: "0xsub…", parts: [part] });
65
65
  * ```
66
66
  */
@@ -1,4 +1,4 @@
1
- import { symmioAbi as e } from "../../abi/v0.8.5/symmio.js";
1
+ import { symmioAbi as e } from "../../abi/v0.8.6/symmio.js";
2
2
  import { callAsSubAccount as t } from "../internal/call-as-sub-account.js";
3
3
  import { encodeFunctionData as n } from "viem";
4
4
  //#region src/symmio-contracts/symmio/actions/initiate-withdraw.ts
@@ -1 +1 @@
1
- {"version":3,"file":"initiate-withdraw.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/initiate-withdraw.ts"],"sourcesContent":["import { encodeFunctionData, type Address, type Hash, type Hex } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { Compute, WriteContractParameter } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.5/symmio\";\nimport { callAsSubAccount } from \"../internal/call-as-sub-account\";\nimport type { WithdrawReceiverPart } from \"../types\";\n\n/**\n * Parameters for {@link initiateWithdraw}.\n */\nexport type InitiateWithdrawParameters = Compute<\n WriteContractParameter & {\n /**\n * The subaccount initiating the withdrawal. The call is routed through the\n * AccountLayer `_call` proxy so the core sees this subaccount as the caller;\n * the connected wallet must be its on-chain `owner`.\n */\n account: Address;\n /**\n * The receiver parts the withdrawal is split into. A plain same-chain\n * withdrawal is a single part with both provider fields set to the zero\n * address — see `createClassicWithdrawPart`.\n */\n parts: readonly WithdrawReceiverPart[];\n /**\n * Opt into the cooldown speed-up flow. Only effective for speed-up-eligible\n * users; ignored otherwise.\n * @default false\n */\n speedUp?: boolean;\n /**\n * Opaque provider data forwarded to express/virtual providers (e.g. a signed\n * option). Pass `0x` for a classic withdrawal.\n * @default \"0x\"\n */\n providerData?: Hex;\n }\n>;\n\n/** Return type of {@link initiateWithdraw}: the submitted transaction hash. */\nexport type InitiateWithdrawReturnType = Hash;\n\n/**\n * Open a withdraw request for a subaccount.\n *\n * Encodes the SYMMIO core `initiateWithdraw(parts, speedUp, data)` call and routes\n * it through `AccountLayer._call(account, …)` so the core attributes the request\n * to `account`. The request matures after the cooldown (tied to the subaccount's\n * last deallocation) and is then completed with {@link finalizeWithdrawRequest}.\n *\n * Dry-runs the call with {@link simulateInitiateWithdraw} first unless\n * `simulateBeforeWrite` is `false` (per-call, falling back to the config default).\n *\n * @remarks\n * The full input surface is exposed: provider fields on each part plus `speedUp`\n * and `providerData` enable express/virtual/cross-chain withdrawals where\n * providers are available. For a standard same-chain withdrawal, pass a single\n * classic part and leave `speedUp`/`providerData` at their defaults.\n *\n * @param config - The SDK config (must have a `getWalletClient` resolver).\n * @param parameters - Subaccount, receiver parts, optional speed-up / provider data, optional chain id.\n * @returns The submitted transaction hash. The caller waits on the receipt; the\n * created `requestId` is available from the receipt's events or via\n * `getLastWithdrawRequestId`.\n * @throws {SymmError} when the chain is unsupported or no wallet is available.\n * @throws Viem's write errors (`ContractFunctionExecutionError`, ...).\n *\n * @example\n * ```ts\n * const part = createClassicWithdrawPart({ id: 0n, amount: 1_000000n, receiver: \"0xabc…\", chainId: 999n });\n * const hash = await initiateWithdraw(config, { account: \"0xsub…\", parts: [part] });\n * ```\n */\nexport async function initiateWithdraw(\n config: Config,\n parameters: InitiateWithdrawParameters,\n): Promise<InitiateWithdrawReturnType> {\n const { chainId, account, parts, speedUp = false, providerData = \"0x\" } = parameters;\n\n const data = encodeFunctionData({\n abi: symmioAbi,\n functionName: \"initiateWithdraw\",\n args: [parts, speedUp, providerData],\n });\n\n return callAsSubAccount(config, {\n account,\n data,\n chainId,\n from: parameters.from,\n simulateBeforeWrite: parameters.simulateBeforeWrite,\n });\n}\n"],"mappings":";;;;AAyEA,eAAsB,EACpB,GACA,GACqC;CACrC,IAAM,EAAE,YAAS,YAAS,UAAO,aAAU,IAAO,kBAAe,SAAS;CAQ1E,OAAO,EAAiB,GAAQ;EAC9B;EACA,MARW,EAAmB;GAC9B,KAAK;GACL,cAAc;GACd,MAAM;IAAC;IAAO;IAAS;GAAY;EACrC,CAIE;EACA;EACA,MAAM,EAAW;EACjB,qBAAqB,EAAW;CAClC,CAAC;AACH"}
1
+ {"version":3,"file":"initiate-withdraw.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/initiate-withdraw.ts"],"sourcesContent":["import { encodeFunctionData, type Address, type Hash, type Hex } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { Compute, WriteContractParameter } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.6/symmio\";\nimport { callAsSubAccount } from \"../internal/call-as-sub-account\";\nimport type { WithdrawReceiverPart } from \"../types\";\n\n/**\n * Parameters for {@link initiateWithdraw}.\n */\nexport type InitiateWithdrawParameters = Compute<\n WriteContractParameter & {\n /**\n * The subaccount initiating the withdrawal. The call is routed through the\n * AccountLayer `_call` proxy so the core sees this subaccount as the caller;\n * the connected wallet must be its on-chain `owner`.\n */\n account: Address;\n /**\n * The receiver parts the withdrawal is split into. A plain same-chain\n * withdrawal is a single part with both provider fields set to the zero\n * address — see `createClassicWithdrawPart`.\n */\n parts: readonly WithdrawReceiverPart[];\n /**\n * Opt into the cooldown speed-up flow. Only effective for speed-up-eligible\n * users; ignored otherwise.\n * @default false\n */\n speedUp?: boolean;\n /**\n * Opaque provider data forwarded to express/virtual providers (e.g. a signed\n * option). Pass `0x` for a classic withdrawal.\n * @default \"0x\"\n */\n providerData?: Hex;\n }\n>;\n\n/** Return type of {@link initiateWithdraw}: the submitted transaction hash. */\nexport type InitiateWithdrawReturnType = Hash;\n\n/**\n * Open a withdraw request for a subaccount.\n *\n * Encodes the SYMMIO core `initiateWithdraw(parts, speedUp, data)` call and routes\n * it through `AccountLayer._call(account, …)` so the core attributes the request\n * to `account`. The request matures after the cooldown (tied to the subaccount's\n * last deallocation) and is then completed with {@link finalizeWithdrawRequest}.\n *\n * Dry-runs the call with {@link simulateInitiateWithdraw} first unless\n * `simulateBeforeWrite` is `false` (per-call, falling back to the config default).\n *\n * @remarks\n * The full input surface is exposed: provider fields on each part plus `speedUp`\n * and `providerData` enable express/virtual/cross-chain withdrawals where\n * providers are available. For a standard same-chain withdrawal, pass a single\n * classic part and leave `speedUp`/`providerData` at their defaults.\n *\n * @param config - The SDK config (must have a `getWalletClient` resolver).\n * @param parameters - Subaccount, receiver parts, optional speed-up / provider data, optional chain id.\n * @returns The submitted transaction hash. The caller waits on the receipt; the\n * created `requestId` is available from the receipt's events or via\n * `getLastWithdrawRequestId`.\n * @throws {SymmError} when the chain is unsupported or no wallet is available.\n * @throws Viem's write errors (`ContractFunctionExecutionError`, ...).\n *\n * @example\n * ```ts\n * const part = createClassicWithdrawPart({ id: 0n, amount: 1_000000n, receiver: \"0xabc…\", chainId: 42161n });\n * const hash = await initiateWithdraw(config, { account: \"0xsub…\", parts: [part] });\n * ```\n */\nexport async function initiateWithdraw(\n config: Config,\n parameters: InitiateWithdrawParameters,\n): Promise<InitiateWithdrawReturnType> {\n const { chainId, account, parts, speedUp = false, providerData = \"0x\" } = parameters;\n\n const data = encodeFunctionData({\n abi: symmioAbi,\n functionName: \"initiateWithdraw\",\n args: [parts, speedUp, providerData],\n });\n\n return callAsSubAccount(config, {\n account,\n data,\n chainId,\n from: parameters.from,\n simulateBeforeWrite: parameters.simulateBeforeWrite,\n });\n}\n"],"mappings":";;;;AAyEA,eAAsB,EACpB,GACA,GACqC;CACrC,IAAM,EAAE,YAAS,YAAS,UAAO,aAAU,IAAO,kBAAe,SAAS;CAQ1E,OAAO,EAAiB,GAAQ;EAC9B;EACA,MARW,EAAmB;GAC9B,KAAK;GACL,cAAc;GACd,MAAM;IAAC;IAAO;IAAS;GAAY;EACrC,CAIE;EACA;EACA,MAAM,EAAW;EACjB,qBAAqB,EAAW;CAClC,CAAC;AACH"}
@@ -1,4 +1,4 @@
1
- import { symmioAbi as e } from "../../abi/v0.8.5/symmio.js";
1
+ import { symmioAbi as e } from "../../abi/v0.8.6/symmio.js";
2
2
  import { callAsSubAccount as t } from "../internal/call-as-sub-account.js";
3
3
  import { encodeFunctionData as n } from "viem";
4
4
  //#region src/symmio-contracts/symmio/actions/request-cancel-withdraw.ts