@symmio/trading-core 3.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (650) hide show
  1. package/dist/core/chains/types.d.ts +197 -0
  2. package/dist/core/chains/types.d.ts.map +1 -1
  3. package/dist/core/chains/types.js.map +1 -1
  4. package/dist/core/config/merge-chain-config.d.ts.map +1 -1
  5. package/dist/core/config/merge-chain-config.js +49 -19
  6. package/dist/core/config/merge-chain-config.js.map +1 -1
  7. package/dist/gasless/abortable-sleep.d.ts +17 -0
  8. package/dist/gasless/abortable-sleep.d.ts.map +1 -0
  9. package/dist/gasless/abortable-sleep.js +21 -0
  10. package/dist/gasless/abortable-sleep.js.map +1 -0
  11. package/dist/gasless/assert-gateway-coherence.d.ts +20 -0
  12. package/dist/gasless/assert-gateway-coherence.d.ts.map +1 -0
  13. package/dist/gasless/assert-gateway-coherence.js +26 -0
  14. package/dist/gasless/assert-gateway-coherence.js.map +1 -0
  15. package/dist/gasless/batch/calls.d.ts +121 -0
  16. package/dist/gasless/batch/calls.d.ts.map +1 -0
  17. package/dist/gasless/batch/calls.js +36 -0
  18. package/dist/gasless/batch/calls.js.map +1 -0
  19. package/dist/gasless/batch/index.d.ts +2 -0
  20. package/dist/gasless/batch/index.d.ts.map +1 -0
  21. package/dist/gasless/batch/resolve-gasless-batch.d.ts +118 -0
  22. package/dist/gasless/batch/resolve-gasless-batch.d.ts.map +1 -0
  23. package/dist/gasless/batch/resolve-gasless-batch.js +89 -0
  24. package/dist/gasless/batch/resolve-gasless-batch.js.map +1 -0
  25. package/dist/gasless/classify-gasless-failure.d.ts +99 -0
  26. package/dist/gasless/classify-gasless-failure.d.ts.map +1 -0
  27. package/dist/gasless/classify-gasless-failure.js +60 -0
  28. package/dist/gasless/classify-gasless-failure.js.map +1 -0
  29. package/dist/gasless/confirm-gasless-request/confirm-gasless-request.d.ts +121 -0
  30. package/dist/gasless/confirm-gasless-request/confirm-gasless-request.d.ts.map +1 -0
  31. package/dist/gasless/confirm-gasless-request/confirm-gasless-request.js +73 -0
  32. package/dist/gasless/confirm-gasless-request/confirm-gasless-request.js.map +1 -0
  33. package/dist/gasless/confirm-gasless-request/index.d.ts +2 -0
  34. package/dist/gasless/confirm-gasless-request/index.d.ts.map +1 -0
  35. package/dist/gasless/constants.d.ts +24 -0
  36. package/dist/gasless/constants.d.ts.map +1 -0
  37. package/dist/gasless/constants.js +6 -0
  38. package/dist/gasless/constants.js.map +1 -0
  39. package/dist/gasless/delegation-preflight.d.ts +39 -0
  40. package/dist/gasless/delegation-preflight.d.ts.map +1 -0
  41. package/dist/gasless/delegation-preflight.js +33 -0
  42. package/dist/gasless/delegation-preflight.js.map +1 -0
  43. package/dist/gasless/dispatch/maybe-relay-as-gasless.d.ts +73 -0
  44. package/dist/gasless/dispatch/maybe-relay-as-gasless.d.ts.map +1 -0
  45. package/dist/gasless/dispatch/maybe-relay-as-gasless.js +189 -0
  46. package/dist/gasless/dispatch/maybe-relay-as-gasless.js.map +1 -0
  47. package/dist/gasless/eip712.d.ts +79 -0
  48. package/dist/gasless/eip712.d.ts.map +1 -0
  49. package/dist/gasless/eip712.js +60 -0
  50. package/dist/gasless/eip712.js.map +1 -0
  51. package/dist/gasless/errors.d.ts +132 -0
  52. package/dist/gasless/errors.d.ts.map +1 -0
  53. package/dist/gasless/errors.js +110 -0
  54. package/dist/gasless/errors.js.map +1 -0
  55. package/dist/gasless/events.d.ts +37 -0
  56. package/dist/gasless/events.d.ts.map +1 -0
  57. package/dist/gasless/events.js +34 -0
  58. package/dist/gasless/events.js.map +1 -0
  59. package/dist/gasless/fallback.d.ts +58 -0
  60. package/dist/gasless/fallback.d.ts.map +1 -0
  61. package/dist/gasless/fallback.js +34 -0
  62. package/dist/gasless/fallback.js.map +1 -0
  63. package/dist/gasless/format-gasless-operation.d.ts +37 -0
  64. package/dist/gasless/format-gasless-operation.d.ts.map +1 -0
  65. package/dist/gasless/format-gasless-operation.js +33 -0
  66. package/dist/gasless/format-gasless-operation.js.map +1 -0
  67. package/dist/gasless/gasless-url.d.ts +82 -0
  68. package/dist/gasless/gasless-url.d.ts.map +1 -0
  69. package/dist/gasless/gasless-url.js +70 -0
  70. package/dist/gasless/gasless-url.js.map +1 -0
  71. package/dist/gasless/gasless-wallet-execute/calls.d.ts +73 -0
  72. package/dist/gasless/gasless-wallet-execute/calls.d.ts.map +1 -0
  73. package/dist/gasless/gasless-wallet-execute/calls.js +24 -0
  74. package/dist/gasless/gasless-wallet-execute/calls.js.map +1 -0
  75. package/dist/gasless/gasless-wallet-execute/gasless-wallet-execute.d.ts +148 -0
  76. package/dist/gasless/gasless-wallet-execute/gasless-wallet-execute.d.ts.map +1 -0
  77. package/dist/gasless/gasless-wallet-execute/gasless-wallet-execute.js +120 -0
  78. package/dist/gasless/gasless-wallet-execute/gasless-wallet-execute.js.map +1 -0
  79. package/dist/gasless/gasless-wallet-execute/index.d.ts +5 -0
  80. package/dist/gasless/gasless-wallet-execute/index.d.ts.map +1 -0
  81. package/dist/gasless/gasless-wallet-execute/query.d.ts +18 -0
  82. package/dist/gasless/gasless-wallet-execute/query.d.ts.map +1 -0
  83. package/dist/gasless/gasless-wallet-execute/query.js +12 -0
  84. package/dist/gasless/gasless-wallet-execute/query.js.map +1 -0
  85. package/dist/gasless/gasless-wallet-execute/selectors.d.ts +38 -0
  86. package/dist/gasless/gasless-wallet-execute/selectors.d.ts.map +1 -0
  87. package/dist/gasless/gasless-wallet-execute/selectors.js +15 -0
  88. package/dist/gasless/gasless-wallet-execute/selectors.js.map +1 -0
  89. package/dist/gasless/get-gasless-batch-fee-quote/get-gasless-batch-fee-quote.d.ts +72 -0
  90. package/dist/gasless/get-gasless-batch-fee-quote/get-gasless-batch-fee-quote.d.ts.map +1 -0
  91. package/dist/gasless/get-gasless-batch-fee-quote/get-gasless-batch-fee-quote.js +42 -0
  92. package/dist/gasless/get-gasless-batch-fee-quote/get-gasless-batch-fee-quote.js.map +1 -0
  93. package/dist/gasless/get-gasless-batch-fee-quote/index.d.ts +3 -0
  94. package/dist/gasless/get-gasless-batch-fee-quote/index.d.ts.map +1 -0
  95. package/dist/gasless/get-gasless-batch-fee-quote/query.d.ts +47 -0
  96. package/dist/gasless/get-gasless-batch-fee-quote/query.d.ts.map +1 -0
  97. package/dist/gasless/get-gasless-batch-fee-quote/query.js +50 -0
  98. package/dist/gasless/get-gasless-batch-fee-quote/query.js.map +1 -0
  99. package/dist/gasless/get-gasless-deposit-policy/get-gasless-deposit-policy.d.ts +80 -0
  100. package/dist/gasless/get-gasless-deposit-policy/get-gasless-deposit-policy.d.ts.map +1 -0
  101. package/dist/gasless/get-gasless-deposit-policy/get-gasless-deposit-policy.js +61 -0
  102. package/dist/gasless/get-gasless-deposit-policy/get-gasless-deposit-policy.js.map +1 -0
  103. package/dist/gasless/get-gasless-deposit-policy/index.d.ts +3 -0
  104. package/dist/gasless/get-gasless-deposit-policy/index.d.ts.map +1 -0
  105. package/dist/gasless/get-gasless-deposit-policy/query.d.ts +51 -0
  106. package/dist/gasless/get-gasless-deposit-policy/query.d.ts.map +1 -0
  107. package/dist/gasless/get-gasless-deposit-policy/query.js +25 -0
  108. package/dist/gasless/get-gasless-deposit-policy/query.js.map +1 -0
  109. package/dist/gasless/get-gasless-fee-quote/encode-relay-batch-call-data.d.ts +27 -0
  110. package/dist/gasless/get-gasless-fee-quote/encode-relay-batch-call-data.d.ts.map +1 -0
  111. package/dist/gasless/get-gasless-fee-quote/encode-relay-batch-call-data.js +22 -0
  112. package/dist/gasless/get-gasless-fee-quote/encode-relay-batch-call-data.js.map +1 -0
  113. package/dist/gasless/get-gasless-fee-quote/fee-quote-errors.d.ts +61 -0
  114. package/dist/gasless/get-gasless-fee-quote/fee-quote-errors.d.ts.map +1 -0
  115. package/dist/gasless/get-gasless-fee-quote/fee-quote-errors.js +59 -0
  116. package/dist/gasless/get-gasless-fee-quote/fee-quote-errors.js.map +1 -0
  117. package/dist/gasless/get-gasless-fee-quote/get-gasless-fee-quote.d.ts +79 -0
  118. package/dist/gasless/get-gasless-fee-quote/get-gasless-fee-quote.d.ts.map +1 -0
  119. package/dist/gasless/get-gasless-fee-quote/get-gasless-fee-quote.js +53 -0
  120. package/dist/gasless/get-gasless-fee-quote/get-gasless-fee-quote.js.map +1 -0
  121. package/dist/gasless/get-gasless-fee-quote/index.d.ts +4 -0
  122. package/dist/gasless/get-gasless-fee-quote/index.d.ts.map +1 -0
  123. package/dist/gasless/get-gasless-fee-quote/query.d.ts +41 -0
  124. package/dist/gasless/get-gasless-fee-quote/query.d.ts.map +1 -0
  125. package/dist/gasless/get-gasless-fee-quote/query.js +31 -0
  126. package/dist/gasless/get-gasless-fee-quote/query.js.map +1 -0
  127. package/dist/gasless/get-gasless-request/get-gasless-request.d.ts +51 -0
  128. package/dist/gasless/get-gasless-request/get-gasless-request.d.ts.map +1 -0
  129. package/dist/gasless/get-gasless-request/get-gasless-request.js +15 -0
  130. package/dist/gasless/get-gasless-request/get-gasless-request.js.map +1 -0
  131. package/dist/gasless/get-gasless-request/index.d.ts +4 -0
  132. package/dist/gasless/get-gasless-request/index.d.ts.map +1 -0
  133. package/dist/gasless/get-gasless-request/query.d.ts +64 -0
  134. package/dist/gasless/get-gasless-request/query.d.ts.map +1 -0
  135. package/dist/gasless/get-gasless-request/query.js +42 -0
  136. package/dist/gasless/get-gasless-request/query.js.map +1 -0
  137. package/dist/gasless/get-gasless-request/to-gasless-request.d.ts +26 -0
  138. package/dist/gasless/get-gasless-request/to-gasless-request.d.ts.map +1 -0
  139. package/dist/gasless/get-gasless-request/to-gasless-request.js +62 -0
  140. package/dist/gasless/get-gasless-request/to-gasless-request.js.map +1 -0
  141. package/dist/gasless/get-gasless-request-transactions/get-gasless-request-transactions.d.ts +40 -0
  142. package/dist/gasless/get-gasless-request-transactions/get-gasless-request-transactions.d.ts.map +1 -0
  143. package/dist/gasless/get-gasless-request-transactions/get-gasless-request-transactions.js +15 -0
  144. package/dist/gasless/get-gasless-request-transactions/get-gasless-request-transactions.js.map +1 -0
  145. package/dist/gasless/get-gasless-request-transactions/index.d.ts +4 -0
  146. package/dist/gasless/get-gasless-request-transactions/index.d.ts.map +1 -0
  147. package/dist/gasless/get-gasless-request-transactions/query.d.ts +75 -0
  148. package/dist/gasless/get-gasless-request-transactions/query.d.ts.map +1 -0
  149. package/dist/gasless/get-gasless-request-transactions/query.js +37 -0
  150. package/dist/gasless/get-gasless-request-transactions/query.js.map +1 -0
  151. package/dist/gasless/get-gasless-request-transactions/to-gasless-request-transaction.d.ts +21 -0
  152. package/dist/gasless/get-gasless-request-transactions/to-gasless-request-transaction.d.ts.map +1 -0
  153. package/dist/gasless/get-gasless-request-transactions/to-gasless-request-transaction.js +27 -0
  154. package/dist/gasless/get-gasless-request-transactions/to-gasless-request-transaction.js.map +1 -0
  155. package/dist/gasless/get-gasless-wallet-address/get-gasless-wallet-address.d.ts +48 -0
  156. package/dist/gasless/get-gasless-wallet-address/get-gasless-wallet-address.d.ts.map +1 -0
  157. package/dist/gasless/get-gasless-wallet-address/get-gasless-wallet-address.js +20 -0
  158. package/dist/gasless/get-gasless-wallet-address/get-gasless-wallet-address.js.map +1 -0
  159. package/dist/gasless/get-gasless-wallet-address/index.d.ts +3 -0
  160. package/dist/gasless/get-gasless-wallet-address/index.d.ts.map +1 -0
  161. package/dist/gasless/get-gasless-wallet-address/query.d.ts +46 -0
  162. package/dist/gasless/get-gasless-wallet-address/query.d.ts.map +1 -0
  163. package/dist/gasless/get-gasless-wallet-address/query.js +25 -0
  164. package/dist/gasless/get-gasless-wallet-address/query.js.map +1 -0
  165. package/dist/gasless/get-gasless-wallet-creation-fee/get-gasless-wallet-creation-fee.d.ts +57 -0
  166. package/dist/gasless/get-gasless-wallet-creation-fee/get-gasless-wallet-creation-fee.d.ts.map +1 -0
  167. package/dist/gasless/get-gasless-wallet-creation-fee/get-gasless-wallet-creation-fee.js +17 -0
  168. package/dist/gasless/get-gasless-wallet-creation-fee/get-gasless-wallet-creation-fee.js.map +1 -0
  169. package/dist/gasless/get-gasless-wallet-creation-fee/index.d.ts +3 -0
  170. package/dist/gasless/get-gasless-wallet-creation-fee/index.d.ts.map +1 -0
  171. package/dist/gasless/get-gasless-wallet-creation-fee/query.d.ts +51 -0
  172. package/dist/gasless/get-gasless-wallet-creation-fee/query.d.ts.map +1 -0
  173. package/dist/gasless/get-gasless-wallet-creation-fee/query.js +25 -0
  174. package/dist/gasless/get-gasless-wallet-creation-fee/query.js.map +1 -0
  175. package/dist/gasless/get-gasless-wallet-nonce/get-gasless-wallet-nonce.d.ts +51 -0
  176. package/dist/gasless/get-gasless-wallet-nonce/get-gasless-wallet-nonce.d.ts.map +1 -0
  177. package/dist/gasless/get-gasless-wallet-nonce/get-gasless-wallet-nonce.js +21 -0
  178. package/dist/gasless/get-gasless-wallet-nonce/get-gasless-wallet-nonce.js.map +1 -0
  179. package/dist/gasless/get-gasless-wallet-nonce/index.d.ts +3 -0
  180. package/dist/gasless/get-gasless-wallet-nonce/index.d.ts.map +1 -0
  181. package/dist/gasless/get-gasless-wallet-nonce/query.d.ts +47 -0
  182. package/dist/gasless/get-gasless-wallet-nonce/query.d.ts.map +1 -0
  183. package/dist/gasless/get-gasless-wallet-nonce/query.js +25 -0
  184. package/dist/gasless/get-gasless-wallet-nonce/query.js.map +1 -0
  185. package/dist/gasless/get-session-key-selectors.d.ts +83 -0
  186. package/dist/gasless/get-session-key-selectors.d.ts.map +1 -0
  187. package/dist/gasless/get-session-key-selectors.js +25 -0
  188. package/dist/gasless/get-session-key-selectors.js.map +1 -0
  189. package/dist/gasless/http.d.ts +229 -0
  190. package/dist/gasless/http.d.ts.map +1 -0
  191. package/dist/gasless/http.js +165 -0
  192. package/dist/gasless/http.js.map +1 -0
  193. package/dist/gasless/index.d.ts +34 -0
  194. package/dist/gasless/index.d.ts.map +1 -0
  195. package/dist/gasless/is-newer-gasless-request.d.ts +32 -0
  196. package/dist/gasless/is-newer-gasless-request.d.ts.map +1 -0
  197. package/dist/gasless/is-newer-gasless-request.js +21 -0
  198. package/dist/gasless/is-newer-gasless-request.js.map +1 -0
  199. package/dist/gasless/nonce-lock.d.ts +180 -0
  200. package/dist/gasless/nonce-lock.d.ts.map +1 -0
  201. package/dist/gasless/nonce-lock.js +102 -0
  202. package/dist/gasless/nonce-lock.js.map +1 -0
  203. package/dist/gasless/observe-gasless-request.d.ts +65 -0
  204. package/dist/gasless/observe-gasless-request.d.ts.map +1 -0
  205. package/dist/gasless/observe-gasless-request.js +56 -0
  206. package/dist/gasless/observe-gasless-request.js.map +1 -0
  207. package/dist/gasless/query-poll-delay.d.ts +39 -0
  208. package/dist/gasless/query-poll-delay.d.ts.map +1 -0
  209. package/dist/gasless/query-poll-delay.js +14 -0
  210. package/dist/gasless/query-poll-delay.js.map +1 -0
  211. package/dist/gasless/relay-gasless-batch/index.d.ts +3 -0
  212. package/dist/gasless/relay-gasless-batch/index.d.ts.map +1 -0
  213. package/dist/gasless/relay-gasless-batch/query.d.ts +18 -0
  214. package/dist/gasless/relay-gasless-batch/query.d.ts.map +1 -0
  215. package/dist/gasless/relay-gasless-batch/query.js +12 -0
  216. package/dist/gasless/relay-gasless-batch/query.js.map +1 -0
  217. package/dist/gasless/relay-gasless-batch/relay-gasless-batch.d.ts +106 -0
  218. package/dist/gasless/relay-gasless-batch/relay-gasless-batch.d.ts.map +1 -0
  219. package/dist/gasless/relay-gasless-batch/relay-gasless-batch.js +145 -0
  220. package/dist/gasless/relay-gasless-batch/relay-gasless-batch.js.map +1 -0
  221. package/dist/gasless/relay-gasless-batch/sign-gasless-batch.d.ts +36 -0
  222. package/dist/gasless/relay-gasless-batch/sign-gasless-batch.d.ts.map +1 -0
  223. package/dist/gasless/relay-gasless-batch/sign-gasless-batch.js +24 -0
  224. package/dist/gasless/relay-gasless-batch/sign-gasless-batch.js.map +1 -0
  225. package/dist/gasless/relay-grant-delegation/index.d.ts +3 -0
  226. package/dist/gasless/relay-grant-delegation/index.d.ts.map +1 -0
  227. package/dist/gasless/relay-grant-delegation/query.d.ts +18 -0
  228. package/dist/gasless/relay-grant-delegation/query.d.ts.map +1 -0
  229. package/dist/gasless/relay-grant-delegation/query.js +12 -0
  230. package/dist/gasless/relay-grant-delegation/query.js.map +1 -0
  231. package/dist/gasless/relay-grant-delegation/relay-grant-delegation.d.ts +69 -0
  232. package/dist/gasless/relay-grant-delegation/relay-grant-delegation.d.ts.map +1 -0
  233. package/dist/gasless/relay-grant-delegation/relay-grant-delegation.js +57 -0
  234. package/dist/gasless/relay-grant-delegation/relay-grant-delegation.js.map +1 -0
  235. package/dist/gasless/relay-instant-operations/index.d.ts +3 -0
  236. package/dist/gasless/relay-instant-operations/index.d.ts.map +1 -0
  237. package/dist/gasless/relay-instant-operations/query.d.ts +18 -0
  238. package/dist/gasless/relay-instant-operations/query.d.ts.map +1 -0
  239. package/dist/gasless/relay-instant-operations/query.js +12 -0
  240. package/dist/gasless/relay-instant-operations/query.js.map +1 -0
  241. package/dist/gasless/relay-instant-operations/relay-instant-operations.d.ts +127 -0
  242. package/dist/gasless/relay-instant-operations/relay-instant-operations.d.ts.map +1 -0
  243. package/dist/gasless/relay-instant-operations/relay-instant-operations.js +42 -0
  244. package/dist/gasless/relay-instant-operations/relay-instant-operations.js.map +1 -0
  245. package/dist/gasless/relayable-writes.d.ts +163 -0
  246. package/dist/gasless/relayable-writes.d.ts.map +1 -0
  247. package/dist/gasless/relayable-writes.js +113 -0
  248. package/dist/gasless/relayable-writes.js.map +1 -0
  249. package/dist/gasless/resolve-gasless.d.ts +52 -0
  250. package/dist/gasless/resolve-gasless.d.ts.map +1 -0
  251. package/dist/gasless/resolve-gasless.js +19 -0
  252. package/dist/gasless/resolve-gasless.js.map +1 -0
  253. package/dist/gasless/resolve-wallet-identities.d.ts +30 -0
  254. package/dist/gasless/resolve-wallet-identities.d.ts.map +1 -0
  255. package/dist/gasless/resolve-wallet-identities.js +21 -0
  256. package/dist/gasless/resolve-wallet-identities.js.map +1 -0
  257. package/dist/gasless/resubmit-gasless-request/index.d.ts +3 -0
  258. package/dist/gasless/resubmit-gasless-request/index.d.ts.map +1 -0
  259. package/dist/gasless/resubmit-gasless-request/query.d.ts +19 -0
  260. package/dist/gasless/resubmit-gasless-request/query.d.ts.map +1 -0
  261. package/dist/gasless/resubmit-gasless-request/query.js +12 -0
  262. package/dist/gasless/resubmit-gasless-request/query.js.map +1 -0
  263. package/dist/gasless/resubmit-gasless-request/resubmit-gasless-request.d.ts +50 -0
  264. package/dist/gasless/resubmit-gasless-request/resubmit-gasless-request.d.ts.map +1 -0
  265. package/dist/gasless/resubmit-gasless-request/resubmit-gasless-request.js +52 -0
  266. package/dist/gasless/resubmit-gasless-request/resubmit-gasless-request.js.map +1 -0
  267. package/dist/gasless/settle-gasless-deposit-existing-account/index.d.ts +3 -0
  268. package/dist/gasless/settle-gasless-deposit-existing-account/index.d.ts.map +1 -0
  269. package/dist/gasless/settle-gasless-deposit-existing-account/query.d.ts +18 -0
  270. package/dist/gasless/settle-gasless-deposit-existing-account/query.d.ts.map +1 -0
  271. package/dist/gasless/settle-gasless-deposit-existing-account/query.js +12 -0
  272. package/dist/gasless/settle-gasless-deposit-existing-account/query.js.map +1 -0
  273. package/dist/gasless/settle-gasless-deposit-existing-account/settle-gasless-deposit-existing-account.d.ts +66 -0
  274. package/dist/gasless/settle-gasless-deposit-existing-account/settle-gasless-deposit-existing-account.d.ts.map +1 -0
  275. package/dist/gasless/settle-gasless-deposit-existing-account/settle-gasless-deposit-existing-account.js +36 -0
  276. package/dist/gasless/settle-gasless-deposit-existing-account/settle-gasless-deposit-existing-account.js.map +1 -0
  277. package/dist/gasless/settle-gasless-deposit-new-account/index.d.ts +3 -0
  278. package/dist/gasless/settle-gasless-deposit-new-account/index.d.ts.map +1 -0
  279. package/dist/gasless/settle-gasless-deposit-new-account/query.d.ts +18 -0
  280. package/dist/gasless/settle-gasless-deposit-new-account/query.d.ts.map +1 -0
  281. package/dist/gasless/settle-gasless-deposit-new-account/query.js +12 -0
  282. package/dist/gasless/settle-gasless-deposit-new-account/query.js.map +1 -0
  283. package/dist/gasless/settle-gasless-deposit-new-account/settle-gasless-deposit-new-account.d.ts +106 -0
  284. package/dist/gasless/settle-gasless-deposit-new-account/settle-gasless-deposit-new-account.d.ts.map +1 -0
  285. package/dist/gasless/settle-gasless-deposit-new-account/settle-gasless-deposit-new-account.js +43 -0
  286. package/dist/gasless/settle-gasless-deposit-new-account/settle-gasless-deposit-new-account.js.map +1 -0
  287. package/dist/gasless/status-read-limiter.d.ts +44 -0
  288. package/dist/gasless/status-read-limiter.d.ts.map +1 -0
  289. package/dist/gasless/status-read-limiter.js +28 -0
  290. package/dist/gasless/status-read-limiter.js.map +1 -0
  291. package/dist/gasless/to-gasless-deposit-receipt.d.ts +61 -0
  292. package/dist/gasless/to-gasless-deposit-receipt.d.ts.map +1 -0
  293. package/dist/gasless/to-gasless-deposit-receipt.js +36 -0
  294. package/dist/gasless/to-gasless-deposit-receipt.js.map +1 -0
  295. package/dist/gasless/to-gasless-submit-receipt.d.ts +60 -0
  296. package/dist/gasless/to-gasless-submit-receipt.d.ts.map +1 -0
  297. package/dist/gasless/to-gasless-submit-receipt.js +26 -0
  298. package/dist/gasless/to-gasless-submit-receipt.js.map +1 -0
  299. package/dist/gasless/transient-read.d.ts +32 -0
  300. package/dist/gasless/transient-read.d.ts.map +1 -0
  301. package/dist/gasless/transient-read.js +28 -0
  302. package/dist/gasless/transient-read.js.map +1 -0
  303. package/dist/gasless/types/generated/gasless-deposits.d.ts +170 -0
  304. package/dist/gasless/types/generated/gasless-deposits.d.ts.map +1 -0
  305. package/dist/gasless/types/generated/gasless-operations.d.ts +260 -0
  306. package/dist/gasless/types/generated/gasless-operations.d.ts.map +1 -0
  307. package/dist/gasless/types.d.ts +493 -0
  308. package/dist/gasless/types.d.ts.map +1 -0
  309. package/dist/gasless/types.js +33 -0
  310. package/dist/gasless/types.js.map +1 -0
  311. package/dist/gasless/unconfirmed-submit.d.ts +132 -0
  312. package/dist/gasless/unconfirmed-submit.d.ts.map +1 -0
  313. package/dist/gasless/unconfirmed-submit.js +49 -0
  314. package/dist/gasless/unconfirmed-submit.js.map +1 -0
  315. package/dist/gasless/wait-for-gasless-request/index.d.ts +2 -0
  316. package/dist/gasless/wait-for-gasless-request/index.d.ts.map +1 -0
  317. package/dist/gasless/wait-for-gasless-request/wait-for-gasless-request.d.ts +114 -0
  318. package/dist/gasless/wait-for-gasless-request/wait-for-gasless-request.d.ts.map +1 -0
  319. package/dist/gasless/wait-for-gasless-request/wait-for-gasless-request.js +77 -0
  320. package/dist/gasless/wait-for-gasless-request/wait-for-gasless-request.js.map +1 -0
  321. package/dist/gasless/wallet-id.d.ts +42 -0
  322. package/dist/gasless/wallet-id.d.ts.map +1 -0
  323. package/dist/gasless/wallet-id.js +25 -0
  324. package/dist/gasless/wallet-id.js.map +1 -0
  325. package/dist/gasless/wire-parse.d.ts +33 -0
  326. package/dist/gasless/wire-parse.d.ts.map +1 -0
  327. package/dist/gasless/wire-parse.js +14 -0
  328. package/dist/gasless/wire-parse.js.map +1 -0
  329. package/dist/gasless/wire-types.d.ts +73 -0
  330. package/dist/gasless/wire-types.d.ts.map +1 -0
  331. package/dist/gasless/write-request-registry.d.ts +56 -0
  332. package/dist/gasless/write-request-registry.d.ts.map +1 -0
  333. package/dist/gasless/write-request-registry.js +22 -0
  334. package/dist/gasless/write-request-registry.js.map +1 -0
  335. package/dist/index.d.ts +82 -17
  336. package/dist/index.d.ts.map +1 -1
  337. package/dist/index.js +568 -497
  338. package/dist/pools/listing-config/to-listing-config.js +2 -2
  339. package/dist/pools/listing-config/to-listing-config.js.map +1 -1
  340. package/dist/pools/market-detail/to-listing-market-detail.d.ts.map +1 -1
  341. package/dist/pools/market-detail/to-listing-market-detail.js +46 -40
  342. package/dist/pools/market-detail/to-listing-market-detail.js.map +1 -1
  343. package/dist/pools/markets/to-listing-market.d.ts.map +1 -1
  344. package/dist/pools/markets/to-listing-market.js +2 -1
  345. package/dist/pools/markets/to-listing-market.js.map +1 -1
  346. package/dist/pools/types/generated/listing-backend.d.ts +163 -16
  347. package/dist/pools/types/generated/listing-backend.d.ts.map +1 -1
  348. package/dist/pools/types/generated/listing-backend.js.map +1 -1
  349. package/dist/pools/types.d.ts +52 -2
  350. package/dist/pools/types.d.ts.map +1 -1
  351. package/dist/pools/types.js +6 -4
  352. package/dist/pools/types.js.map +1 -1
  353. package/dist/quotes/get-quote-funding/get-quote-funding.d.ts +3 -2
  354. package/dist/quotes/get-quote-funding/get-quote-funding.d.ts.map +1 -1
  355. package/dist/quotes/get-quote-funding/get-quote-funding.js.map +1 -1
  356. package/dist/quotes/get-quote-funding/types.d.ts +4 -2
  357. package/dist/quotes/get-quote-funding/types.d.ts.map +1 -1
  358. package/dist/quotes/get-quote-pending-funding/get-quote-pending-funding.d.ts +68 -0
  359. package/dist/quotes/get-quote-pending-funding/get-quote-pending-funding.d.ts.map +1 -0
  360. package/dist/quotes/get-quote-pending-funding/get-quote-pending-funding.js +34 -0
  361. package/dist/quotes/get-quote-pending-funding/get-quote-pending-funding.js.map +1 -0
  362. package/dist/quotes/get-quote-pending-funding/index.d.ts +4 -0
  363. package/dist/quotes/get-quote-pending-funding/index.d.ts.map +1 -0
  364. package/dist/quotes/get-quote-pending-funding/query.d.ts +58 -0
  365. package/dist/quotes/get-quote-pending-funding/query.d.ts.map +1 -0
  366. package/dist/quotes/get-quote-pending-funding/query.js +27 -0
  367. package/dist/quotes/get-quote-pending-funding/query.js.map +1 -0
  368. package/dist/quotes/get-quote-pending-funding/types.d.ts +19 -0
  369. package/dist/quotes/get-quote-pending-funding/types.d.ts.map +1 -0
  370. package/dist/quotes/get-quotes-events-by-type/get-quotes-events-by-type.d.ts +2 -1
  371. package/dist/quotes/get-quotes-events-by-type/get-quotes-events-by-type.d.ts.map +1 -1
  372. package/dist/quotes/get-quotes-events-by-type/get-quotes-events-by-type.js.map +1 -1
  373. package/dist/quotes/grouping/aggregate-group-funding.d.ts +9 -8
  374. package/dist/quotes/grouping/aggregate-group-funding.d.ts.map +1 -1
  375. package/dist/quotes/grouping/aggregate-group-funding.js.map +1 -1
  376. package/dist/quotes/grouping/partition-quotes.d.ts +30 -0
  377. package/dist/quotes/grouping/partition-quotes.d.ts.map +1 -1
  378. package/dist/quotes/grouping/partition-quotes.js +9 -6
  379. package/dist/quotes/grouping/partition-quotes.js.map +1 -1
  380. package/dist/quotes/index.d.ts +1 -0
  381. package/dist/quotes/index.d.ts.map +1 -1
  382. package/dist/quotes/unified-quote.d.ts +6 -6
  383. package/dist/quotes/unified-quote.js.map +1 -1
  384. package/dist/shared/errors/redact-url.d.ts +15 -0
  385. package/dist/shared/errors/redact-url.d.ts.map +1 -0
  386. package/dist/shared/errors/redact-url.js +9 -0
  387. package/dist/shared/errors/redact-url.js.map +1 -0
  388. package/dist/shared/errors/retry-after.d.ts +17 -0
  389. package/dist/shared/errors/retry-after.d.ts.map +1 -0
  390. package/dist/shared/errors/retry-after.js +16 -0
  391. package/dist/shared/errors/retry-after.js.map +1 -0
  392. package/dist/shared/errors/sanitized-api-error.d.ts +32 -0
  393. package/dist/shared/errors/sanitized-api-error.d.ts.map +1 -0
  394. package/dist/shared/errors/sanitized-api-error.js +41 -0
  395. package/dist/shared/errors/sanitized-api-error.js.map +1 -0
  396. package/dist/shared/errors/symm-error.d.ts +39 -4
  397. package/dist/shared/errors/symm-error.d.ts.map +1 -1
  398. package/dist/shared/errors/symm-error.js +29 -15
  399. package/dist/shared/errors/symm-error.js.map +1 -1
  400. package/dist/shared/types/properties.d.ts +53 -5
  401. package/dist/shared/types/properties.d.ts.map +1 -1
  402. package/dist/shared/utils/core-units.d.ts +82 -0
  403. package/dist/shared/utils/core-units.d.ts.map +1 -0
  404. package/dist/shared/utils/core-units.js +21 -0
  405. package/dist/shared/utils/core-units.js.map +1 -0
  406. package/dist/shared/utils/http-header.d.ts +16 -0
  407. package/dist/shared/utils/http-header.d.ts.map +1 -0
  408. package/dist/shared/utils/http-header.js +14 -0
  409. package/dist/shared/utils/http-header.js.map +1 -0
  410. package/dist/shared/utils/query.js +2 -1
  411. package/dist/shared/utils/query.js.map +1 -1
  412. package/dist/solvers/force-close/force-close-auto.d.ts +6 -2
  413. package/dist/solvers/force-close/force-close-auto.d.ts.map +1 -1
  414. package/dist/solvers/force-close/force-close-auto.js +2 -1
  415. package/dist/solvers/force-close/force-close-auto.js.map +1 -1
  416. package/dist/solvers/force-close/force-close-position.d.ts +9 -3
  417. package/dist/solvers/force-close/force-close-position.d.ts.map +1 -1
  418. package/dist/solvers/force-close/force-close-position.js +2 -1
  419. package/dist/solvers/force-close/force-close-position.js.map +1 -1
  420. package/dist/solvers/instant-open/instant-open/adapters/enigma-instant-open.js +12 -12
  421. package/dist/solvers/instant-open/instant-open/adapters/rasa-instant-open.js +7 -7
  422. package/dist/symmio-contracts/abi/index.d.ts +2 -0
  423. package/dist/symmio-contracts/abi/index.d.ts.map +1 -1
  424. package/dist/symmio-contracts/abi/v0.8.6/gasless-layer.d.ts +2323 -0
  425. package/dist/symmio-contracts/abi/v0.8.6/gasless-layer.d.ts.map +1 -0
  426. package/dist/symmio-contracts/abi/v0.8.6/gasless-layer.js +2706 -0
  427. package/dist/symmio-contracts/abi/v0.8.6/gasless-layer.js.map +1 -0
  428. package/dist/symmio-contracts/abi/v0.8.6/gasless-wallet.d.ts +137 -0
  429. package/dist/symmio-contracts/abi/v0.8.6/gasless-wallet.d.ts.map +1 -0
  430. package/dist/symmio-contracts/abi/v0.8.6/gasless-wallet.js +145 -0
  431. package/dist/symmio-contracts/abi/v0.8.6/gasless-wallet.js.map +1 -0
  432. package/dist/symmio-contracts/abi/v0.8.6/index.d.ts +2 -0
  433. package/dist/symmio-contracts/abi/v0.8.6/index.d.ts.map +1 -1
  434. package/dist/symmio-contracts/abi/v0.8.6/instant-layer.d.ts +1879 -37
  435. package/dist/symmio-contracts/abi/v0.8.6/instant-layer.d.ts.map +1 -1
  436. package/dist/symmio-contracts/abi/v0.8.6/instant-layer.js +2180 -50
  437. package/dist/symmio-contracts/abi/v0.8.6/instant-layer.js.map +1 -1
  438. package/dist/symmio-contracts/account-layer/actions/add-margin.d.ts +2 -2
  439. package/dist/symmio-contracts/account-layer/actions/add-margin.d.ts.map +1 -1
  440. package/dist/symmio-contracts/account-layer/actions/add-margin.js +34 -17
  441. package/dist/symmio-contracts/account-layer/actions/add-margin.js.map +1 -1
  442. package/dist/symmio-contracts/account-layer/actions/create-sub-accounts.d.ts +11 -2
  443. package/dist/symmio-contracts/account-layer/actions/create-sub-accounts.d.ts.map +1 -1
  444. package/dist/symmio-contracts/account-layer/actions/create-sub-accounts.js +33 -17
  445. package/dist/symmio-contracts/account-layer/actions/create-sub-accounts.js.map +1 -1
  446. package/dist/symmio-contracts/account-layer/actions/delete-sub-account.d.ts +9 -2
  447. package/dist/symmio-contracts/account-layer/actions/delete-sub-account.d.ts.map +1 -1
  448. package/dist/symmio-contracts/account-layer/actions/delete-sub-account.js +33 -16
  449. package/dist/symmio-contracts/account-layer/actions/delete-sub-account.js.map +1 -1
  450. package/dist/symmio-contracts/account-layer/actions/deposit-and-allocate-for-account.d.ts +8 -2
  451. package/dist/symmio-contracts/account-layer/actions/deposit-and-allocate-for-account.d.ts.map +1 -1
  452. package/dist/symmio-contracts/account-layer/actions/deposit-and-allocate-for-account.js +34 -17
  453. package/dist/symmio-contracts/account-layer/actions/deposit-and-allocate-for-account.js.map +1 -1
  454. package/dist/symmio-contracts/account-layer/actions/deposit-for-account.d.ts +8 -2
  455. package/dist/symmio-contracts/account-layer/actions/deposit-for-account.d.ts.map +1 -1
  456. package/dist/symmio-contracts/account-layer/actions/deposit-for-account.js +34 -17
  457. package/dist/symmio-contracts/account-layer/actions/deposit-for-account.js.map +1 -1
  458. package/dist/symmio-contracts/account-layer/actions/edit-account-name.d.ts +7 -2
  459. package/dist/symmio-contracts/account-layer/actions/edit-account-name.d.ts.map +1 -1
  460. package/dist/symmio-contracts/account-layer/actions/edit-account-name.js +34 -17
  461. package/dist/symmio-contracts/account-layer/actions/edit-account-name.js.map +1 -1
  462. package/dist/symmio-contracts/account-layer/actions/get-account-balance-info.d.ts +1 -1
  463. package/dist/symmio-contracts/account-layer/actions/get-account-balance-info.js.map +1 -1
  464. package/dist/symmio-contracts/account-layer/actions/get-account-balance-of.d.ts +9 -3
  465. package/dist/symmio-contracts/account-layer/actions/get-account-balance-of.d.ts.map +1 -1
  466. package/dist/symmio-contracts/account-layer/actions/get-account-balance-of.js.map +1 -1
  467. package/dist/symmio-contracts/account-layer/actions/remove-margin.d.ts +2 -2
  468. package/dist/symmio-contracts/account-layer/actions/remove-margin.d.ts.map +1 -1
  469. package/dist/symmio-contracts/account-layer/actions/remove-margin.js +41 -20
  470. package/dist/symmio-contracts/account-layer/actions/remove-margin.js.map +1 -1
  471. package/dist/symmio-contracts/account-layer/types.d.ts +3 -1
  472. package/dist/symmio-contracts/account-layer/types.d.ts.map +1 -1
  473. package/dist/symmio-contracts/account-layer/types.js.map +1 -1
  474. package/dist/symmio-contracts/instant-layer/actions/finalize-revoke-delegation.d.ts +60 -0
  475. package/dist/symmio-contracts/instant-layer/actions/finalize-revoke-delegation.d.ts.map +1 -0
  476. package/dist/symmio-contracts/instant-layer/actions/finalize-revoke-delegation.js +35 -0
  477. package/dist/symmio-contracts/instant-layer/actions/finalize-revoke-delegation.js.map +1 -0
  478. package/dist/symmio-contracts/instant-layer/actions/get-active-delegations.d.ts +91 -0
  479. package/dist/symmio-contracts/instant-layer/actions/get-active-delegations.d.ts.map +1 -0
  480. package/dist/symmio-contracts/instant-layer/actions/get-active-delegations.js +19 -0
  481. package/dist/symmio-contracts/instant-layer/actions/get-active-delegations.js.map +1 -0
  482. package/dist/symmio-contracts/instant-layer/actions/get-instant-layer-nonce.d.ts +36 -0
  483. package/dist/symmio-contracts/instant-layer/actions/get-instant-layer-nonce.d.ts.map +1 -0
  484. package/dist/symmio-contracts/instant-layer/actions/get-instant-layer-nonce.js +15 -0
  485. package/dist/symmio-contracts/instant-layer/actions/get-instant-layer-nonce.js.map +1 -0
  486. package/dist/symmio-contracts/instant-layer/actions/get-pending-revocation-etas.d.ts +79 -0
  487. package/dist/symmio-contracts/instant-layer/actions/get-pending-revocation-etas.d.ts.map +1 -0
  488. package/dist/symmio-contracts/instant-layer/actions/get-pending-revocation-etas.js +32 -0
  489. package/dist/symmio-contracts/instant-layer/actions/get-pending-revocation-etas.js.map +1 -0
  490. package/dist/symmio-contracts/instant-layer/actions/get-revocation-cooldown.d.ts +43 -0
  491. package/dist/symmio-contracts/instant-layer/actions/get-revocation-cooldown.d.ts.map +1 -0
  492. package/dist/symmio-contracts/instant-layer/actions/get-revocation-cooldown.js +14 -0
  493. package/dist/symmio-contracts/instant-layer/actions/get-revocation-cooldown.js.map +1 -0
  494. package/dist/symmio-contracts/instant-layer/actions/grant-delegation.d.ts +24 -3
  495. package/dist/symmio-contracts/instant-layer/actions/grant-delegation.d.ts.map +1 -1
  496. package/dist/symmio-contracts/instant-layer/actions/grant-delegation.js +48 -22
  497. package/dist/symmio-contracts/instant-layer/actions/grant-delegation.js.map +1 -1
  498. package/dist/symmio-contracts/instant-layer/actions/initiate-revoke-delegation.d.ts +62 -0
  499. package/dist/symmio-contracts/instant-layer/actions/initiate-revoke-delegation.d.ts.map +1 -0
  500. package/dist/symmio-contracts/instant-layer/actions/initiate-revoke-delegation.js +35 -0
  501. package/dist/symmio-contracts/instant-layer/actions/initiate-revoke-delegation.js.map +1 -0
  502. package/dist/symmio-contracts/instant-layer/index.d.ts +12 -0
  503. package/dist/symmio-contracts/instant-layer/index.d.ts.map +1 -1
  504. package/dist/symmio-contracts/instant-layer/query/finalize-revoke-delegation.d.ts +22 -0
  505. package/dist/symmio-contracts/instant-layer/query/finalize-revoke-delegation.d.ts.map +1 -0
  506. package/dist/symmio-contracts/instant-layer/query/finalize-revoke-delegation.js +12 -0
  507. package/dist/symmio-contracts/instant-layer/query/finalize-revoke-delegation.js.map +1 -0
  508. package/dist/symmio-contracts/instant-layer/query/get-active-delegations.d.ts +36 -0
  509. package/dist/symmio-contracts/instant-layer/query/get-active-delegations.d.ts.map +1 -0
  510. package/dist/symmio-contracts/instant-layer/query/get-active-delegations.js +29 -0
  511. package/dist/symmio-contracts/instant-layer/query/get-active-delegations.js.map +1 -0
  512. package/dist/symmio-contracts/instant-layer/query/get-instant-layer-nonce.d.ts +39 -0
  513. package/dist/symmio-contracts/instant-layer/query/get-instant-layer-nonce.d.ts.map +1 -0
  514. package/dist/symmio-contracts/instant-layer/query/get-instant-layer-nonce.js +27 -0
  515. package/dist/symmio-contracts/instant-layer/query/get-instant-layer-nonce.js.map +1 -0
  516. package/dist/symmio-contracts/instant-layer/query/get-is-delegation-active.js +7 -7
  517. package/dist/symmio-contracts/instant-layer/query/get-pending-revocation-etas.d.ts +42 -0
  518. package/dist/symmio-contracts/instant-layer/query/get-pending-revocation-etas.d.ts.map +1 -0
  519. package/dist/symmio-contracts/instant-layer/query/get-pending-revocation-etas.js +30 -0
  520. package/dist/symmio-contracts/instant-layer/query/get-pending-revocation-etas.js.map +1 -0
  521. package/dist/symmio-contracts/instant-layer/query/get-revocation-cooldown.d.ts +36 -0
  522. package/dist/symmio-contracts/instant-layer/query/get-revocation-cooldown.d.ts.map +1 -0
  523. package/dist/symmio-contracts/instant-layer/query/get-revocation-cooldown.js +21 -0
  524. package/dist/symmio-contracts/instant-layer/query/get-revocation-cooldown.js.map +1 -0
  525. package/dist/symmio-contracts/instant-layer/query/initiate-revoke-delegation.d.ts +22 -0
  526. package/dist/symmio-contracts/instant-layer/query/initiate-revoke-delegation.d.ts.map +1 -0
  527. package/dist/symmio-contracts/instant-layer/query/initiate-revoke-delegation.js +12 -0
  528. package/dist/symmio-contracts/instant-layer/query/initiate-revoke-delegation.js.map +1 -0
  529. package/dist/symmio-contracts/symmio/actions/allocate.d.ts +2 -2
  530. package/dist/symmio-contracts/symmio/actions/allocate.d.ts.map +1 -1
  531. package/dist/symmio-contracts/symmio/actions/allocate.js +2 -1
  532. package/dist/symmio-contracts/symmio/actions/allocate.js.map +1 -1
  533. package/dist/symmio-contracts/symmio/actions/approve-operational-fee.d.ts +87 -0
  534. package/dist/symmio-contracts/symmio/actions/approve-operational-fee.d.ts.map +1 -0
  535. package/dist/symmio-contracts/symmio/actions/approve-operational-fee.js +38 -0
  536. package/dist/symmio-contracts/symmio/actions/approve-operational-fee.js.map +1 -0
  537. package/dist/symmio-contracts/symmio/actions/deallocate-and-initiate-withdraw.d.ts +2 -2
  538. package/dist/symmio-contracts/symmio/actions/deallocate-and-initiate-withdraw.d.ts.map +1 -1
  539. package/dist/symmio-contracts/symmio/actions/deallocate-and-initiate-withdraw.js +2 -1
  540. package/dist/symmio-contracts/symmio/actions/deallocate-and-initiate-withdraw.js.map +1 -1
  541. package/dist/symmio-contracts/symmio/actions/deallocate.d.ts +2 -2
  542. package/dist/symmio-contracts/symmio/actions/deallocate.d.ts.map +1 -1
  543. package/dist/symmio-contracts/symmio/actions/deallocate.js +2 -1
  544. package/dist/symmio-contracts/symmio/actions/deallocate.js.map +1 -1
  545. package/dist/symmio-contracts/symmio/actions/finalize-withdraw-request.d.ts +15 -3
  546. package/dist/symmio-contracts/symmio/actions/finalize-withdraw-request.d.ts.map +1 -1
  547. package/dist/symmio-contracts/symmio/actions/finalize-withdraw-request.js +34 -17
  548. package/dist/symmio-contracts/symmio/actions/finalize-withdraw-request.js.map +1 -1
  549. package/dist/symmio-contracts/symmio/actions/force-cancel-close-request.d.ts +2 -2
  550. package/dist/symmio-contracts/symmio/actions/force-cancel-close-request.d.ts.map +1 -1
  551. package/dist/symmio-contracts/symmio/actions/force-cancel-close-request.js +2 -1
  552. package/dist/symmio-contracts/symmio/actions/force-cancel-close-request.js.map +1 -1
  553. package/dist/symmio-contracts/symmio/actions/force-cancel-quote.d.ts +2 -2
  554. package/dist/symmio-contracts/symmio/actions/force-cancel-quote.d.ts.map +1 -1
  555. package/dist/symmio-contracts/symmio/actions/force-cancel-quote.js +2 -1
  556. package/dist/symmio-contracts/symmio/actions/force-cancel-quote.js.map +1 -1
  557. package/dist/symmio-contracts/symmio/actions/get-operational-fee-allowance.d.ts +85 -0
  558. package/dist/symmio-contracts/symmio/actions/get-operational-fee-allowance.d.ts.map +1 -0
  559. package/dist/symmio-contracts/symmio/actions/get-operational-fee-allowance.js +29 -0
  560. package/dist/symmio-contracts/symmio/actions/get-operational-fee-allowance.js.map +1 -0
  561. package/dist/symmio-contracts/symmio/actions/initiate-withdraw.d.ts +2 -2
  562. package/dist/symmio-contracts/symmio/actions/initiate-withdraw.d.ts.map +1 -1
  563. package/dist/symmio-contracts/symmio/actions/initiate-withdraw.js +2 -1
  564. package/dist/symmio-contracts/symmio/actions/initiate-withdraw.js.map +1 -1
  565. package/dist/symmio-contracts/symmio/actions/request-cancel-withdraw.d.ts +2 -2
  566. package/dist/symmio-contracts/symmio/actions/request-cancel-withdraw.d.ts.map +1 -1
  567. package/dist/symmio-contracts/symmio/actions/request-cancel-withdraw.js +2 -1
  568. package/dist/symmio-contracts/symmio/actions/request-cancel-withdraw.js.map +1 -1
  569. package/dist/symmio-contracts/symmio/actions/request-to-cancel-close-request.d.ts +2 -2
  570. package/dist/symmio-contracts/symmio/actions/request-to-cancel-close-request.d.ts.map +1 -1
  571. package/dist/symmio-contracts/symmio/actions/request-to-cancel-close-request.js +2 -1
  572. package/dist/symmio-contracts/symmio/actions/request-to-cancel-close-request.js.map +1 -1
  573. package/dist/symmio-contracts/symmio/actions/request-to-cancel-quote.d.ts +2 -2
  574. package/dist/symmio-contracts/symmio/actions/request-to-cancel-quote.d.ts.map +1 -1
  575. package/dist/symmio-contracts/symmio/actions/request-to-cancel-quote.js +2 -1
  576. package/dist/symmio-contracts/symmio/actions/request-to-cancel-quote.js.map +1 -1
  577. package/dist/symmio-contracts/symmio/actions/withdraw-auto.d.ts +9 -7
  578. package/dist/symmio-contracts/symmio/actions/withdraw-auto.d.ts.map +1 -1
  579. package/dist/symmio-contracts/symmio/actions/withdraw-auto.js +24 -22
  580. package/dist/symmio-contracts/symmio/actions/withdraw-auto.js.map +1 -1
  581. package/dist/symmio-contracts/symmio/actions/withdraw.d.ts +2 -2
  582. package/dist/symmio-contracts/symmio/actions/withdraw.d.ts.map +1 -1
  583. package/dist/symmio-contracts/symmio/actions/withdraw.js +4 -2
  584. package/dist/symmio-contracts/symmio/actions/withdraw.js.map +1 -1
  585. package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/get-funding-fees-of-party-b.d.ts +43 -0
  586. package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/get-funding-fees-of-party-b.d.ts.map +1 -0
  587. package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/get-funding-fees-of-party-b.js +15 -0
  588. package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/get-funding-fees-of-party-b.js.map +1 -0
  589. package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/index.d.ts +4 -0
  590. package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/index.d.ts.map +1 -0
  591. package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/query.d.ts +43 -0
  592. package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/query.d.ts.map +1 -0
  593. package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/query.js +25 -0
  594. package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/query.js.map +1 -0
  595. package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/types.d.ts +85 -0
  596. package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/types.d.ts.map +1 -0
  597. package/dist/symmio-contracts/symmio/index.d.ts +5 -0
  598. package/dist/symmio-contracts/symmio/index.d.ts.map +1 -1
  599. package/dist/symmio-contracts/symmio/internal/call-as-sub-account.d.ts +2 -1
  600. package/dist/symmio-contracts/symmio/internal/call-as-sub-account.d.ts.map +1 -1
  601. package/dist/symmio-contracts/symmio/internal/call-as-sub-account.js +46 -17
  602. package/dist/symmio-contracts/symmio/internal/call-as-sub-account.js.map +1 -1
  603. package/dist/symmio-contracts/symmio/query/approve-operational-fee.d.ts +18 -0
  604. package/dist/symmio-contracts/symmio/query/approve-operational-fee.d.ts.map +1 -0
  605. package/dist/symmio-contracts/symmio/query/approve-operational-fee.js +12 -0
  606. package/dist/symmio-contracts/symmio/query/approve-operational-fee.js.map +1 -0
  607. package/dist/symmio-contracts/symmio/query/get-operational-fee-allowance.d.ts +35 -0
  608. package/dist/symmio-contracts/symmio/query/get-operational-fee-allowance.d.ts.map +1 -0
  609. package/dist/symmio-contracts/symmio/query/get-operational-fee-allowance.js +28 -0
  610. package/dist/symmio-contracts/symmio/query/get-operational-fee-allowance.js.map +1 -0
  611. package/dist/symmio-contracts/symmio/types.d.ts +6 -6
  612. package/dist/symmio-contracts/symmio/types.js.map +1 -1
  613. package/dist/symmio-subgraph/executeSubgraphRequest.d.ts +2 -1
  614. package/dist/symmio-subgraph/executeSubgraphRequest.d.ts.map +1 -1
  615. package/dist/symmio-subgraph/executeSubgraphRequest.js +24 -21
  616. package/dist/symmio-subgraph/executeSubgraphRequest.js.map +1 -1
  617. package/dist/websocket/gasless/close-code-policy.d.ts +51 -0
  618. package/dist/websocket/gasless/close-code-policy.d.ts.map +1 -0
  619. package/dist/websocket/gasless/close-code-policy.js +75 -0
  620. package/dist/websocket/gasless/close-code-policy.js.map +1 -0
  621. package/dist/websocket/gasless/gasless-stream-hub.d.ts +61 -0
  622. package/dist/websocket/gasless/gasless-stream-hub.d.ts.map +1 -0
  623. package/dist/websocket/gasless/gasless-stream-hub.js +311 -0
  624. package/dist/websocket/gasless/gasless-stream-hub.js.map +1 -0
  625. package/dist/websocket/gasless/index.d.ts +7 -0
  626. package/dist/websocket/gasless/index.d.ts.map +1 -0
  627. package/dist/websocket/gasless/parse-gasless-stream-message.d.ts +82 -0
  628. package/dist/websocket/gasless/parse-gasless-stream-message.d.ts.map +1 -0
  629. package/dist/websocket/gasless/parse-gasless-stream-message.js +136 -0
  630. package/dist/websocket/gasless/parse-gasless-stream-message.js.map +1 -0
  631. package/dist/websocket/gasless/resolve-gasless-stream-url.d.ts +58 -0
  632. package/dist/websocket/gasless/resolve-gasless-stream-url.d.ts.map +1 -0
  633. package/dist/websocket/gasless/resolve-gasless-stream-url.js +59 -0
  634. package/dist/websocket/gasless/resolve-gasless-stream-url.js.map +1 -0
  635. package/dist/websocket/gasless/types.d.ts +48 -0
  636. package/dist/websocket/gasless/types.d.ts.map +1 -0
  637. package/dist/websocket/gasless/watch-gasless-request.d.ts +72 -0
  638. package/dist/websocket/gasless/watch-gasless-request.d.ts.map +1 -0
  639. package/dist/websocket/gasless/watch-gasless-request.js +35 -0
  640. package/dist/websocket/gasless/watch-gasless-request.js.map +1 -0
  641. package/dist/websocket/index.d.ts +1 -0
  642. package/dist/websocket/index.d.ts.map +1 -1
  643. package/dist/websocket/socket/create-reconnecting-socket.d.ts +39 -6
  644. package/dist/websocket/socket/create-reconnecting-socket.d.ts.map +1 -1
  645. package/dist/websocket/socket/create-reconnecting-socket.js +92 -53
  646. package/dist/websocket/socket/create-reconnecting-socket.js.map +1 -1
  647. package/dist/websocket/socket/socket-status.d.ts +7 -2
  648. package/dist/websocket/socket/socket-status.d.ts.map +1 -1
  649. package/dist/websocket/socket/socket-status.js.map +1 -1
  650. package/package.json +1 -1
@@ -0,0 +1,36 @@
1
+ import { Config } from '../../../core/config/index.js';
2
+ import { Compute, ConfigKeyParameter, ExactPartial } from '../../../shared/types/properties.js';
3
+ import { QueryParameter, SymmioQueryOptions } from '../../../shared/types/query.js';
4
+ import { GetRevocationCooldownParameters, GetRevocationCooldownReturnType } from '../actions/get-revocation-cooldown.js';
5
+ /** Data resolved by the {@link getRevocationCooldownQueryOptions} query. */
6
+ export type GetRevocationCooldownData = GetRevocationCooldownReturnType;
7
+ /**
8
+ * Build the TanStack Query key for {@link getRevocationCooldownQueryOptions}.
9
+ *
10
+ * @param options - Partial query parameters.
11
+ * @returns A stable, hashable query key.
12
+ */
13
+ export declare function getRevocationCooldownQueryKey(options?: Compute<ExactPartial<GetRevocationCooldownParameters> & ConfigKeyParameter>): readonly ["getRevocationCooldown", Record<string, unknown>];
14
+ /** Query-key type produced by {@link getRevocationCooldownQueryKey}. */
15
+ export type GetRevocationCooldownQueryKey = ReturnType<typeof getRevocationCooldownQueryKey>;
16
+ /**
17
+ * Options accepted by {@link getRevocationCooldownQueryOptions}: an optional
18
+ * chain id and TanStack overrides.
19
+ */
20
+ export type GetRevocationCooldownOptions = Compute<GetRevocationCooldownParameters & QueryParameter<GetRevocationCooldownData, Error, GetRevocationCooldownData, GetRevocationCooldownQueryKey>>;
21
+ /** TanStack Query options returned by {@link getRevocationCooldownQueryOptions}. */
22
+ export type GetRevocationCooldownQueryOptions = SymmioQueryOptions<GetRevocationCooldownData, Error, GetRevocationCooldownData, GetRevocationCooldownQueryKey>;
23
+ /**
24
+ * Build TanStack Query options for {@link getRevocationCooldown}.
25
+ *
26
+ * @param config - The SDK config.
27
+ * @param options - Optional chain id and TanStack overrides.
28
+ * @returns Options to pass to `useQuery` / `queryClient.fetchQuery`.
29
+ *
30
+ * @example
31
+ * ```ts
32
+ * useQuery(getRevocationCooldownQueryOptions(config, {}));
33
+ * ```
34
+ */
35
+ export declare function getRevocationCooldownQueryOptions(config: Config, options?: GetRevocationCooldownOptions): GetRevocationCooldownQueryOptions;
36
+ //# sourceMappingURL=get-revocation-cooldown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-revocation-cooldown.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/instant-layer/query/get-revocation-cooldown.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAClG,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEtF,OAAO,EAEL,KAAK,+BAA+B,EACpC,KAAK,+BAA+B,EACrC,MAAM,oCAAoC,CAAC;AAE5C,4EAA4E;AAC5E,MAAM,MAAM,yBAAyB,GAAG,+BAA+B,CAAC;AAExE;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,GAAE,OAAO,CAAC,YAAY,CAAC,+BAA+B,CAAC,GAAG,kBAAkB,CAAM,+DAG1F;AAED,wEAAwE;AACxE,MAAM,MAAM,6BAA6B,GAAG,UAAU,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAE7F;;;GAGG;AACH,MAAM,MAAM,4BAA4B,GAAG,OAAO,CAChD,+BAA+B,GAC7B,cAAc,CAAC,yBAAyB,EAAE,KAAK,EAAE,yBAAyB,EAAE,6BAA6B,CAAC,CAC7G,CAAC;AAEF,oFAAoF;AACpF,MAAM,MAAM,iCAAiC,GAAG,kBAAkB,CAChE,yBAAyB,EACzB,KAAK,EACL,yBAAyB,EACzB,6BAA6B,CAC9B,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,4BAAiC,GACzC,iCAAiC,CAOnC"}
@@ -0,0 +1,21 @@
1
+ import { filterQueryOptions as e } from "../../../shared/utils/query.js";
2
+ import { getRevocationCooldown as t } from "../actions/get-revocation-cooldown.js";
3
+ //#region src/symmio-contracts/instant-layer/query/get-revocation-cooldown.ts
4
+ function n(t = {}) {
5
+ return ["getRevocationCooldown", e(t)];
6
+ }
7
+ function r(e, r = {}) {
8
+ return {
9
+ ...r.query,
10
+ queryKey: n({
11
+ ...r,
12
+ configKey: e.getChainConfigKey(r.chainId)
13
+ }),
14
+ enabled: r.query?.enabled ?? !0,
15
+ queryFn: () => t(e, { chainId: r.chainId })
16
+ };
17
+ }
18
+ //#endregion
19
+ export { n as getRevocationCooldownQueryKey, r as getRevocationCooldownQueryOptions };
20
+
21
+ //# sourceMappingURL=get-revocation-cooldown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-revocation-cooldown.js","names":[],"sources":["../../../../src/symmio-contracts/instant-layer/query/get-revocation-cooldown.ts"],"sourcesContent":["import type { Config } from \"../../../core/config\";\nimport type { Compute, ConfigKeyParameter, ExactPartial } from \"../../../shared/types/properties\";\nimport type { QueryParameter, SymmioQueryOptions } from \"../../../shared/types/query\";\nimport { filterQueryOptions } from \"../../../shared/utils/query\";\nimport {\n getRevocationCooldown,\n type GetRevocationCooldownParameters,\n type GetRevocationCooldownReturnType,\n} from \"../actions/get-revocation-cooldown\";\n\n/** Data resolved by the {@link getRevocationCooldownQueryOptions} query. */\nexport type GetRevocationCooldownData = GetRevocationCooldownReturnType;\n\n/**\n * Build the TanStack Query key for {@link getRevocationCooldownQueryOptions}.\n *\n * @param options - Partial query parameters.\n * @returns A stable, hashable query key.\n */\nexport function getRevocationCooldownQueryKey(\n options: Compute<ExactPartial<GetRevocationCooldownParameters> & ConfigKeyParameter> = {},\n) {\n return [\"getRevocationCooldown\", filterQueryOptions(options)] as const;\n}\n\n/** Query-key type produced by {@link getRevocationCooldownQueryKey}. */\nexport type GetRevocationCooldownQueryKey = ReturnType<typeof getRevocationCooldownQueryKey>;\n\n/**\n * Options accepted by {@link getRevocationCooldownQueryOptions}: an optional\n * chain id and TanStack overrides.\n */\nexport type GetRevocationCooldownOptions = Compute<\n GetRevocationCooldownParameters &\n QueryParameter<GetRevocationCooldownData, Error, GetRevocationCooldownData, GetRevocationCooldownQueryKey>\n>;\n\n/** TanStack Query options returned by {@link getRevocationCooldownQueryOptions}. */\nexport type GetRevocationCooldownQueryOptions = SymmioQueryOptions<\n GetRevocationCooldownData,\n Error,\n GetRevocationCooldownData,\n GetRevocationCooldownQueryKey\n>;\n\n/**\n * Build TanStack Query options for {@link getRevocationCooldown}.\n *\n * @param config - The SDK config.\n * @param options - Optional chain id and TanStack overrides.\n * @returns Options to pass to `useQuery` / `queryClient.fetchQuery`.\n *\n * @example\n * ```ts\n * useQuery(getRevocationCooldownQueryOptions(config, {}));\n * ```\n */\nexport function getRevocationCooldownQueryOptions(\n config: Config,\n options: GetRevocationCooldownOptions = {},\n): GetRevocationCooldownQueryOptions {\n return {\n ...options.query,\n queryKey: getRevocationCooldownQueryKey({ ...options, configKey: config.getChainConfigKey(options.chainId) }),\n enabled: options.query?.enabled ?? true,\n queryFn: () => getRevocationCooldown(config, { chainId: options.chainId }),\n };\n}\n"],"mappings":";;;AAmBA,SAAgB,EACd,IAAuF,CAAC,GACxF;CACA,OAAO,CAAC,yBAAyB,EAAmB,CAAO,CAAC;AAC9D;AAkCA,SAAgB,EACd,GACA,IAAwC,CAAC,GACN;CACnC,OAAO;EACL,GAAG,EAAQ;EACX,UAAU,EAA8B;GAAE,GAAG;GAAS,WAAW,EAAO,kBAAkB,EAAQ,OAAO;EAAE,CAAC;EAC5G,SAAS,EAAQ,OAAO,WAAW;EACnC,eAAe,EAAsB,GAAQ,EAAE,SAAS,EAAQ,QAAQ,CAAC;CAC3E;AACF"}
@@ -0,0 +1,22 @@
1
+ import { Config } from '../../../core/config/index.js';
2
+ import { InitiateRevokeDelegationParameters } from '../actions/initiate-revoke-delegation.js';
3
+ /**
4
+ * Build TanStack Mutation options for {@link initiateRevokeDelegation}.
5
+ *
6
+ * The returned `mutationFn` takes the action's parameters and forwards them to
7
+ * `initiateRevokeDelegation(config, …)`. Framework layers compose invalidation
8
+ * and error normalization on top.
9
+ *
10
+ * @param config - The SDK config (must have a `getWalletClient` resolver).
11
+ * @returns Options to pass to `useMutation`.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * useMutation(initiateRevokeDelegationMutationOptions(config));
16
+ * ```
17
+ */
18
+ export declare function initiateRevokeDelegationMutationOptions(config: Config): {
19
+ mutationKey: readonly ["initiateRevokeDelegation"];
20
+ mutationFn: (variables: InitiateRevokeDelegationParameters) => Promise<`0x${string}`>;
21
+ };
22
+ //# sourceMappingURL=initiate-revoke-delegation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initiate-revoke-delegation.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/instant-layer/query/initiate-revoke-delegation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAEL,KAAK,kCAAkC,EACxC,MAAM,uCAAuC,CAAC;AAE/C;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uCAAuC,CAAC,MAAM,EAAE,MAAM;;4BAG1C,kCAAkC;EAE7D"}
@@ -0,0 +1,12 @@
1
+ import { initiateRevokeDelegation as e } from "../actions/initiate-revoke-delegation.js";
2
+ //#region src/symmio-contracts/instant-layer/query/initiate-revoke-delegation.ts
3
+ function t(t) {
4
+ return {
5
+ mutationKey: ["initiateRevokeDelegation"],
6
+ mutationFn: (n) => e(t, n)
7
+ };
8
+ }
9
+ //#endregion
10
+ export { t as initiateRevokeDelegationMutationOptions };
11
+
12
+ //# sourceMappingURL=initiate-revoke-delegation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initiate-revoke-delegation.js","names":[],"sources":["../../../../src/symmio-contracts/instant-layer/query/initiate-revoke-delegation.ts"],"sourcesContent":["import type { Config } from \"../../../core/config\";\nimport {\n initiateRevokeDelegation,\n type InitiateRevokeDelegationParameters,\n} from \"../actions/initiate-revoke-delegation\";\n\n/**\n * Build TanStack Mutation options for {@link initiateRevokeDelegation}.\n *\n * The returned `mutationFn` takes the action's parameters and forwards them to\n * `initiateRevokeDelegation(config, …)`. Framework layers compose invalidation\n * and error normalization on top.\n *\n * @param config - The SDK config (must have a `getWalletClient` resolver).\n * @returns Options to pass to `useMutation`.\n *\n * @example\n * ```ts\n * useMutation(initiateRevokeDelegationMutationOptions(config));\n * ```\n */\nexport function initiateRevokeDelegationMutationOptions(config: Config) {\n return {\n mutationKey: [\"initiateRevokeDelegation\"] as const,\n mutationFn: (variables: InitiateRevokeDelegationParameters) => initiateRevokeDelegation(config, variables),\n };\n}\n"],"mappings":";;AAqBA,SAAgB,EAAwC,GAAgB;CACtE,OAAO;EACL,aAAa,CAAC,0BAA0B;EACxC,aAAa,MAAkD,EAAyB,GAAQ,CAAS;CAC3G;AACF"}
@@ -1,10 +1,10 @@
1
1
  import { Address, Hash } from 'viem';
2
2
  import { Config } from '../../../core/config/index.js';
3
- import { Compute, WriteContractParameter } from '../../../shared/types/properties.js';
3
+ import { Compute, GaslessWriteParameter, WriteContractParameter } from '../../../shared/types/properties.js';
4
4
  /**
5
5
  * Parameters for {@link allocate}.
6
6
  */
7
- export type AllocateParameters = Compute<WriteContractParameter & {
7
+ export type AllocateParameters = Compute<WriteContractParameter & GaslessWriteParameter & {
8
8
  /**
9
9
  * The subaccount to allocate into. The call is routed through the
10
10
  * AccountLayer `_call` proxy; the connected wallet must be its on-chain `owner`.
@@ -1 +1 @@
1
- {"version":3,"file":"allocate.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/symmio/actions/allocate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,MAAM,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAIxF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,CACtC,sBAAsB,GAAG;IACvB;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB,CACF,CAAC;AAEF,uEAAuE;AACvE,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAEtC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAgB1G"}
1
+ {"version":3,"file":"allocate.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/symmio/actions/allocate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,MAAM,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAI/G;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,CACtC,sBAAsB,GACpB,qBAAqB,GAAG;IACtB;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB,CACJ,CAAC;AAEF,uEAAuE;AACvE,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAEtC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAiB1G"}
@@ -13,7 +13,8 @@ async function r(r, i) {
13
13
  }),
14
14
  chainId: a,
15
15
  from: i.from,
16
- simulateBeforeWrite: i.simulateBeforeWrite
16
+ simulateBeforeWrite: i.simulateBeforeWrite,
17
+ gasless: i.gasless
17
18
  });
18
19
  }
19
20
  //#endregion
@@ -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.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"}
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, GaslessWriteParameter, 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 GaslessWriteParameter & {\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 gasless: parameters.gasless,\n });\n}\n"],"mappings":";;;;AAuDA,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;EAChC,SAAS,EAAW;CACtB,CAAC;AACH"}
@@ -0,0 +1,87 @@
1
+ import { Address, Hash } from 'viem';
2
+ import { Config } from '../../../core/config/index.js';
3
+ import { Compute, GaslessWriteParameter, WriteContractParameter } from '../../../shared/types/properties.js';
4
+ /**
5
+ * Fee multiplier meaning "list price" (basis points). The default the diamond
6
+ * applies when a pair has never set one.
7
+ */
8
+ export declare const OPERATIONAL_FEE_LIST_PRICE_MULTIPLIER = 10000n;
9
+ /**
10
+ * Parameters for {@link approveOperationalFee}.
11
+ */
12
+ export type ApproveOperationalFeeParameters = Compute<WriteContractParameter & GaslessWriteParameter & {
13
+ /**
14
+ * The sub-account that pays operational fees. The call is routed through
15
+ * the AccountLayer `_call` proxy so the diamond sees this sub-account as
16
+ * `msg.sender` — the allowance is keyed by payer, and a direct wallet call
17
+ * would grant it from the wrong account. The connected wallet must be the
18
+ * sub-account's `owner`.
19
+ */
20
+ account: Address;
21
+ /**
22
+ * The fee chargers to approve. Defaults to the chain's
23
+ * `gasless.gaslessLayerAddress` — the GaslessLayer **proxy**, which is
24
+ * the charger for relayed operations. Never the relayer's executor
25
+ * address.
26
+ */
27
+ chargers?: readonly Address[];
28
+ /**
29
+ * Allowance per charger, parallel to `chargers`, in **18-decimal Core
30
+ * units** — the scale of the Core balance the fee is drawn from, not the
31
+ * collateral token's decimals. `parseUnits("5", 18)` is a budget of 5
32
+ * collateral tokens; `collateralToCore18` converts a token amount.
33
+ *
34
+ * Each value **replaces** the current allowance (ERC-20 `approve`
35
+ * style, not an increment), and every charge decrements it. Choose a
36
+ * bounded budget for the operations you intend to relay rather than
37
+ * `maxUint256`. A raise applies immediately; a **reduction** can be
38
+ * timelocked on-chain, in which case the old value keeps applying until
39
+ * `reductionReadyAt`.
40
+ */
41
+ amounts: readonly bigint[];
42
+ /**
43
+ * Fee multiplier per charger in basis points; `10000n` = list price.
44
+ * Defaults to {@link OPERATIONAL_FEE_LIST_PRICE_MULTIPLIER} for every
45
+ * charger. The call always sets the multiplier, so omitting this resets
46
+ * a previously set one to list price.
47
+ */
48
+ feeMultipliers?: readonly bigint[];
49
+ }>;
50
+ /** Return type of {@link approveOperationalFee}: the submitted transaction hash. */
51
+ export type ApproveOperationalFeeReturnType = Hash;
52
+ /**
53
+ * Approve operational-fee allowances (`approveOperationalFeeWithMultiplier`)
54
+ * for the gasless fee charger, as the paying sub-account.
55
+ *
56
+ * The GaslessLayer proxy can only charge a payer up to this allowance, so grant
57
+ * it **before** relying on gasless execution. When the relayer itself is down,
58
+ * this wallet-paid path (via `AccountLayer._call`) is the only way to grant it.
59
+ * The approval is also itself relayable: pass `gasless: true` once the
60
+ * transparent gasless mode is active to have the relayer submit it.
61
+ *
62
+ * Amounts are **18-decimal Core units**. Approving only permits the charge — it
63
+ * does not add collateral, and the fee is still drawn from the payer's Core
64
+ * balance. Whatever its allowance, a payer short of balance fails with
65
+ * `OperationalFee: Insufficient balance`. Read the allowance back with
66
+ * `getOperationalFeeAllowance` after the transaction lands, before relying on it.
67
+ *
68
+ * @param config - The SDK config (must have a `getWalletClient` resolver).
69
+ * @param parameters - Paying sub-account, chargers/amounts/multipliers, write options.
70
+ * @returns The submitted transaction hash.
71
+ * @throws {SymmError} `GASLESS_CHARGER_REQUIRED` when no `chargers` are given and
72
+ * the chain has no gasless block to default from.
73
+ * @throws {SymmError} `OPERATIONAL_FEE_APPROVAL_MISMATCH` when the array lengths disagree.
74
+ *
75
+ * @example
76
+ * ```ts
77
+ * import { parseUnits } from "viem";
78
+ *
79
+ * // A bounded fee budget of 5 collateral tokens, in 18-decimal Core units.
80
+ * const hash = await approveOperationalFee(config, {
81
+ * account: subAccount,
82
+ * amounts: [parseUnits("5", 18)],
83
+ * });
84
+ * ```
85
+ */
86
+ export declare function approveOperationalFee(config: Config, parameters: ApproveOperationalFeeParameters): Promise<ApproveOperationalFeeReturnType>;
87
+ //# sourceMappingURL=approve-operational-fee.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approve-operational-fee.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/symmio/actions/approve-operational-fee.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,MAAM,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAGnD,OAAO,KAAK,EAAE,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAI/G;;;GAGG;AACH,eAAO,MAAM,qCAAqC,SAAU,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,OAAO,CACnD,sBAAsB,GACpB,qBAAqB,GAAG;IACtB;;;;;;OAMG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IAC9B;;;;;;;;;;;;OAYG;IACH,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B;;;;;OAKG;IACH,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC,CACJ,CAAC;AAEF,oFAAoF;AACpF,MAAM,MAAM,+BAA+B,GAAG,IAAI,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,+BAA+B,GAC1C,OAAO,CAAC,+BAA+B,CAAC,CA4B1C"}
@@ -0,0 +1,38 @@
1
+ import { symmioAbi as e } from "../../abi/v0.8.6/symmio.js";
2
+ import { SymmError as t } from "../../../shared/errors/symm-error.js";
3
+ import { resolveGaslessService as n } from "../../../gasless/resolve-gasless.js";
4
+ import { callAsSubAccount as r } from "../internal/call-as-sub-account.js";
5
+ import { encodeFunctionData as i } from "viem";
6
+ //#region src/symmio-contracts/symmio/actions/approve-operational-fee.ts
7
+ var a = 10000n;
8
+ async function o(n, a) {
9
+ let { chainId: o, account: c, amounts: l } = a, u = a.chargers ?? [s(n, o)], d = a.feeMultipliers ?? u.map(() => 10000n);
10
+ if (u.length !== l.length || u.length !== d.length) throw new t("validation", "OPERATIONAL_FEE_APPROVAL_MISMATCH", `approveOperationalFee: chargers (${u.length}), amounts (${l.length}) and feeMultipliers (${d.length}) must have the same length.`);
11
+ return r(n, {
12
+ account: c,
13
+ data: i({
14
+ abi: e,
15
+ functionName: "approveOperationalFeeWithMultiplier",
16
+ args: [
17
+ [...u],
18
+ [...l],
19
+ [...d]
20
+ ]
21
+ }),
22
+ chainId: o,
23
+ from: a.from,
24
+ simulateBeforeWrite: a.simulateBeforeWrite,
25
+ gasless: a.gasless
26
+ });
27
+ }
28
+ function s(e, r) {
29
+ try {
30
+ return n(e, { chainId: r }).gaslessLayerAddress;
31
+ } catch {
32
+ throw new t("validation", "GASLESS_CHARGER_REQUIRED", "approveOperationalFee: pass `chargers` explicitly — the chain has no gasless block to default them from.");
33
+ }
34
+ }
35
+ //#endregion
36
+ export { a as OPERATIONAL_FEE_LIST_PRICE_MULTIPLIER, o as approveOperationalFee };
37
+
38
+ //# sourceMappingURL=approve-operational-fee.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approve-operational-fee.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/approve-operational-fee.ts"],"sourcesContent":["import { encodeFunctionData, type Address, type Hash } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport { resolveGaslessService } from \"../../../gasless/resolve-gasless\";\nimport { SymmError } from \"../../../shared/errors/symm-error\";\nimport type { Compute, GaslessWriteParameter, WriteContractParameter } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.6/symmio\";\nimport { callAsSubAccount } from \"../internal/call-as-sub-account\";\n\n/**\n * Fee multiplier meaning \"list price\" (basis points). The default the diamond\n * applies when a pair has never set one.\n */\nexport const OPERATIONAL_FEE_LIST_PRICE_MULTIPLIER = 10_000n;\n\n/**\n * Parameters for {@link approveOperationalFee}.\n */\nexport type ApproveOperationalFeeParameters = Compute<\n WriteContractParameter &\n GaslessWriteParameter & {\n /**\n * The sub-account that pays operational fees. The call is routed through\n * the AccountLayer `_call` proxy so the diamond sees this sub-account as\n * `msg.sender` — the allowance is keyed by payer, and a direct wallet call\n * would grant it from the wrong account. The connected wallet must be the\n * sub-account's `owner`.\n */\n account: Address;\n /**\n * The fee chargers to approve. Defaults to the chain's\n * `gasless.gaslessLayerAddress` — the GaslessLayer **proxy**, which is\n * the charger for relayed operations. Never the relayer's executor\n * address.\n */\n chargers?: readonly Address[];\n /**\n * Allowance per charger, parallel to `chargers`, in **18-decimal Core\n * units** — the scale of the Core balance the fee is drawn from, not the\n * collateral token's decimals. `parseUnits(\"5\", 18)` is a budget of 5\n * collateral tokens; `collateralToCore18` converts a token amount.\n *\n * Each value **replaces** the current allowance (ERC-20 `approve`\n * style, not an increment), and every charge decrements it. Choose a\n * bounded budget for the operations you intend to relay rather than\n * `maxUint256`. A raise applies immediately; a **reduction** can be\n * timelocked on-chain, in which case the old value keeps applying until\n * `reductionReadyAt`.\n */\n amounts: readonly bigint[];\n /**\n * Fee multiplier per charger in basis points; `10000n` = list price.\n * Defaults to {@link OPERATIONAL_FEE_LIST_PRICE_MULTIPLIER} for every\n * charger. The call always sets the multiplier, so omitting this resets\n * a previously set one to list price.\n */\n feeMultipliers?: readonly bigint[];\n }\n>;\n\n/** Return type of {@link approveOperationalFee}: the submitted transaction hash. */\nexport type ApproveOperationalFeeReturnType = Hash;\n\n/**\n * Approve operational-fee allowances (`approveOperationalFeeWithMultiplier`)\n * for the gasless fee charger, as the paying sub-account.\n *\n * The GaslessLayer proxy can only charge a payer up to this allowance, so grant\n * it **before** relying on gasless execution. When the relayer itself is down,\n * this wallet-paid path (via `AccountLayer._call`) is the only way to grant it.\n * The approval is also itself relayable: pass `gasless: true` once the\n * transparent gasless mode is active to have the relayer submit it.\n *\n * Amounts are **18-decimal Core units**. Approving only permits the charge — it\n * does not add collateral, and the fee is still drawn from the payer's Core\n * balance. Whatever its allowance, a payer short of balance fails with\n * `OperationalFee: Insufficient balance`. Read the allowance back with\n * `getOperationalFeeAllowance` after the transaction lands, before relying on it.\n *\n * @param config - The SDK config (must have a `getWalletClient` resolver).\n * @param parameters - Paying sub-account, chargers/amounts/multipliers, write options.\n * @returns The submitted transaction hash.\n * @throws {SymmError} `GASLESS_CHARGER_REQUIRED` when no `chargers` are given and\n * the chain has no gasless block to default from.\n * @throws {SymmError} `OPERATIONAL_FEE_APPROVAL_MISMATCH` when the array lengths disagree.\n *\n * @example\n * ```ts\n * import { parseUnits } from \"viem\";\n *\n * // A bounded fee budget of 5 collateral tokens, in 18-decimal Core units.\n * const hash = await approveOperationalFee(config, {\n * account: subAccount,\n * amounts: [parseUnits(\"5\", 18)],\n * });\n * ```\n */\nexport async function approveOperationalFee(\n config: Config,\n parameters: ApproveOperationalFeeParameters,\n): Promise<ApproveOperationalFeeReturnType> {\n const { chainId, account, amounts } = parameters;\n\n const chargers = parameters.chargers ?? [resolveDefaultCharger(config, chainId)];\n const feeMultipliers = parameters.feeMultipliers ?? chargers.map(() => OPERATIONAL_FEE_LIST_PRICE_MULTIPLIER);\n\n if (chargers.length !== amounts.length || chargers.length !== feeMultipliers.length) {\n throw new SymmError(\n \"validation\",\n \"OPERATIONAL_FEE_APPROVAL_MISMATCH\",\n `approveOperationalFee: chargers (${chargers.length}), amounts (${amounts.length}) and feeMultipliers (${feeMultipliers.length}) must have the same length.`,\n );\n }\n\n const data = encodeFunctionData({\n abi: symmioAbi,\n functionName: \"approveOperationalFeeWithMultiplier\",\n args: [[...chargers], [...amounts], [...feeMultipliers]],\n });\n\n return callAsSubAccount(config, {\n account,\n data,\n chainId,\n from: parameters.from,\n simulateBeforeWrite: parameters.simulateBeforeWrite,\n gasless: parameters.gasless,\n });\n}\n\nfunction resolveDefaultCharger(config: Config, chainId: number | undefined): Address {\n try {\n return resolveGaslessService(config, { chainId }).gaslessLayerAddress;\n } catch {\n throw new SymmError(\n \"validation\",\n \"GASLESS_CHARGER_REQUIRED\",\n \"approveOperationalFee: pass `chargers` explicitly — the chain has no gasless block to default them from.\",\n );\n }\n}\n"],"mappings":";;;;;;AAYA,IAAa,IAAwC;AAoFrD,eAAsB,EACpB,GACA,GAC0C;CAC1C,IAAM,EAAE,YAAS,YAAS,eAAY,GAEhC,IAAW,EAAW,YAAY,CAAC,EAAsB,GAAQ,CAAO,CAAC,GACzE,IAAiB,EAAW,kBAAkB,EAAS,UAAA,MAA+C;CAE5G,IAAI,EAAS,WAAW,EAAQ,UAAU,EAAS,WAAW,EAAe,QAC3E,MAAM,IAAI,EACR,cACA,qCACA,oCAAoC,EAAS,OAAO,cAAc,EAAQ,OAAO,wBAAwB,EAAe,OAAO,6BACjI;CASF,OAAO,EAAiB,GAAQ;EAC9B;EACA,MARW,EAAmB;GAC9B,KAAK;GACL,cAAc;GACd,MAAM;IAAC,CAAC,GAAG,CAAQ;IAAG,CAAC,GAAG,CAAO;IAAG,CAAC,GAAG,CAAc;GAAC;EACzD,CAIE;EACA;EACA,MAAM,EAAW;EACjB,qBAAqB,EAAW;EAChC,SAAS,EAAW;CACtB,CAAC;AACH;AAEA,SAAS,EAAsB,GAAgB,GAAsC;CACnF,IAAI;EACF,OAAO,EAAsB,GAAQ,EAAE,WAAQ,CAAC,EAAE;CACpD,QAAQ;EACN,MAAM,IAAI,EACR,cACA,4BACA,0GACF;CACF;AACF"}
@@ -1,12 +1,12 @@
1
1
  import { Address, Hash, Hex } from 'viem';
2
2
  import { Config } from '../../../core/config/index.js';
3
- import { Compute, WriteContractParameter } from '../../../shared/types/properties.js';
3
+ import { Compute, GaslessWriteParameter, WriteContractParameter } from '../../../shared/types/properties.js';
4
4
  import { SingleUpnlSig } from '../../account-layer/types.js';
5
5
  import { WithdrawReceiverPart } from '../types.js';
6
6
  /**
7
7
  * Parameters for {@link deallocateAndInitiateWithdraw}.
8
8
  */
9
- export type DeallocateAndInitiateWithdrawParameters = Compute<WriteContractParameter & {
9
+ export type DeallocateAndInitiateWithdrawParameters = Compute<WriteContractParameter & GaslessWriteParameter & {
10
10
  /**
11
11
  * The subaccount to deallocate from and initiate the withdrawal for. Both
12
12
  * inner calls are routed through the AccountLayer `_call` proxy so the core
@@ -1 +1 @@
1
- {"version":3,"file":"deallocate-and-initiate-withdraw.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/symmio/actions/deallocate-and-initiate-withdraw.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,GAAG,EAAE,MAAM,MAAM,CAAC;AAC7E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAExF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,uCAAuC,GAAG,OAAO,CAC3D,sBAAsB,GAAG;IACvB;;;;;OAKG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,KAAK,EAAE,SAAS,oBAAoB,EAAE,CAAC;IACvC;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB,CACF,CAAC;AAEF,4FAA4F;AAC5F,MAAM,MAAM,uCAAuC,GAAG,IAAI,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAsB,6BAA6B,CACjD,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,uCAAuC,GAClD,OAAO,CAAC,uCAAuC,CAAC,CAyBlD"}
1
+ {"version":3,"file":"deallocate-and-initiate-withdraw.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/symmio/actions/deallocate-and-initiate-withdraw.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,GAAG,EAAE,MAAM,MAAM,CAAC;AAC7E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,EAAE,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAE/G,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,uCAAuC,GAAG,OAAO,CAC3D,sBAAsB,GACpB,qBAAqB,GAAG;IACtB;;;;;OAKG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,KAAK,EAAE,SAAS,oBAAoB,EAAE,CAAC;IACvC;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB,CACJ,CAAC;AAEF,4FAA4F;AAC5F,MAAM,MAAM,uCAAuC,GAAG,IAAI,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAsB,6BAA6B,CACjD,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,uCAAuC,GAClD,OAAO,CAAC,uCAAuC,CAAC,CA0BlD"}
@@ -25,7 +25,8 @@ async function i(i, a) {
25
25
  })],
26
26
  chainId: o,
27
27
  from: f,
28
- simulateBeforeWrite: a.simulateBeforeWrite
28
+ simulateBeforeWrite: a.simulateBeforeWrite,
29
+ gasless: a.gasless
29
30
  });
30
31
  }
31
32
  //#endregion
@@ -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.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
+ {"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, GaslessWriteParameter, 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 GaslessWriteParameter & {\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 gasless: parameters.gasless,\n });\n}\n"],"mappings":";;;;;AAsGA,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;EAChC,SAAS,EAAW;CACtB,CAAC;AACH"}
@@ -1,11 +1,11 @@
1
1
  import { Address, Hash } from 'viem';
2
2
  import { Config } from '../../../core/config/index.js';
3
- import { Compute, WriteContractParameter } from '../../../shared/types/properties.js';
3
+ import { Compute, GaslessWriteParameter, WriteContractParameter } from '../../../shared/types/properties.js';
4
4
  import { SingleUpnlSig } from '../../account-layer/types.js';
5
5
  /**
6
6
  * Parameters for {@link deallocate}.
7
7
  */
8
- export type DeallocateParameters = Compute<WriteContractParameter & {
8
+ export type DeallocateParameters = Compute<WriteContractParameter & GaslessWriteParameter & {
9
9
  /**
10
10
  * The subaccount to deallocate from. The call is routed through the
11
11
  * AccountLayer `_call` proxy; the connected wallet must be its on-chain `owner`.
@@ -1 +1 @@
1
- {"version":3,"file":"deallocate.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/symmio/actions/deallocate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,MAAM,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAExF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAG/D;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,CACxC,sBAAsB,GAAG;IACvB;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB,CACF,CAAC;AAEF,yEAAyE;AACzE,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAsB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAmBhH"}
1
+ {"version":3,"file":"deallocate.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/symmio/actions/deallocate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,MAAM,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,EAAE,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAE/G,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAG/D;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,CACxC,sBAAsB,GACpB,qBAAqB,GAAG;IACtB;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB,CACJ,CAAC;AAEF,yEAAyE;AACzE,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAsB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAoBhH"}
@@ -17,7 +17,8 @@ async function i(i, a) {
17
17
  }),
18
18
  chainId: o,
19
19
  from: a.from,
20
- simulateBeforeWrite: a.simulateBeforeWrite
20
+ simulateBeforeWrite: a.simulateBeforeWrite,
21
+ gasless: a.gasless
21
22
  });
22
23
  }
23
24
  //#endregion
@@ -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.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
+ {"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, GaslessWriteParameter, 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 GaslessWriteParameter & {\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 gasless: parameters.gasless,\n });\n}\n"],"mappings":";;;;;AA2EA,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;EAChC,SAAS,EAAW;CACtB,CAAC;AACH"}
@@ -1,10 +1,10 @@
1
1
  import { Address, Hash } from 'viem';
2
2
  import { Config } from '../../../core/config/index.js';
3
- import { Compute, WriteContractParameter } from '../../../shared/types/properties.js';
3
+ import { Compute, GaslessWriteParameter, WriteContractParameter } from '../../../shared/types/properties.js';
4
4
  /**
5
5
  * Parameters for {@link finalizeWithdrawRequest}.
6
6
  */
7
- export type FinalizeWithdrawRequestParameters = Compute<WriteContractParameter & {
7
+ export type FinalizeWithdrawRequestParameters = Compute<WriteContractParameter & GaslessWriteParameter & {
8
8
  /** The subaccount that owns the request (the request's on-chain `user`). */
9
9
  user: Address;
10
10
  /** Id of the withdraw request to finalize. */
@@ -24,16 +24,28 @@ export type FinalizeWithdrawRequestReturnType = Hash;
24
24
  * Dry-runs the call with {@link simulateFinalizeWithdrawRequest} first unless
25
25
  * `simulateBeforeWrite` is `false` (per-call, falling back to the config default).
26
26
  *
27
+ * Relayable: pass `gasless` (or run the chain in `gasless.execution.mode`) to
28
+ * sign the same calldata as an InstantLayer operation instead of sending a
29
+ * transaction. The operation is signed by `user` — the request's own owner
30
+ * sub-account, which is therefore the account charged the operational fee —
31
+ * unless `gasless.account` names another. This completes the gasless withdraw:
32
+ * the initiating leg relays too, so neither step needs native gas.
33
+ *
27
34
  * @param config - The SDK config (must have a `getWalletClient` resolver).
28
35
  * @param parameters - The request's owner subaccount, request id, optional chain id.
29
- * @returns The submitted transaction hash. The caller waits on the receipt.
36
+ * @returns The submitted transaction hash — the relayer's broadcast hash when relayed.
30
37
  * @throws {SymmError} when the chain is unsupported or no wallet is available.
38
+ * @throws {SymmError} `GASLESS_NOT_CONFIGURED` when `gasless` is explicitly `true`
39
+ * on a chain that carries no gasless service.
31
40
  * @throws Viem's write errors (`ContractFunctionExecutionError`, ...) — including
32
41
  * when the cooldown has not yet elapsed.
33
42
  *
34
43
  * @example
35
44
  * ```ts
36
45
  * const hash = await finalizeWithdrawRequest(config, { user: "0xsub…", requestId: 1n });
46
+ *
47
+ * // …or relayed, paying the fee from SYMMIO collateral instead of native gas:
48
+ * const relayed = await finalizeWithdrawRequest(config, { user: "0xsub…", requestId: 1n, gasless: true });
37
49
  * ```
38
50
  */
39
51
  export declare function finalizeWithdrawRequest(config: Config, parameters: FinalizeWithdrawRequestParameters): Promise<FinalizeWithdrawRequestReturnType>;
@@ -1 +1 @@
1
- {"version":3,"file":"finalize-withdraw-request.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/symmio/actions/finalize-withdraw-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAKxF;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,OAAO,CACrD,sBAAsB,GAAG;IACvB,4EAA4E;IAC5E,IAAI,EAAE,OAAO,CAAC;IACd,8CAA8C;IAC9C,SAAS,EAAE,MAAM,CAAC;CACnB,CACF,CAAC;AAEF,sFAAsF;AACtF,MAAM,MAAM,iCAAiC,GAAG,IAAI,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,iCAAiC,GAC5C,OAAO,CAAC,iCAAiC,CAAC,CAkB5C"}
1
+ {"version":3,"file":"finalize-withdraw-request.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/symmio/actions/finalize-withdraw-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,EAAE,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAK/G;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,OAAO,CACrD,sBAAsB,GACpB,qBAAqB,GAAG;IACtB,4EAA4E;IAC5E,IAAI,EAAE,OAAO,CAAC;IACd,8CAA8C;IAC9C,SAAS,EAAE,MAAM,CAAC;CACnB,CACJ,CAAC;AAEF,sFAAsF;AACtF,MAAM,MAAM,iCAAiC,GAAG,IAAI,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,iCAAiC,GAC5C,OAAO,CAAC,iCAAiC,CAAC,CA6C5C"}
@@ -1,27 +1,44 @@
1
1
  import { symmioAbi as e } from "../../abi/v0.8.6/symmio.js";
2
- import { shouldSimulateBeforeWrite as t } from "../../../shared/utils/simulate-before-write.js";
3
- import { simulateFinalizeWithdrawRequest as n } from "./simulate-finalize-withdraw-request.js";
2
+ import { maybeRelayAsGasless as t } from "../../../gasless/dispatch/maybe-relay-as-gasless.js";
3
+ import { shouldSimulateBeforeWrite as n } from "../../../shared/utils/simulate-before-write.js";
4
+ import { simulateFinalizeWithdrawRequest as r } from "./simulate-finalize-withdraw-request.js";
5
+ import { encodeFunctionData as i } from "viem";
4
6
  //#region src/symmio-contracts/symmio/actions/finalize-withdraw-request.ts
5
- async function r(r, i) {
6
- let { chainId: a, user: o, requestId: s, from: c } = i, { addresses: l } = r.getChainConfig(a), u = await r.getWalletClient({
7
- chainId: a,
8
- from: c
7
+ async function a(a, o) {
8
+ let { chainId: s, user: c, requestId: l, from: u } = o, { addresses: d } = a.getChainConfig(s), f = await t(a, {
9
+ chainId: s,
10
+ from: u,
11
+ gasless: o.gasless,
12
+ signerAccount: c,
13
+ calls: [{
14
+ target: d.symmioAddress,
15
+ callData: i({
16
+ abi: e,
17
+ functionName: "finalizeWithdrawRequest",
18
+ args: [c, l]
19
+ })
20
+ }]
9
21
  });
10
- return t(r, i) && await n(r, {
11
- chainId: a,
12
- user: o,
13
- requestId: s,
14
- from: u.account.address
15
- }), u.writeContract({
16
- address: l.symmioAddress,
22
+ if (f !== null) return f;
23
+ let p = await a.getWalletClient({
24
+ chainId: s,
25
+ from: u
26
+ });
27
+ return n(a, o) && await r(a, {
28
+ chainId: s,
29
+ user: c,
30
+ requestId: l,
31
+ from: p.account.address
32
+ }), p.writeContract({
33
+ address: d.symmioAddress,
17
34
  abi: e,
18
35
  functionName: "finalizeWithdrawRequest",
19
- args: [o, s],
20
- account: u.account,
21
- chain: u.chain
36
+ args: [c, l],
37
+ account: p.account,
38
+ chain: p.chain
22
39
  });
23
40
  }
24
41
  //#endregion
25
- export { r as finalizeWithdrawRequest };
42
+ export { a as finalizeWithdrawRequest };
26
43
 
27
44
  //# sourceMappingURL=finalize-withdraw-request.js.map
@@ -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.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
+ {"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 { encodeFunctionData } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport { maybeRelayAsGasless } from \"../../../gasless/dispatch/maybe-relay-as-gasless\";\nimport type { Compute, GaslessWriteParameter, 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 GaslessWriteParameter & {\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 * Relayable: pass `gasless` (or run the chain in `gasless.execution.mode`) to\n * sign the same calldata as an InstantLayer operation instead of sending a\n * transaction. The operation is signed by `user` — the request's own owner\n * sub-account, which is therefore the account charged the operational fee —\n * unless `gasless.account` names another. This completes the gasless withdraw:\n * the initiating leg relays too, so neither step needs native gas.\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 relayer's broadcast hash when relayed.\n * @throws {SymmError} when the chain is unsupported or no wallet is available.\n * @throws {SymmError} `GASLESS_NOT_CONFIGURED` when `gasless` is explicitly `true`\n * on a chain that carries no gasless service.\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 * // …or relayed, paying the fee from SYMMIO collateral instead of native gas:\n * const relayed = await finalizeWithdrawRequest(config, { user: \"0xsub…\", requestId: 1n, gasless: true });\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\n /**\n * Transparent gasless seam — see {@link addMargin}. Unlike the other core\n * writes this one targets the diamond directly rather than through the\n * AccountLayer `_call` proxy (it is permissionless), so the relay signs it\n * as an operation of the request's own owner sub-account: `user` is the\n * billing/authority account unless `gasless.account` overrides it.\n * `null` means: proceed on the wallet path below, unchanged.\n */\n const relayed = await maybeRelayAsGasless(config, {\n chainId,\n from,\n gasless: parameters.gasless,\n signerAccount: user,\n calls: [\n {\n target: addresses.symmioAddress,\n callData: encodeFunctionData({\n abi: symmioAbi,\n functionName: \"finalizeWithdrawRequest\",\n args: [user, requestId],\n }),\n },\n ],\n });\n if (relayed !== null) return relayed;\n\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":";;;;;;AA6DA,eAAsB,EACpB,GACA,GAC4C;CAC5C,IAAM,EAAE,YAAS,SAAM,cAAW,YAAS,GAErC,EAAE,iBAAc,EAAO,eAAe,CAAO,GAU7C,IAAU,MAAM,EAAoB,GAAQ;EAChD;EACA;EACA,SAAS,EAAW;EACpB,eAAe;EACf,OAAO,CACL;GACE,QAAQ,EAAU;GAClB,UAAU,EAAmB;IAC3B,KAAK;IACL,cAAc;IACd,MAAM,CAAC,GAAM,CAAS;GACxB,CAAC;EACH,CACF;CACF,CAAC;CACD,IAAI,MAAY,MAAM,OAAO;CAE7B,IAAM,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,10 +1,10 @@
1
1
  import { Address, Hash } from 'viem';
2
2
  import { Config } from '../../../core/config/index.js';
3
- import { Compute, WriteContractParameter } from '../../../shared/types/properties.js';
3
+ import { Compute, GaslessWriteParameter, WriteContractParameter } from '../../../shared/types/properties.js';
4
4
  /**
5
5
  * Parameters for {@link forceCancelCloseRequest}.
6
6
  */
7
- export type ForceCancelCloseRequestParameters = Compute<WriteContractParameter & {
7
+ export type ForceCancelCloseRequestParameters = Compute<WriteContractParameter & GaslessWriteParameter & {
8
8
  /**
9
9
  * The subaccount (partyA) that owns the quote. Routed through the AccountLayer
10
10
  * `_call` proxy so the core sees this subaccount as the caller; the connected