@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 @@
1
+ {"version":3,"file":"resubmit-gasless-request.js","names":[],"sources":["../../../src/gasless/resubmit-gasless-request/resubmit-gasless-request.ts"],"sourcesContent":["import { isAddress, type Address } from \"viem\";\nimport type { Config } from \"../../core/config\";\nimport { SymmError } from \"../../shared/errors/symm-error\";\nimport { getGaslessWalletAddress } from \"../get-gasless-wallet-address/get-gasless-wallet-address\";\nimport { postGaslessSubmit, resolveGaslessHttp } from \"../http\";\nimport { assertGaslessDepositWallet, toGaslessDepositReceipt } from \"../to-gasless-deposit-receipt\";\nimport { toGaslessSubmitReceipt } from \"../to-gasless-submit-receipt\";\nimport type { GaslessDepositSubmitReceipt, GaslessSubmitReceipt } from \"../types\";\nimport type { GaslessUnconfirmedSubmit } from \"../unconfirmed-submit\";\nimport { parseGaslessWalletId } from \"../wallet-id\";\nimport type { GaslessWireDepositAccepted, GaslessWireOperationAccepted } from \"../wire-types\";\n\n/** Parameters for {@link resubmitGaslessRequest}: the recorded submit, unchanged. */\nexport type ResubmitGaslessRequestParameters = GaslessUnconfirmedSubmit;\n\n/** Return type of {@link resubmitGaslessRequest}. */\nexport type ResubmitGaslessRequestReturnType = GaslessSubmitReceipt | GaslessDepositSubmitReceipt;\n\nfunction asRecord(value: unknown): Record<string, unknown> {\n if (typeof value !== \"object\" || value === null || Array.isArray(value)) {\n throw new SymmError(\n \"validation\",\n \"GASLESS_RESUBMIT_BODY_INVALID\",\n \"Gasless: the recorded submit has no JSON object body, so there is nothing to resend. Only a GaslessUnconfirmedSubmit taken from getGaslessUnconfirmedSubmit can be resubmitted.\",\n );\n }\n return value as Record<string, unknown>;\n}\n\n/** Read an address the recorded body must carry, without rebuilding the body. */\nfunction requireAddress(body: Record<string, unknown>, field: string): Address {\n const value = body[field];\n if (typeof value !== \"string\" || !isAddress(value)) {\n throw new SymmError(\n \"validation\",\n \"GASLESS_RESUBMIT_BODY_INVALID\",\n `Gasless: the recorded submit body has no valid \"${field}\" address, so the acceptance could not be attributed to an owner. Resubmit only a GaslessUnconfirmedSubmit taken from getGaslessUnconfirmedSubmit.`,\n );\n }\n return value;\n}\n\n/**\n * Resend an **unconfirmed** gasless submit, byte for byte, under its original\n * idempotency key.\n *\n * This is the vendor's prescribed recovery for a lost response: the same key\n * with the same payload either lands the request or returns the record the\n * service already created, so it can never execute the intent twice. It is the\n * *only* safe response to `GASLESS_SUBMIT_UNCONFIRMED` — re-running the intent\n * through the wallet would double-execute whatever the relayer accepted.\n *\n * The body is sent exactly as recorded, never rebuilt: the signatures inside it\n * cover specific nonces and deadlines, and a regenerated payload would be a\n * different request under a key the service has already bound.\n *\n * A deposit settlement is re-verified the same way the original submit was —\n * the wallet's deterministic address is read before the POST and checked\n * against the acceptance — so a replay can never sweep a wallet you did not\n * fund.\n *\n * @param config - The SDK config.\n * @param submit - The record from `getGaslessUnconfirmedSubmit(err)`, unmodified.\n * @returns The acceptance receipt: an operation receipt for `/gateway/relay-instant`,\n * a deposit receipt for either settlement path.\n * @throws {SymmError} `GASLESS_NOT_CONFIGURED` / `GASLESS_UNSUPPORTED_CONTRACTS_VERSION` for the recorded chain.\n * @throws {SymmError} `GASLESS_RESUBMIT_BODY_INVALID` when the record is not a submit this SDK produced.\n * @throws {SymmApiError} `GASLESS_SUBMIT_UNCONFIRMED` again when the replay is itself\n * inconclusive — keep the record and try again later.\n *\n * @example\n * ```ts\n * try {\n * await relayInstantOperations(config, parameters);\n * } catch (err) {\n * const pending = getGaslessUnconfirmedSubmit(err);\n * if (!pending) throw err;\n * await store.save(pending);\n * const receipt = await resubmitGaslessRequest(config, pending);\n * await store.clear(pending.idempotencyKey);\n * }\n * ```\n */\nexport async function resubmitGaslessRequest(\n config: Config,\n submit: ResubmitGaslessRequestParameters,\n): Promise<ResubmitGaslessRequestReturnType> {\n const { chainId, path, body, idempotencyKey } = submit;\n const context = resolveGaslessHttp(config, { chainId, service: submit.service });\n const record = asRecord(body);\n\n if (path === \"/gateway/relay-instant\") {\n const owner = requireAddress(record, \"userAddress\");\n const walletIds = Array.isArray(record.walletIds)\n ? record.walletIds.map((walletId, index) => parseGaslessWalletId(walletId, `walletIds[${index}]`))\n : [];\n const raw = await postGaslessSubmit<GaslessWireOperationAccepted>(context, path, body, idempotencyKey);\n return toGaslessSubmitReceipt(raw, {\n owner,\n walletIds,\n idempotencyKey,\n protocolInstance: context.protocolInstance,\n });\n }\n\n const owner = requireAddress(record, \"owner\");\n const walletId =\n record.walletId === undefined || record.walletId === null ? 0n : parseGaslessWalletId(record.walletId);\n\n /** Read before the POST, exactly as the original settlement did: a failed read must not follow a 202. */\n const depositAddress = await getGaslessWalletAddress(config, { chainId, owner, walletId });\n\n const raw = await postGaslessSubmit<GaslessWireDepositAccepted>(context, path, body, idempotencyKey);\n const receipt = toGaslessDepositReceipt(raw, {\n owner,\n walletId,\n idempotencyKey,\n protocolInstance: context.protocolInstance,\n });\n assertGaslessDepositWallet(receipt, { walletId, depositAddress, url: context.baseURL, path });\n return receipt;\n}\n"],"mappings":";;;;;;;;AAkBA,SAAS,EAAS,GAAyC;CACzD,IAAI,OAAO,KAAU,aAAY,KAAkB,MAAM,QAAQ,CAAK,GACpE,MAAM,IAAI,EACR,cACA,iCACA,iLACF;CAEF,OAAO;AACT;AAGA,SAAS,EAAe,GAA+B,GAAwB;CAC7E,IAAM,IAAQ,EAAK;CACnB,IAAI,OAAO,KAAU,YAAY,CAAC,EAAU,CAAK,GAC/C,MAAM,IAAI,EACR,cACA,iCACA,mDAAmD,EAAM,mJAC3D;CAEF,OAAO;AACT;AA2CA,eAAsB,EACpB,GACA,GAC2C;CAC3C,IAAM,EAAE,YAAS,SAAM,SAAM,sBAAmB,GAC1C,IAAU,EAAmB,GAAQ;EAAE;EAAS,SAAS,EAAO;CAAQ,CAAC,GACzE,IAAS,EAAS,CAAI;CAE5B,IAAI,MAAS,0BAA0B;EACrC,IAAM,IAAQ,EAAe,GAAQ,aAAa,GAC5C,IAAY,MAAM,QAAQ,EAAO,SAAS,IAC5C,EAAO,UAAU,KAAK,GAAU,MAAU,EAAqB,GAAU,aAAa,EAAM,EAAE,CAAC,IAC/F,CAAC;EAEL,OAAO,EAAuB,MADZ,EAAgD,GAAS,GAAM,GAAM,CAAc,GAClE;GACjC;GACA;GACA;GACA,kBAAkB,EAAQ;EAC5B,CAAC;CACH;CAEA,IAAM,IAAQ,EAAe,GAAQ,OAAO,GACtC,IACJ,EAAO,aAAa,KAAA,KAAa,EAAO,aAAa,OAAO,KAAK,EAAqB,EAAO,QAAQ,GAGjG,IAAiB,MAAM,EAAwB,GAAQ;EAAE;EAAS;EAAO;CAAS,CAAC,GAGnF,IAAU,EAAwB,MADtB,EAA8C,GAAS,GAAM,GAAM,CAAc,GACtD;EAC3C;EACA;EACA;EACA,kBAAkB,EAAQ;CAC5B,CAAC;CAED,OADA,EAA2B,GAAS;EAAE;EAAU;EAAgB,KAAK,EAAQ;EAAS;CAAK,CAAC,GACrF;AACT"}
@@ -0,0 +1,3 @@
1
+ export * from './query.js';
2
+ export * from './settle-gasless-deposit-existing-account.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/gasless/settle-gasless-deposit-existing-account/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,2CAA2C,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { Config } from '../../core/config/index.js';
2
+ import { SettleGaslessDepositExistingAccountParameters, SettleGaslessDepositExistingAccountReturnType } from './settle-gasless-deposit-existing-account.js';
3
+ /**
4
+ * Build TanStack Mutation options for {@link settleGaslessDepositExistingAccount}.
5
+ *
6
+ * @param config - The SDK config.
7
+ * @returns Options to pass to `useMutation`.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * useMutation(settleGaslessDepositExistingAccountMutationOptions(config));
12
+ * ```
13
+ */
14
+ export declare function settleGaslessDepositExistingAccountMutationOptions(config: Config): {
15
+ mutationKey: readonly ["settleGaslessDepositExistingAccount"];
16
+ mutationFn: (variables: SettleGaslessDepositExistingAccountParameters) => Promise<SettleGaslessDepositExistingAccountReturnType>;
17
+ };
18
+ //# sourceMappingURL=query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/gasless/settle-gasless-deposit-existing-account/query.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAEL,KAAK,6CAA6C,EAClD,KAAK,6CAA6C,EACnD,MAAM,2CAA2C,CAAC;AAEnD;;;;;;;;;;GAUG;AACH,wBAAgB,kDAAkD,CAAC,MAAM,EAAE,MAAM;;4BAIhE,6CAA6C,KACvD,OAAO,CAAC,6CAA6C,CAAC;EAE5D"}
@@ -0,0 +1,12 @@
1
+ import { settleGaslessDepositExistingAccount as e } from "./settle-gasless-deposit-existing-account.js";
2
+ //#region src/gasless/settle-gasless-deposit-existing-account/query.ts
3
+ function t(t) {
4
+ return {
5
+ mutationKey: ["settleGaslessDepositExistingAccount"],
6
+ mutationFn: (n) => e(t, n)
7
+ };
8
+ }
9
+ //#endregion
10
+ export { t as settleGaslessDepositExistingAccountMutationOptions };
11
+
12
+ //# sourceMappingURL=query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.js","names":[],"sources":["../../../src/gasless/settle-gasless-deposit-existing-account/query.ts"],"sourcesContent":["import type { Config } from \"../../core/config\";\nimport {\n settleGaslessDepositExistingAccount,\n type SettleGaslessDepositExistingAccountParameters,\n type SettleGaslessDepositExistingAccountReturnType,\n} from \"./settle-gasless-deposit-existing-account\";\n\n/**\n * Build TanStack Mutation options for {@link settleGaslessDepositExistingAccount}.\n *\n * @param config - The SDK config.\n * @returns Options to pass to `useMutation`.\n *\n * @example\n * ```ts\n * useMutation(settleGaslessDepositExistingAccountMutationOptions(config));\n * ```\n */\nexport function settleGaslessDepositExistingAccountMutationOptions(config: Config) {\n return {\n mutationKey: [\"settleGaslessDepositExistingAccount\"] as const,\n mutationFn: (\n variables: SettleGaslessDepositExistingAccountParameters,\n ): Promise<SettleGaslessDepositExistingAccountReturnType> => settleGaslessDepositExistingAccount(config, variables),\n };\n}\n"],"mappings":";;AAkBA,SAAgB,EAAmD,GAAgB;CACjF,OAAO;EACL,aAAa,CAAC,qCAAqC;EACnD,aACE,MAC2D,EAAoC,GAAQ,CAAS;CACpH;AACF"}
@@ -0,0 +1,66 @@
1
+ import { Address } from 'viem';
2
+ import { Config } from '../../core/config/index.js';
3
+ import { ChainIdParameter, Compute } from '../../shared/types/properties.js';
4
+ import { GaslessDepositSubmitReceipt } from '../types.js';
5
+ /**
6
+ * Parameters for {@link settleGaslessDepositExistingAccount}.
7
+ */
8
+ export type SettleGaslessDepositExistingAccountParameters = Compute<ChainIdParameter & {
9
+ /**
10
+ * Owner of the GaslessWallet whose deposit address is being settled — an
11
+ * owner address, never a GaslessWallet address.
12
+ */
13
+ owner: Address;
14
+ /**
15
+ * Which of the owner's GaslessWallets to sweep. Defaults to `0n`, the
16
+ * original wallet. Each id has its own deposit address and balance.
17
+ */
18
+ walletId?: bigint;
19
+ /** The existing wallet-owned sub-account to credit; the gateway verifies ownership. */
20
+ subAccount: Address;
21
+ /**
22
+ * Stable retry key; defaults to a random UUID.
23
+ *
24
+ * **One key per settlement attempt.** Reuse it only to replay a submit
25
+ * whose response was lost — the service then returns the existing record.
26
+ * A **completed** settlement's key must never be reused: mint a fresh one
27
+ * after any terminal status, and after any change to the wallet selection,
28
+ * or the service answers `409 IDEMPOTENCY_KEY_CONFLICT`
29
+ * (`isGaslessIdempotencyConflictError`).
30
+ */
31
+ idempotencyKey?: string;
32
+ }>;
33
+ /** Return type of {@link settleGaslessDepositExistingAccount}. */
34
+ export type SettleGaslessDepositExistingAccountReturnType = GaslessDepositSubmitReceipt;
35
+ /**
36
+ * Queue the sweep of an owner's deposit address into an **existing**
37
+ * wallet-owned sub-account (a gasless top-up).
38
+ *
39
+ * Same lifecycle as the new-account settlement: the entire observed balance of
40
+ * the selected wallet settles, the flat fee is deducted, and the worker's
41
+ * pre-broadcast re-check can still turn an accepted settlement `rejected`. Poll
42
+ * with `service: "deposits"`. The wallet's deterministic address is read before
43
+ * the submit and checked against the acceptance.
44
+ *
45
+ * @param config - The SDK config.
46
+ * @param parameters - Owner, optional wallet id, target sub-account, retry key.
47
+ * @returns The acceptance receipt; persist `requestId`.
48
+ * @throws {SymmError} `GASLESS_NOT_CONFIGURED` / `GASLESS_UNSUPPORTED_CONTRACTS_VERSION`.
49
+ * @throws {SymmError} `GASLESS_WALLET_ID_INVALID` for a wallet id outside the `uint256` range.
50
+ * @throws {SymmApiError} `GASLESS_SETTLEMENT_SUBMIT_FAILED` on HTTP failure.
51
+ * @throws {SymmApiError} `GASLESS_SUBMIT_UNCONFIRMED` when the outcome could not be
52
+ * established; `responseData` is the replayable submit, for `resubmitGaslessRequest`.
53
+ * @throws {SymmApiError} `GASLESS_DEPOSIT_WALLET_MISMATCH` when the acceptance names
54
+ * another wallet or deposit address, with the parsed receipt as `responseData`.
55
+ *
56
+ * @example
57
+ * ```ts
58
+ * const receipt = await settleGaslessDepositExistingAccount(config, {
59
+ * owner,
60
+ * walletId: 1n,
61
+ * subAccount,
62
+ * });
63
+ * ```
64
+ */
65
+ export declare function settleGaslessDepositExistingAccount(config: Config, parameters: SettleGaslessDepositExistingAccountParameters): Promise<SettleGaslessDepositExistingAccountReturnType>;
66
+ //# sourceMappingURL=settle-gasless-deposit-existing-account.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settle-gasless-deposit-existing-account.d.ts","sourceRoot":"","sources":["../../../src/gasless/settle-gasless-deposit-existing-account/settle-gasless-deposit-existing-account.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAI/E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAO5D;;GAEG;AACH,MAAM,MAAM,6CAA6C,GAAG,OAAO,CACjE,gBAAgB,GAAG;IACjB;;;OAGG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uFAAuF;IACvF,UAAU,EAAE,OAAO,CAAC;IACpB;;;;;;;;;OASG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CACF,CAAC;AAEF,kEAAkE;AAClE,MAAM,MAAM,6CAA6C,GAAG,2BAA2B,CAAC;AAExF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAsB,mCAAmC,CACvD,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,6CAA6C,GACxD,OAAO,CAAC,6CAA6C,CAAC,CAoCxD"}
@@ -0,0 +1,36 @@
1
+ import { generateGaslessIdempotencyKey as e, postGaslessSubmit as t, resolveGaslessHttp as n } from "../http.js";
2
+ import { assertGaslessWalletId as r, toGaslessWalletIdWire as i } from "../wallet-id.js";
3
+ import { getGaslessWalletAddress as a } from "../get-gasless-wallet-address/get-gasless-wallet-address.js";
4
+ import { assertGaslessDepositWallet as o, toGaslessDepositReceipt as s } from "../to-gasless-deposit-receipt.js";
5
+ //#region src/gasless/settle-gasless-deposit-existing-account/settle-gasless-deposit-existing-account.ts
6
+ var c = "/deposit-settlements/existing-account";
7
+ async function l(l, u) {
8
+ let { chainId: d, owner: f, subAccount: p } = u, m = r(u.walletId ?? 0n), h = n(l, {
9
+ chainId: d,
10
+ service: "deposits"
11
+ }), g = u.idempotencyKey ?? e(), _ = {
12
+ idempotencyKey: g,
13
+ owner: f,
14
+ walletId: i(m),
15
+ subAccount: p
16
+ }, v = await a(l, {
17
+ chainId: d,
18
+ owner: f,
19
+ walletId: m
20
+ }), y = s(await t(h, c, _, g), {
21
+ owner: f,
22
+ walletId: m,
23
+ idempotencyKey: g,
24
+ protocolInstance: h.protocolInstance
25
+ });
26
+ return o(y, {
27
+ walletId: m,
28
+ depositAddress: v,
29
+ url: h.baseURL,
30
+ path: c
31
+ }), y;
32
+ }
33
+ //#endregion
34
+ export { l as settleGaslessDepositExistingAccount };
35
+
36
+ //# sourceMappingURL=settle-gasless-deposit-existing-account.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settle-gasless-deposit-existing-account.js","names":[],"sources":["../../../src/gasless/settle-gasless-deposit-existing-account/settle-gasless-deposit-existing-account.ts"],"sourcesContent":["import type { Address } from \"viem\";\nimport type { Config } from \"../../core/config\";\nimport type { ChainIdParameter, Compute } from \"../../shared/types/properties\";\nimport { getGaslessWalletAddress } from \"../get-gasless-wallet-address/get-gasless-wallet-address\";\nimport { generateGaslessIdempotencyKey, postGaslessSubmit, resolveGaslessHttp } from \"../http\";\nimport { assertGaslessDepositWallet, toGaslessDepositReceipt } from \"../to-gasless-deposit-receipt\";\nimport type { GaslessDepositSubmitReceipt } from \"../types\";\nimport { assertGaslessWalletId, toGaslessWalletIdWire } from \"../wallet-id\";\nimport type { GaslessWireDepositAccepted, GaslessWireExistingAccountSettlementRequest } from \"../wire-types\";\n\n/** Path the existing-account settlement submits to, under the deposits service base. */\nconst SETTLE_EXISTING_ACCOUNT_PATH = \"/deposit-settlements/existing-account\";\n\n/**\n * Parameters for {@link settleGaslessDepositExistingAccount}.\n */\nexport type SettleGaslessDepositExistingAccountParameters = Compute<\n ChainIdParameter & {\n /**\n * Owner of the GaslessWallet whose deposit address is being settled — an\n * owner address, never a GaslessWallet address.\n */\n owner: Address;\n /**\n * Which of the owner's GaslessWallets to sweep. Defaults to `0n`, the\n * original wallet. Each id has its own deposit address and balance.\n */\n walletId?: bigint;\n /** The existing wallet-owned sub-account to credit; the gateway verifies ownership. */\n subAccount: Address;\n /**\n * Stable retry key; defaults to a random UUID.\n *\n * **One key per settlement attempt.** Reuse it only to replay a submit\n * whose response was lost — the service then returns the existing record.\n * A **completed** settlement's key must never be reused: mint a fresh one\n * after any terminal status, and after any change to the wallet selection,\n * or the service answers `409 IDEMPOTENCY_KEY_CONFLICT`\n * (`isGaslessIdempotencyConflictError`).\n */\n idempotencyKey?: string;\n }\n>;\n\n/** Return type of {@link settleGaslessDepositExistingAccount}. */\nexport type SettleGaslessDepositExistingAccountReturnType = GaslessDepositSubmitReceipt;\n\n/**\n * Queue the sweep of an owner's deposit address into an **existing**\n * wallet-owned sub-account (a gasless top-up).\n *\n * Same lifecycle as the new-account settlement: the entire observed balance of\n * the selected wallet settles, the flat fee is deducted, and the worker's\n * pre-broadcast re-check can still turn an accepted settlement `rejected`. Poll\n * with `service: \"deposits\"`. The wallet's deterministic address is read before\n * the submit and checked against the acceptance.\n *\n * @param config - The SDK config.\n * @param parameters - Owner, optional wallet id, target sub-account, retry key.\n * @returns The acceptance receipt; persist `requestId`.\n * @throws {SymmError} `GASLESS_NOT_CONFIGURED` / `GASLESS_UNSUPPORTED_CONTRACTS_VERSION`.\n * @throws {SymmError} `GASLESS_WALLET_ID_INVALID` for a wallet id outside the `uint256` range.\n * @throws {SymmApiError} `GASLESS_SETTLEMENT_SUBMIT_FAILED` on HTTP failure.\n * @throws {SymmApiError} `GASLESS_SUBMIT_UNCONFIRMED` when the outcome could not be\n * established; `responseData` is the replayable submit, for `resubmitGaslessRequest`.\n * @throws {SymmApiError} `GASLESS_DEPOSIT_WALLET_MISMATCH` when the acceptance names\n * another wallet or deposit address, with the parsed receipt as `responseData`.\n *\n * @example\n * ```ts\n * const receipt = await settleGaslessDepositExistingAccount(config, {\n * owner,\n * walletId: 1n,\n * subAccount,\n * });\n * ```\n */\nexport async function settleGaslessDepositExistingAccount(\n config: Config,\n parameters: SettleGaslessDepositExistingAccountParameters,\n): Promise<SettleGaslessDepositExistingAccountReturnType> {\n const { chainId, owner, subAccount } = parameters;\n const walletId = assertGaslessWalletId(parameters.walletId ?? 0n);\n const context = resolveGaslessHttp(config, { chainId, service: \"deposits\" });\n const idempotencyKey = parameters.idempotencyKey ?? generateGaslessIdempotencyKey();\n\n const body: GaslessWireExistingAccountSettlementRequest = {\n idempotencyKey,\n owner,\n walletId: toGaslessWalletIdWire(walletId),\n subAccount,\n };\n\n /** Read before the submit: the acceptance is verified against it, and a failed read must not follow a 202. */\n const depositAddress = await getGaslessWalletAddress(config, { chainId, owner, walletId });\n\n const raw = await postGaslessSubmit<GaslessWireDepositAccepted>(\n context,\n SETTLE_EXISTING_ACCOUNT_PATH,\n body,\n idempotencyKey,\n );\n\n const receipt = toGaslessDepositReceipt(raw, {\n owner,\n walletId,\n idempotencyKey,\n protocolInstance: context.protocolInstance,\n });\n assertGaslessDepositWallet(receipt, {\n walletId,\n depositAddress,\n url: context.baseURL,\n path: SETTLE_EXISTING_ACCOUNT_PATH,\n });\n return receipt;\n}\n"],"mappings":";;;;;AAWA,IAAM,IAA+B;AAkErC,eAAsB,EACpB,GACA,GACwD;CACxD,IAAM,EAAE,YAAS,UAAO,kBAAe,GACjC,IAAW,EAAsB,EAAW,YAAY,EAAE,GAC1D,IAAU,EAAmB,GAAQ;EAAE;EAAS,SAAS;CAAW,CAAC,GACrE,IAAiB,EAAW,kBAAkB,EAA8B,GAE5E,IAAoD;EACxD;EACA;EACA,UAAU,EAAsB,CAAQ;EACxC;CACF,GAGM,IAAiB,MAAM,EAAwB,GAAQ;EAAE;EAAS;EAAO;CAAS,CAAC,GASnF,IAAU,EAAwB,MAPtB,EAChB,GACA,GACA,GACA,CACF,GAE6C;EAC3C;EACA;EACA;EACA,kBAAkB,EAAQ;CAC5B,CAAC;CAOD,OANA,EAA2B,GAAS;EAClC;EACA;EACA,KAAK,EAAQ;EACb,MAAM;CACR,CAAC,GACM;AACT"}
@@ -0,0 +1,3 @@
1
+ export * from './query.js';
2
+ export * from './settle-gasless-deposit-new-account.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/gasless/settle-gasless-deposit-new-account/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,sCAAsC,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { Config } from '../../core/config/index.js';
2
+ import { SettleGaslessDepositNewAccountParameters, SettleGaslessDepositNewAccountReturnType } from './settle-gasless-deposit-new-account.js';
3
+ /**
4
+ * Build TanStack Mutation options for {@link settleGaslessDepositNewAccount}.
5
+ *
6
+ * @param config - The SDK config.
7
+ * @returns Options to pass to `useMutation`.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * useMutation(settleGaslessDepositNewAccountMutationOptions(config));
12
+ * ```
13
+ */
14
+ export declare function settleGaslessDepositNewAccountMutationOptions(config: Config): {
15
+ mutationKey: readonly ["settleGaslessDepositNewAccount"];
16
+ mutationFn: (variables: SettleGaslessDepositNewAccountParameters) => Promise<SettleGaslessDepositNewAccountReturnType>;
17
+ };
18
+ //# sourceMappingURL=query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/gasless/settle-gasless-deposit-new-account/query.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAEL,KAAK,wCAAwC,EAC7C,KAAK,wCAAwC,EAC9C,MAAM,sCAAsC,CAAC;AAE9C;;;;;;;;;;GAUG;AACH,wBAAgB,6CAA6C,CAAC,MAAM,EAAE,MAAM;;4BAI3D,wCAAwC,KAClD,OAAO,CAAC,wCAAwC,CAAC;EAEvD"}
@@ -0,0 +1,12 @@
1
+ import { settleGaslessDepositNewAccount as e } from "./settle-gasless-deposit-new-account.js";
2
+ //#region src/gasless/settle-gasless-deposit-new-account/query.ts
3
+ function t(t) {
4
+ return {
5
+ mutationKey: ["settleGaslessDepositNewAccount"],
6
+ mutationFn: (n) => e(t, n)
7
+ };
8
+ }
9
+ //#endregion
10
+ export { t as settleGaslessDepositNewAccountMutationOptions };
11
+
12
+ //# sourceMappingURL=query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.js","names":[],"sources":["../../../src/gasless/settle-gasless-deposit-new-account/query.ts"],"sourcesContent":["import type { Config } from \"../../core/config\";\nimport {\n settleGaslessDepositNewAccount,\n type SettleGaslessDepositNewAccountParameters,\n type SettleGaslessDepositNewAccountReturnType,\n} from \"./settle-gasless-deposit-new-account\";\n\n/**\n * Build TanStack Mutation options for {@link settleGaslessDepositNewAccount}.\n *\n * @param config - The SDK config.\n * @returns Options to pass to `useMutation`.\n *\n * @example\n * ```ts\n * useMutation(settleGaslessDepositNewAccountMutationOptions(config));\n * ```\n */\nexport function settleGaslessDepositNewAccountMutationOptions(config: Config) {\n return {\n mutationKey: [\"settleGaslessDepositNewAccount\"] as const,\n mutationFn: (\n variables: SettleGaslessDepositNewAccountParameters,\n ): Promise<SettleGaslessDepositNewAccountReturnType> => settleGaslessDepositNewAccount(config, variables),\n };\n}\n"],"mappings":";;AAkBA,SAAgB,EAA8C,GAAgB;CAC5E,OAAO;EACL,aAAa,CAAC,gCAAgC;EAC9C,aACE,MACsD,EAA+B,GAAQ,CAAS;CAC1G;AACF"}
@@ -0,0 +1,106 @@
1
+ import { Address, Hex } from 'viem';
2
+ import { Config } from '../../core/config/index.js';
3
+ import { ChainIdParameter, Compute } from '../../shared/types/properties.js';
4
+ import { SubAccountIsolationType } from '../../symmio-contracts/account-layer/types.js';
5
+ import { GaslessDepositSubmitReceipt } from '../types.js';
6
+ /**
7
+ * Creation data for the sub-account a new-account settlement creates.
8
+ *
9
+ * `isolationType` and `singleVAMode` are deliberately **required**: they are
10
+ * product decisions (the lowcap flow uses `MARKET_DIRECTION` with
11
+ * `singleVAMode: true`; majors differ), and the service-side defaults would be
12
+ * silently wrong for either product. There is no `symmioCore` field — the
13
+ * gateway overwrites it with its configured core.
14
+ */
15
+ export interface GaslessDepositAccountData {
16
+ /** Sub-account name, 1–64 characters. */
17
+ name: string;
18
+ /** Sub-account isolation strategy — a product decision, choose explicitly. */
19
+ isolationType: SubAccountIsolationType;
20
+ /** Whether the account runs in single-VA mode — a product decision, choose explicitly. */
21
+ singleVAMode: boolean;
22
+ /** Optional hex metadata (affiliate hooks may expect a specific encoding). Defaults to `0x`. */
23
+ metadata?: Hex;
24
+ }
25
+ /**
26
+ * Parameters for {@link settleGaslessDepositNewAccount}.
27
+ */
28
+ export type SettleGaslessDepositNewAccountParameters = Compute<ChainIdParameter & {
29
+ /**
30
+ * Owner of the GaslessWallet whose deposit address is being settled — an
31
+ * owner address, never a GaslessWallet address. The new sub-account is
32
+ * created for this owner.
33
+ */
34
+ owner: Address;
35
+ /**
36
+ * Which of the owner's GaslessWallets to sweep. Defaults to `0n`, the
37
+ * original wallet. Each id has its own deposit address and its own balance:
38
+ * settle the id you funded, and read that id's address with
39
+ * `getGaslessWalletAddress` before sending anything to it.
40
+ */
41
+ walletId?: bigint;
42
+ /** Affiliate passed to `settleDepositToNewAccount`; the zero address disables attribution. */
43
+ affiliate: Address;
44
+ /** Creation data for the new wallet-owned sub-account. */
45
+ accountData: GaslessDepositAccountData;
46
+ /**
47
+ * Stable retry key; defaults to a random UUID.
48
+ *
49
+ * **One key per settlement attempt.** Reuse it only to replay a submit
50
+ * whose response was lost — the service then returns the existing record.
51
+ * A **completed** settlement's key must never be reused: mint a fresh one
52
+ * after any terminal status, and after any change to the wallet selection,
53
+ * or the service answers `409 IDEMPOTENCY_KEY_CONFLICT`
54
+ * (`isGaslessIdempotencyConflictError`).
55
+ */
56
+ idempotencyKey?: string;
57
+ /** Non-secret client correlation data stored with the request. */
58
+ metadata?: Record<string, unknown>;
59
+ }>;
60
+ /** Return type of {@link settleGaslessDepositNewAccount}. */
61
+ export type SettleGaslessDepositNewAccountReturnType = GaslessDepositSubmitReceipt;
62
+ /**
63
+ * Queue the sweep of an owner's deposit address into a **new** wallet-owned
64
+ * sub-account.
65
+ *
66
+ * The gateway settles the **entire observed collateral balance** at the
67
+ * selected wallet's deposit address, deducts the flat fee, creates the
68
+ * sub-account, and credits the net amount — paying all gas itself. The worker
69
+ * re-checks balance, fee, and minimum before broadcast, so an accepted
70
+ * settlement can still turn `rejected` (funds not yet visible, or moved). Poll
71
+ * with `service: "deposits"`. A `succeeded` settlement is not instantly
72
+ * readable — wait until the sub-account and its balance appear on-chain before
73
+ * flipping the UI.
74
+ *
75
+ * The wallet's deterministic address is read **before** the submit and checked
76
+ * against the acceptance, so a settlement that would sweep a different wallet
77
+ * than the one you funded surfaces as an error instead of moving funds
78
+ * silently. A sweep takes the whole balance of the selected id, so give a
79
+ * deposit flow its own id when it must not share a balance with another flow.
80
+ *
81
+ * @param config - The SDK config.
82
+ * @param parameters - Owner, optional wallet id, affiliate, account creation data, retry key.
83
+ * @returns The acceptance receipt (with the observed/credited estimates); persist `requestId`.
84
+ * @throws {SymmError} `GASLESS_NOT_CONFIGURED` / `GASLESS_UNSUPPORTED_CONTRACTS_VERSION`.
85
+ * @throws {SymmError} `GASLESS_WALLET_ID_INVALID` for a wallet id outside the `uint256` range.
86
+ * @throws {SymmApiError} `GASLESS_SETTLEMENT_SUBMIT_FAILED` on HTTP failure —
87
+ * `DEPOSIT_BELOW_MINIMUM` in the vendor detail means the address is not
88
+ * funded to the settlement minimum yet.
89
+ * @throws {SymmApiError} `GASLESS_SUBMIT_UNCONFIRMED` when the outcome could not be
90
+ * established; `responseData` is the replayable submit, for `resubmitGaslessRequest`.
91
+ * @throws {SymmApiError} `GASLESS_DEPOSIT_WALLET_MISMATCH` when the acceptance names
92
+ * another wallet or deposit address. The request is already accepted, so the
93
+ * error carries the parsed receipt (with its `requestId`) as `responseData`.
94
+ *
95
+ * @example
96
+ * ```ts
97
+ * const receipt = await settleGaslessDepositNewAccount(config, {
98
+ * owner,
99
+ * walletId: 1n,
100
+ * affiliate: zeroAddress,
101
+ * accountData: { name: "Main", isolationType: SubAccountIsolationType.MARKET_DIRECTION, singleVAMode: true },
102
+ * });
103
+ * ```
104
+ */
105
+ export declare function settleGaslessDepositNewAccount(config: Config, parameters: SettleGaslessDepositNewAccountParameters): Promise<SettleGaslessDepositNewAccountReturnType>;
106
+ //# sourceMappingURL=settle-gasless-deposit-new-account.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settle-gasless-deposit-new-account.d.ts","sourceRoot":"","sources":["../../../src/gasless/settle-gasless-deposit-new-account/settle-gasless-deposit-new-account.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAC/E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AAI1F,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAO5D;;;;;;;;GAQG;AACH,MAAM,WAAW,yBAAyB;IACxC,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,aAAa,EAAE,uBAAuB,CAAC;IACvC,0FAA0F;IAC1F,YAAY,EAAE,OAAO,CAAC;IACtB,gGAAgG;IAChG,QAAQ,CAAC,EAAE,GAAG,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,wCAAwC,GAAG,OAAO,CAC5D,gBAAgB,GAAG;IACjB;;;;OAIG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8FAA8F;IAC9F,SAAS,EAAE,OAAO,CAAC;IACnB,0DAA0D;IAC1D,WAAW,EAAE,yBAAyB,CAAC;IACvC;;;;;;;;;OASG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC,CACF,CAAC;AAEF,6DAA6D;AAC7D,MAAM,MAAM,wCAAwC,GAAG,2BAA2B,CAAC;AAEnF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAsB,8BAA8B,CAClD,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,wCAAwC,GACnD,OAAO,CAAC,wCAAwC,CAAC,CA2CnD"}
@@ -0,0 +1,43 @@
1
+ import { generateGaslessIdempotencyKey as e, postGaslessSubmit as t, resolveGaslessHttp as n } from "../http.js";
2
+ import { assertGaslessWalletId as r, toGaslessWalletIdWire as i } from "../wallet-id.js";
3
+ import { getGaslessWalletAddress as a } from "../get-gasless-wallet-address/get-gasless-wallet-address.js";
4
+ import { assertGaslessDepositWallet as o, toGaslessDepositReceipt as s } from "../to-gasless-deposit-receipt.js";
5
+ //#region src/gasless/settle-gasless-deposit-new-account/settle-gasless-deposit-new-account.ts
6
+ var c = "/deposit-settlements/new-account";
7
+ async function l(l, u) {
8
+ let { chainId: d, owner: f, affiliate: p, accountData: m, metadata: h } = u, g = r(u.walletId ?? 0n), _ = n(l, {
9
+ chainId: d,
10
+ service: "deposits"
11
+ }), v = u.idempotencyKey ?? e(), y = {
12
+ idempotencyKey: v,
13
+ owner: f,
14
+ walletId: i(g),
15
+ affiliate: p,
16
+ accountData: {
17
+ name: m.name,
18
+ metadata: m.metadata ?? "0x",
19
+ isolationType: m.isolationType,
20
+ singleVAMode: m.singleVAMode
21
+ },
22
+ ...h === void 0 ? {} : { metadata: h }
23
+ }, b = await a(l, {
24
+ chainId: d,
25
+ owner: f,
26
+ walletId: g
27
+ }), x = s(await t(_, c, y, v), {
28
+ owner: f,
29
+ walletId: g,
30
+ idempotencyKey: v,
31
+ protocolInstance: _.protocolInstance
32
+ });
33
+ return o(x, {
34
+ walletId: g,
35
+ depositAddress: b,
36
+ url: _.baseURL,
37
+ path: c
38
+ }), x;
39
+ }
40
+ //#endregion
41
+ export { l as settleGaslessDepositNewAccount };
42
+
43
+ //# sourceMappingURL=settle-gasless-deposit-new-account.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settle-gasless-deposit-new-account.js","names":[],"sources":["../../../src/gasless/settle-gasless-deposit-new-account/settle-gasless-deposit-new-account.ts"],"sourcesContent":["import type { Address, Hex } from \"viem\";\nimport type { Config } from \"../../core/config\";\nimport type { ChainIdParameter, Compute } from \"../../shared/types/properties\";\nimport type { SubAccountIsolationType } from \"../../symmio-contracts/account-layer/types\";\nimport { getGaslessWalletAddress } from \"../get-gasless-wallet-address/get-gasless-wallet-address\";\nimport { generateGaslessIdempotencyKey, postGaslessSubmit, resolveGaslessHttp } from \"../http\";\nimport { assertGaslessDepositWallet, toGaslessDepositReceipt } from \"../to-gasless-deposit-receipt\";\nimport type { GaslessDepositSubmitReceipt } from \"../types\";\nimport { assertGaslessWalletId, toGaslessWalletIdWire } from \"../wallet-id\";\nimport type { GaslessWireDepositAccepted, GaslessWireNewAccountSettlementRequest } from \"../wire-types\";\n\n/** Path the new-account settlement submits to, under the deposits service base. */\nconst SETTLE_NEW_ACCOUNT_PATH = \"/deposit-settlements/new-account\";\n\n/**\n * Creation data for the sub-account a new-account settlement creates.\n *\n * `isolationType` and `singleVAMode` are deliberately **required**: they are\n * product decisions (the lowcap flow uses `MARKET_DIRECTION` with\n * `singleVAMode: true`; majors differ), and the service-side defaults would be\n * silently wrong for either product. There is no `symmioCore` field — the\n * gateway overwrites it with its configured core.\n */\nexport interface GaslessDepositAccountData {\n /** Sub-account name, 1–64 characters. */\n name: string;\n /** Sub-account isolation strategy — a product decision, choose explicitly. */\n isolationType: SubAccountIsolationType;\n /** Whether the account runs in single-VA mode — a product decision, choose explicitly. */\n singleVAMode: boolean;\n /** Optional hex metadata (affiliate hooks may expect a specific encoding). Defaults to `0x`. */\n metadata?: Hex;\n}\n\n/**\n * Parameters for {@link settleGaslessDepositNewAccount}.\n */\nexport type SettleGaslessDepositNewAccountParameters = Compute<\n ChainIdParameter & {\n /**\n * Owner of the GaslessWallet whose deposit address is being settled — an\n * owner address, never a GaslessWallet address. The new sub-account is\n * created for this owner.\n */\n owner: Address;\n /**\n * Which of the owner's GaslessWallets to sweep. Defaults to `0n`, the\n * original wallet. Each id has its own deposit address and its own balance:\n * settle the id you funded, and read that id's address with\n * `getGaslessWalletAddress` before sending anything to it.\n */\n walletId?: bigint;\n /** Affiliate passed to `settleDepositToNewAccount`; the zero address disables attribution. */\n affiliate: Address;\n /** Creation data for the new wallet-owned sub-account. */\n accountData: GaslessDepositAccountData;\n /**\n * Stable retry key; defaults to a random UUID.\n *\n * **One key per settlement attempt.** Reuse it only to replay a submit\n * whose response was lost — the service then returns the existing record.\n * A **completed** settlement's key must never be reused: mint a fresh one\n * after any terminal status, and after any change to the wallet selection,\n * or the service answers `409 IDEMPOTENCY_KEY_CONFLICT`\n * (`isGaslessIdempotencyConflictError`).\n */\n idempotencyKey?: string;\n /** Non-secret client correlation data stored with the request. */\n metadata?: Record<string, unknown>;\n }\n>;\n\n/** Return type of {@link settleGaslessDepositNewAccount}. */\nexport type SettleGaslessDepositNewAccountReturnType = GaslessDepositSubmitReceipt;\n\n/**\n * Queue the sweep of an owner's deposit address into a **new** wallet-owned\n * sub-account.\n *\n * The gateway settles the **entire observed collateral balance** at the\n * selected wallet's deposit address, deducts the flat fee, creates the\n * sub-account, and credits the net amount — paying all gas itself. The worker\n * re-checks balance, fee, and minimum before broadcast, so an accepted\n * settlement can still turn `rejected` (funds not yet visible, or moved). Poll\n * with `service: \"deposits\"`. A `succeeded` settlement is not instantly\n * readable — wait until the sub-account and its balance appear on-chain before\n * flipping the UI.\n *\n * The wallet's deterministic address is read **before** the submit and checked\n * against the acceptance, so a settlement that would sweep a different wallet\n * than the one you funded surfaces as an error instead of moving funds\n * silently. A sweep takes the whole balance of the selected id, so give a\n * deposit flow its own id when it must not share a balance with another flow.\n *\n * @param config - The SDK config.\n * @param parameters - Owner, optional wallet id, affiliate, account creation data, retry key.\n * @returns The acceptance receipt (with the observed/credited estimates); persist `requestId`.\n * @throws {SymmError} `GASLESS_NOT_CONFIGURED` / `GASLESS_UNSUPPORTED_CONTRACTS_VERSION`.\n * @throws {SymmError} `GASLESS_WALLET_ID_INVALID` for a wallet id outside the `uint256` range.\n * @throws {SymmApiError} `GASLESS_SETTLEMENT_SUBMIT_FAILED` on HTTP failure —\n * `DEPOSIT_BELOW_MINIMUM` in the vendor detail means the address is not\n * funded to the settlement minimum yet.\n * @throws {SymmApiError} `GASLESS_SUBMIT_UNCONFIRMED` when the outcome could not be\n * established; `responseData` is the replayable submit, for `resubmitGaslessRequest`.\n * @throws {SymmApiError} `GASLESS_DEPOSIT_WALLET_MISMATCH` when the acceptance names\n * another wallet or deposit address. The request is already accepted, so the\n * error carries the parsed receipt (with its `requestId`) as `responseData`.\n *\n * @example\n * ```ts\n * const receipt = await settleGaslessDepositNewAccount(config, {\n * owner,\n * walletId: 1n,\n * affiliate: zeroAddress,\n * accountData: { name: \"Main\", isolationType: SubAccountIsolationType.MARKET_DIRECTION, singleVAMode: true },\n * });\n * ```\n */\nexport async function settleGaslessDepositNewAccount(\n config: Config,\n parameters: SettleGaslessDepositNewAccountParameters,\n): Promise<SettleGaslessDepositNewAccountReturnType> {\n const { chainId, owner, affiliate, accountData, metadata } = parameters;\n const walletId = assertGaslessWalletId(parameters.walletId ?? 0n);\n const context = resolveGaslessHttp(config, { chainId, service: \"deposits\" });\n const idempotencyKey = parameters.idempotencyKey ?? generateGaslessIdempotencyKey();\n\n const body: GaslessWireNewAccountSettlementRequest = {\n idempotencyKey,\n owner,\n walletId: toGaslessWalletIdWire(walletId),\n affiliate,\n accountData: {\n name: accountData.name,\n metadata: accountData.metadata ?? \"0x\",\n isolationType: accountData.isolationType,\n singleVAMode: accountData.singleVAMode,\n },\n ...(metadata !== undefined ? { metadata } : {}),\n };\n\n /** Read before the submit: the acceptance is verified against it, and a failed read must not follow a 202. */\n const depositAddress = await getGaslessWalletAddress(config, { chainId, owner, walletId });\n\n const raw = await postGaslessSubmit<GaslessWireDepositAccepted>(\n context,\n SETTLE_NEW_ACCOUNT_PATH,\n body,\n idempotencyKey,\n );\n\n const receipt = toGaslessDepositReceipt(raw, {\n owner,\n walletId,\n idempotencyKey,\n protocolInstance: context.protocolInstance,\n });\n assertGaslessDepositWallet(receipt, {\n walletId,\n depositAddress,\n url: context.baseURL,\n path: SETTLE_NEW_ACCOUNT_PATH,\n });\n return receipt;\n}\n"],"mappings":";;;;;AAYA,IAAM,IAA0B;AA0GhC,eAAsB,EACpB,GACA,GACmD;CACnD,IAAM,EAAE,YAAS,UAAO,cAAW,gBAAa,gBAAa,GACvD,IAAW,EAAsB,EAAW,YAAY,EAAE,GAC1D,IAAU,EAAmB,GAAQ;EAAE;EAAS,SAAS;CAAW,CAAC,GACrE,IAAiB,EAAW,kBAAkB,EAA8B,GAE5E,IAA+C;EACnD;EACA;EACA,UAAU,EAAsB,CAAQ;EACxC;EACA,aAAa;GACX,MAAM,EAAY;GAClB,UAAU,EAAY,YAAY;GAClC,eAAe,EAAY;GAC3B,cAAc,EAAY;EAC5B;EACA,GAAI,MAAa,KAAA,IAA2B,CAAC,IAAhB,EAAE,YAAS;CAC1C,GAGM,IAAiB,MAAM,EAAwB,GAAQ;EAAE;EAAS;EAAO;CAAS,CAAC,GASnF,IAAU,EAAwB,MAPtB,EAChB,GACA,GACA,GACA,CACF,GAE6C;EAC3C;EACA;EACA;EACA,kBAAkB,EAAQ;CAC5B,CAAC;CAOD,OANA,EAA2B,GAAS;EAClC;EACA;EACA,KAAK,EAAQ;EACb,MAAM;CACR,CAAC,GACM;AACT"}
@@ -0,0 +1,44 @@
1
+ import { Config } from '../core/config/index.js';
2
+ import { GaslessHttpContext } from './http.js';
3
+ /**
4
+ * Sustained status GETs per second, per deployment.
5
+ *
6
+ * The anonymous gateway allows 10 requests/s per IP and protocol instance, and
7
+ * status polling is the one gasless call that runs unattended and in parallel —
8
+ * one loop per in-flight workflow, plus every mounted `useGaslessRequest`. This
9
+ * keeps the whole page's polling inside a predictable share of that budget so a
10
+ * submit, a fee quote or a deposit-policy read is never the call that earns the
11
+ * `429`.
12
+ *
13
+ * @internal
14
+ */
15
+ export declare const GASLESS_STATUS_READ_RATE_PER_SECOND = 4;
16
+ /**
17
+ * How many status reads may start back-to-back after an idle period. Matching
18
+ * the rate keeps a freshly opened page responsive — four workflows resolve
19
+ * their first poll immediately — without letting a burst outrun the sustained
20
+ * rate afterwards.
21
+ *
22
+ * @internal
23
+ */
24
+ export declare const GASLESS_STATUS_READ_BURST = 4;
25
+ /**
26
+ * Wait for this deployment's next status-read slot.
27
+ *
28
+ * Paces status GETs at {@link GASLESS_STATUS_READ_RATE_PER_SECOND} per second
29
+ * with a {@link GASLESS_STATUS_READ_BURST} burst, per `(config, origin +
30
+ * protocol instance)`. It only ever delays a read — it never drops one, and a
31
+ * caller that aborts releases nothing, because a slot that was never used stays
32
+ * in the past and is handed to the next caller immediately.
33
+ *
34
+ * @param config - The SDK config the read runs under.
35
+ * @param context - The resolved HTTP context (its origin and instance pick the bucket).
36
+ * @param options - Abort signal for the wait.
37
+ * @throws {SymmError} `GASLESS_WAIT_ABORTED` when `options.signal` aborts while queued.
38
+ *
39
+ * @internal
40
+ */
41
+ export declare function acquireGaslessStatusRead(config: Config, context: GaslessHttpContext, options?: {
42
+ signal?: AbortSignal;
43
+ }): Promise<void>;
44
+ //# sourceMappingURL=status-read-limiter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status-read-limiter.d.ts","sourceRoot":"","sources":["../../src/gasless/status-read-limiter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAEjD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mCAAmC,IAAI,CAAC;AAErD;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,IAAI,CAAC;AA6C3C;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,kBAAkB,EAC3B,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,WAAW,CAAA;CAAO,GACrC,OAAO,CAAC,IAAI,CAAC,CAaf"}
@@ -0,0 +1,28 @@
1
+ import { gaslessAbortedError as e, gaslessSleep as t } from "./abortable-sleep.js";
2
+ var n = 1e3 / 4, r = /* @__PURE__ */ new WeakMap();
3
+ function i(e) {
4
+ let t;
5
+ try {
6
+ t = new URL(e.baseURL).origin;
7
+ } catch {
8
+ t = e.baseURL;
9
+ }
10
+ return `${t}|${e.protocolInstance ?? ""}`;
11
+ }
12
+ function a(e, t) {
13
+ let n = r.get(e);
14
+ n || (n = /* @__PURE__ */ new Map(), r.set(e, n));
15
+ let i = n.get(t);
16
+ return i || (i = { nextStartAt: 0 }, n.set(t, i)), i;
17
+ }
18
+ async function o(r, o, s = {}) {
19
+ if (s.signal?.aborted) throw e("the status read");
20
+ let c = a(r, i(o)), l = Date.now(), u = l - 3 * n, d = Math.max(c.nextStartAt, u);
21
+ c.nextStartAt = d + n;
22
+ let f = d - l;
23
+ f <= 0 || await t(f, s.signal, "the status read");
24
+ }
25
+ //#endregion
26
+ export { o as acquireGaslessStatusRead };
27
+
28
+ //# sourceMappingURL=status-read-limiter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status-read-limiter.js","names":[],"sources":["../../src/gasless/status-read-limiter.ts"],"sourcesContent":["import type { Config } from \"../core/config\";\nimport { gaslessAbortedError, gaslessSleep } from \"./abortable-sleep\";\nimport type { GaslessHttpContext } from \"./http\";\n\n/**\n * Sustained status GETs per second, per deployment.\n *\n * The anonymous gateway allows 10 requests/s per IP and protocol instance, and\n * status polling is the one gasless call that runs unattended and in parallel —\n * one loop per in-flight workflow, plus every mounted `useGaslessRequest`. This\n * keeps the whole page's polling inside a predictable share of that budget so a\n * submit, a fee quote or a deposit-policy read is never the call that earns the\n * `429`.\n *\n * @internal\n */\nexport const GASLESS_STATUS_READ_RATE_PER_SECOND = 4;\n\n/**\n * How many status reads may start back-to-back after an idle period. Matching\n * the rate keeps a freshly opened page responsive — four workflows resolve\n * their first poll immediately — without letting a burst outrun the sustained\n * rate afterwards.\n *\n * @internal\n */\nexport const GASLESS_STATUS_READ_BURST = 4;\n\n/** Minimum spacing between two sustained reads, in ms. */\nconst MIN_SPACING_MS = 1_000 / GASLESS_STATUS_READ_RATE_PER_SECOND;\n\n/**\n * One deployment's schedule: the earliest time the next read may start. A read\n * reserves its slot by moving the mark forward, so concurrent callers queue in\n * arrival order instead of racing for the same instant.\n */\ninterface ReadSchedule {\n nextStartAt: number;\n}\n\nconst schedules = new WeakMap<Config, Map<string, ReadSchedule>>();\n\n/**\n * The bucket a context shares its budget with: the gateway limits per IP and\n * protocol instance, so both services of one deployment draw from one bucket\n * while a second deployment (a different origin or instance) gets its own.\n */\nfunction scheduleKey(context: GaslessHttpContext): string {\n let origin: string;\n try {\n origin = new URL(context.baseURL).origin;\n } catch {\n origin = context.baseURL;\n }\n return `${origin}|${context.protocolInstance ?? \"\"}`;\n}\n\nfunction getSchedule(config: Config, key: string): ReadSchedule {\n let byDeployment = schedules.get(config);\n if (!byDeployment) {\n byDeployment = new Map();\n schedules.set(config, byDeployment);\n }\n let schedule = byDeployment.get(key);\n if (!schedule) {\n schedule = { nextStartAt: 0 };\n byDeployment.set(key, schedule);\n }\n return schedule;\n}\n\n/**\n * Wait for this deployment's next status-read slot.\n *\n * Paces status GETs at {@link GASLESS_STATUS_READ_RATE_PER_SECOND} per second\n * with a {@link GASLESS_STATUS_READ_BURST} burst, per `(config, origin +\n * protocol instance)`. It only ever delays a read — it never drops one, and a\n * caller that aborts releases nothing, because a slot that was never used stays\n * in the past and is handed to the next caller immediately.\n *\n * @param config - The SDK config the read runs under.\n * @param context - The resolved HTTP context (its origin and instance pick the bucket).\n * @param options - Abort signal for the wait.\n * @throws {SymmError} `GASLESS_WAIT_ABORTED` when `options.signal` aborts while queued.\n *\n * @internal\n */\nexport async function acquireGaslessStatusRead(\n config: Config,\n context: GaslessHttpContext,\n options: { signal?: AbortSignal } = {},\n): Promise<void> {\n if (options.signal?.aborted) throw gaslessAbortedError(\"the status read\");\n\n const schedule = getSchedule(config, scheduleKey(context));\n const now = Date.now();\n /** An idle bucket refills up to the burst, so the mark never rewinds further than that. */\n const earliest = now - (GASLESS_STATUS_READ_BURST - 1) * MIN_SPACING_MS;\n const startAt = Math.max(schedule.nextStartAt, earliest);\n schedule.nextStartAt = startAt + MIN_SPACING_MS;\n\n const delay = startAt - now;\n if (delay <= 0) return;\n await gaslessSleep(delay, options.signal, \"the status read\");\n}\n"],"mappings":";AA6BA,IAAM,IAAiB,MAAA,GAWjB,oBAAY,IAAI,QAA2C;AAOjE,SAAS,EAAY,GAAqC;CACxD,IAAI;CACJ,IAAI;EACF,IAAS,IAAI,IAAI,EAAQ,OAAO,EAAE;CACpC,QAAQ;EACN,IAAS,EAAQ;CACnB;CACA,OAAO,GAAG,EAAO,GAAG,EAAQ,oBAAoB;AAClD;AAEA,SAAS,EAAY,GAAgB,GAA2B;CAC9D,IAAI,IAAe,EAAU,IAAI,CAAM;CACvC,AAAK,MACH,oBAAe,IAAI,IAAI,GACvB,EAAU,IAAI,GAAQ,CAAY;CAEpC,IAAI,IAAW,EAAa,IAAI,CAAG;CAKnC,OAJK,MACH,IAAW,EAAE,aAAa,EAAE,GAC5B,EAAa,IAAI,GAAK,CAAQ,IAEzB;AACT;AAkBA,eAAsB,EACpB,GACA,GACA,IAAoC,CAAC,GACtB;CACf,IAAI,EAAQ,QAAQ,SAAS,MAAM,EAAoB,iBAAiB;CAExE,IAAM,IAAW,EAAY,GAAQ,EAAY,CAAO,CAAC,GACnD,IAAM,KAAK,IAAI,GAEf,IAAW,IAAA,IAAwC,GACnD,IAAU,KAAK,IAAI,EAAS,aAAa,CAAQ;CACvD,EAAS,cAAc,IAAU;CAEjC,IAAM,IAAQ,IAAU;CACpB,KAAS,KACb,MAAM,EAAa,GAAO,EAAQ,QAAQ,iBAAiB;AAC7D"}
@@ -0,0 +1,61 @@
1
+ import { Address } from 'viem';
2
+ import { GaslessDepositSubmitReceipt } from './types.js';
3
+ import { GaslessWireDepositAccepted } from './wire-types.js';
4
+ /**
5
+ * What the submitter knows about a settlement the acceptance body does not
6
+ * echo, plus the wallet it must have settled.
7
+ *
8
+ * @internal
9
+ */
10
+ export interface GaslessDepositSubmitContext {
11
+ /** The `owner` the settlement was submitted for. */
12
+ owner: Address;
13
+ /** The wallet id the settlement was submitted for. */
14
+ walletId: bigint;
15
+ /** The idempotency key the settlement was submitted with. */
16
+ idempotencyKey: string;
17
+ /** The protocol instance the submit was routed to, or `null` for a proxy base that names none. */
18
+ protocolInstance: string | null;
19
+ }
20
+ /**
21
+ * Parse a deposit settlement's `202` acceptance into
22
+ * {@link GaslessDepositSubmitReceipt}. Shared by the new-account and
23
+ * existing-account settlement actions.
24
+ *
25
+ * Tolerant in the same way as the operations receipt: only `request_id` is
26
+ * required, an unknown status reads as `queued`, unreported amounts read as
27
+ * `null`, and an omitted `wallet_id` means wallet `0` — the service's own
28
+ * default for a request that names none.
29
+ *
30
+ * @param raw - The acceptance body.
31
+ * @param context - What the submitter knows that the body does not echo.
32
+ * @returns The normalized receipt.
33
+ * @throws {SymmError} `GASLESS_ACCEPTANCE_INVALID` when the body carries no `request_id`.
34
+ * @throws {SymmError} `GASLESS_WALLET_ID_INVALID` when `wallet_id` is present but not a `uint256` decimal.
35
+ *
36
+ * @internal
37
+ */
38
+ export declare function toGaslessDepositReceipt(raw: GaslessWireDepositAccepted, context: GaslessDepositSubmitContext): GaslessDepositSubmitReceipt;
39
+ /**
40
+ * Assert that the accepted settlement is the one that was asked for: the same
41
+ * wallet id, sweeping the same deposit address.
42
+ *
43
+ * The vendor requires this check (doc: "verify the returned ID and address
44
+ * match the wallet funded for this workflow"), because a wrong wallet sweeps a
45
+ * balance the user never meant to move. The request is already accepted when
46
+ * this runs, so the error carries the parsed receipt — the `requestId` must
47
+ * survive the mismatch or the workflow becomes untrackable.
48
+ *
49
+ * @param receipt - The parsed acceptance.
50
+ * @param expected - The wallet the settlement was submitted for, with its derived deposit address.
51
+ * @throws {SymmApiError} `GASLESS_DEPOSIT_WALLET_MISMATCH`, with the receipt as `responseData`.
52
+ *
53
+ * @internal
54
+ */
55
+ export declare function assertGaslessDepositWallet(receipt: GaslessDepositSubmitReceipt, expected: {
56
+ walletId: bigint;
57
+ depositAddress: Address;
58
+ url: string;
59
+ path: string;
60
+ }): void;
61
+ //# sourceMappingURL=to-gasless-deposit-receipt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"to-gasless-deposit-receipt.d.ts","sourceRoot":"","sources":["../../src/gasless/to-gasless-deposit-receipt.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AAG/D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAG3D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAE/D;;;;;GAKG;AACH,MAAM,WAAW,2BAA2B;IAC1C,oDAAoD;IACpD,KAAK,EAAE,OAAO,CAAC;IACf,sDAAsD;IACtD,QAAQ,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,cAAc,EAAE,MAAM,CAAC;IACvB,kGAAkG;IAClG,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,0BAA0B,EAC/B,OAAO,EAAE,2BAA2B,GACnC,2BAA2B,CAa7B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,2BAA2B,EACpC,QAAQ,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACjF,IAAI,CAeN"}
@@ -0,0 +1,36 @@
1
+ import { SymmApiError as e } from "../shared/errors/symm-error.js";
2
+ import { parseGaslessWalletId as t } from "./wallet-id.js";
3
+ import { toGaslessAcceptanceStatus as n, toGaslessOptionalAmount as r } from "./wire-parse.js";
4
+ import { requireGaslessRequestId as i } from "./to-gasless-submit-receipt.js";
5
+ import { isAddress as a, isAddressEqual as o } from "viem";
6
+ //#region src/gasless/to-gasless-deposit-receipt.ts
7
+ function s(e, a) {
8
+ return {
9
+ requestId: i(e?.request_id),
10
+ status: n(e.status),
11
+ depositAddress: e.deposit_address,
12
+ walletId: e.wallet_id === void 0 || e.wallet_id === null ? 0n : t(e.wallet_id),
13
+ owner: a.owner,
14
+ observedAmount: r(e.observed_amount),
15
+ paidFee: r(e.paid_fee),
16
+ creditedAmount: r(e.credited_amount),
17
+ idempotencyKey: a.idempotencyKey,
18
+ protocolInstance: a.protocolInstance
19
+ };
20
+ }
21
+ function c(t, n) {
22
+ let r = t.walletId === n.walletId, i = a(t.depositAddress) && o(t.depositAddress, n.depositAddress);
23
+ if (!(r && i)) throw new e({
24
+ code: "GASLESS_DEPOSIT_WALLET_MISMATCH",
25
+ message: `Gasless: settlement ${t.requestId} was accepted for wallet ${t.walletId} at ${t.depositAddress}, but it was submitted for wallet ${n.walletId} at ${n.depositAddress}. The request is already accepted — reconcile it by its request id before funding or settling anything else.`,
26
+ status: 202,
27
+ statusText: "Accepted",
28
+ responseData: t,
29
+ url: `${n.url}${n.path}`,
30
+ method: "POST"
31
+ });
32
+ }
33
+ //#endregion
34
+ export { c as assertGaslessDepositWallet, s as toGaslessDepositReceipt };
35
+
36
+ //# sourceMappingURL=to-gasless-deposit-receipt.js.map