@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,493 @@
1
+ import { Address, Hash } from 'viem';
2
+ /**
3
+ * Lifecycle status of a GaslessQ relayer request.
4
+ *
5
+ * A request moves `QUEUED → SUBMITTED → SUCCEEDED | REVERTED | FAILED`, or
6
+ * `QUEUED → REJECTED` when the worker's pre-broadcast re-check refuses it.
7
+ *
8
+ * `SUBMITTED` is **not** success — it only means a transaction hash exists.
9
+ * Only `SUCCEEDED` is success.
10
+ */
11
+ export declare enum GaslessRequestStatus {
12
+ /** Accepted by the service; no transaction broadcast yet. */
13
+ QUEUED = "queued",
14
+ /** A transaction was broadcast and `txHash` is stored; the receipt is pending. */
15
+ SUBMITTED = "submitted",
16
+ /** The relayed transaction mined with `status = 1`. */
17
+ SUCCEEDED = "succeeded",
18
+ /** The relayed transaction mined with `status = 0`; all charges rolled back. */
19
+ REVERTED = "reverted",
20
+ /** A service or RPC failure occurred before a successful receipt. */
21
+ FAILED = "failed",
22
+ /** The worker's re-check rejected the request before any broadcast. */
23
+ REJECTED = "rejected"
24
+ }
25
+ /**
26
+ * The terminal {@link GaslessRequestStatus} values — polling stops here.
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * refetchInterval: (query) => {
31
+ * const status = query.state.data?.status;
32
+ * return status && isGaslessRequestTerminal(status) ? false : 1_500;
33
+ * }
34
+ * ```
35
+ */
36
+ export declare const GASLESS_TERMINAL_STATUSES: ReadonlySet<GaslessRequestStatus>;
37
+ /**
38
+ * Whether a {@link GaslessRequestStatus} is terminal (no further polling needed).
39
+ *
40
+ * @param status - The status to check.
41
+ * @returns `true` for `succeeded`, `reverted`, `failed`, and `rejected`.
42
+ */
43
+ export declare function isGaslessRequestTerminal(status: GaslessRequestStatus): boolean;
44
+ /** Default poll cadence while a request is `queued` (service-recommended 1–2 s). */
45
+ export declare const GASLESS_QUEUED_POLL_MS = 1500;
46
+ /** Default poll cadence after a request is `submitted` (service-recommended 3–5 s). */
47
+ export declare const GASLESS_SUBMITTED_POLL_MS = 3000;
48
+ /**
49
+ * Default window a status wait gives the stream to deliver before its first
50
+ * HTTP read.
51
+ *
52
+ * Deliberately below {@link GASLESS_QUEUED_POLL_MS}: a stream that never
53
+ * answers costs one *delayed* read, never an extra one, so the fallback is
54
+ * strictly cheaper than the poll it defers.
55
+ */
56
+ export declare const GASLESS_STREAM_SETTLE_MS = 1000;
57
+ /**
58
+ * Default backstop for a *delivering* stream that reports nothing about the
59
+ * workflow.
60
+ *
61
+ * Heartbeats prove the socket is alive, not that this workflow is being
62
+ * reported, so a live-but-silent stream would otherwise blind a wait until the
63
+ * socket's own liveness timer fires. Only records for this request reset it.
64
+ */
65
+ export declare const GASLESS_STREAM_STALE_MS = 15000;
66
+ /**
67
+ * The poll cadence a request's current status calls for, or `false` once it is
68
+ * terminal.
69
+ *
70
+ * Shared by the imperative wait loop and the query factory's `refetchInterval`
71
+ * default so both follow one cadence. Terminal records are immutable, so
72
+ * stopping is not an optimisation — a poll that never stops bills the service
73
+ * forever for an answer that cannot change.
74
+ *
75
+ * The delay is drawn from the service's recommended band rather than fixed —
76
+ * 1–2 s while `queued`, 3–5 s after `submitted`. The jitter is load-bearing on
77
+ * the anonymous gateway: every workflow a page opened at the same moment would
78
+ * otherwise poll in lockstep and spend the shared per-IP budget in bursts.
79
+ *
80
+ * Meant for a loop that sleeps between reads. As a TanStack `refetchInterval`
81
+ * callback it needs a `random` that is stable between renders — TanStack
82
+ * recomputes the callback on every render and restarts the countdown whenever
83
+ * the value changed, so a fresh draw per call never fires. Use
84
+ * `getGaslessRequestQueryOptions`, which seeds the draw from the query's own
85
+ * fetch timestamps, rather than wiring this in by hand.
86
+ *
87
+ * @param status - The last known status, or `undefined` before the first fetch.
88
+ * @param random - Source of randomness in `[0, 1)`. Injectable for deterministic tests.
89
+ * @returns Milliseconds until the next poll, or `false` when terminal.
90
+ *
91
+ * @example
92
+ * ```ts
93
+ * for (let status: GaslessRequestStatus | undefined; ; ) {
94
+ * const delay = gaslessPollDelay(status);
95
+ * if (delay === false) break;
96
+ * await new Promise((resolve) => setTimeout(resolve, delay));
97
+ * status = (await getGaslessRequest(config, { requestId })).status;
98
+ * }
99
+ * ```
100
+ */
101
+ export declare function gaslessPollDelay(status: GaslessRequestStatus | undefined, random?: () => number): number | false;
102
+ /**
103
+ * Which GaslessQ sub-service a request id belongs to. Operations and deposit
104
+ * settlements are stored by different services with different poll URLs, so a
105
+ * request id alone does not identify a workflow — keep the service with it.
106
+ */
107
+ export type GaslessService = "operations" | "deposits";
108
+ /**
109
+ * What every stored relayer request carries, whichever service stores it.
110
+ *
111
+ * Raw decimal-string amounts are parsed to `bigint`; addresses come back
112
+ * lowercased by the service, so compare case-insensitively.
113
+ */
114
+ export interface GaslessRequestBase {
115
+ /** Stable service tracking id — persist it to resume polling after a reload. */
116
+ requestId: string;
117
+ /** Current lifecycle status. */
118
+ status: GaslessRequestStatus;
119
+ /** Broadcast transaction hash, once the worker has submitted one. */
120
+ txHash: Hash | null;
121
+ /** Vendor error code on `rejected` / `reverted` / `failed`, when stored. */
122
+ errorCode: string | null;
123
+ /** Human-readable error message, when stored. */
124
+ errorMessage: string | null;
125
+ /** Idempotency key the request was submitted with, when stored. */
126
+ idempotencyKey: string | null;
127
+ /**
128
+ * The owner address the request is tracked under — `user_address` for an
129
+ * operation relay, `wallet_address` (which means the owner, not a
130
+ * GaslessWallet address) for a deposit settlement. `null` when the record
131
+ * stores none.
132
+ */
133
+ owner: Address | null;
134
+ /**
135
+ * The GaslessWallet ids the request selected, in `signedOps` order for an
136
+ * operation relay and as a single entry for a deposit settlement. Historical
137
+ * records that predate multiple wallets store no ids and normalize to zeros —
138
+ * one per stored operation — because an omitted id means wallet `0`.
139
+ */
140
+ walletIds: readonly bigint[];
141
+ /** When the service stored the request (ISO-8601), when recorded. */
142
+ createdAt: string | null;
143
+ /** When the service last updated the request (ISO-8601), when recorded. */
144
+ updatedAt: string | null;
145
+ }
146
+ /** A stored request of the `"operations"` service — a relayed InstantLayer batch. */
147
+ export interface GaslessOperationRequest extends GaslessRequestBase {
148
+ /** Discriminant: this record lives in the operations service. */
149
+ service: "operations";
150
+ /** The workflow label the submitter attached (`operationType`). */
151
+ operationType: string | null;
152
+ /** The client accounting id the submitter attached, when stored. */
153
+ accountId: string | null;
154
+ /**
155
+ * The fee the service recorded for the request, in the unit the service
156
+ * reports it in (a vendor quote, not an authoritative on-chain charge).
157
+ */
158
+ feeAmountRaw: bigint | null;
159
+ }
160
+ /** A stored request of the `"deposits"` service — a deposit-address settlement. */
161
+ export interface GaslessDepositRequest extends GaslessRequestBase {
162
+ /** Discriminant: this record lives in the deposits service. */
163
+ service: "deposits";
164
+ /** The deterministic deposit address being swept, when stored. */
165
+ depositAddress: Address | null;
166
+ /** The settled wallet's id. A record without one means wallet `0`. */
167
+ walletId: bigint;
168
+ /** Name of the sub-account the settlement credits, for a new-account settlement. */
169
+ accountName: string | null;
170
+ /** Collateral the service observed at the deposit address (token base units). */
171
+ amountRaw: bigint | null;
172
+ /** The deposit fee the service recorded (token base units). */
173
+ feeRaw: bigint | null;
174
+ /** The net credit the service recorded (token base units) — an estimate, not the final credit. */
175
+ creditedRaw: bigint | null;
176
+ }
177
+ /**
178
+ * One stored relayer request, normalized from the service's snake_case record.
179
+ *
180
+ * A flat per-service union: the two services store different columns, so the
181
+ * shared fields stay on {@link GaslessRequestBase} and each service's own
182
+ * fields live on its variant. Narrow with `request.service`.
183
+ *
184
+ * @example
185
+ * ```ts
186
+ * const request = await getGaslessRequest(config, { requestId, service: "deposits" });
187
+ * if (request.service === "deposits") console.log(request.depositAddress, request.walletId);
188
+ * ```
189
+ */
190
+ export type GaslessRequest = GaslessOperationRequest | GaslessDepositRequest;
191
+ /**
192
+ * The HTTP 202 acknowledgement returned by an operation relay submit.
193
+ *
194
+ * `paidFee` and `remainingFeeAllowance` are the service's **acceptance-time**
195
+ * figures, passed through as reported by the service with no unit conversion.
196
+ * They describe the request before it executes, so neither is an execution
197
+ * result. The GaslessLayer collects the operational fee only when the
198
+ * relayed batch executes, from the payer resolved at that moment, and a
199
+ * reverted relay charges nothing. For authoritative numbers, read the payer's
200
+ * Core allowance and balance (`getOperationalFeeAllowance`,
201
+ * `getAccountBalanceOf` — both 18-decimal) and reconcile the charge from the
202
+ * transaction receipt's `OperationalFeeRouted` events.
203
+ */
204
+ export interface GaslessSubmitReceipt {
205
+ /** Stable service tracking id. Persist it immediately. */
206
+ requestId: string;
207
+ /** Status at acceptance — normally {@link GaslessRequestStatus.QUEUED}. */
208
+ status: GaslessRequestStatus;
209
+ /**
210
+ * The fee the service quoted for the request when it accepted it, as
211
+ * reported by the service. A quote, **not proof that a fee was collected**:
212
+ * the charge happens at execution and can differ, or not happen at all.
213
+ * `null` when the acceptance omitted it or reported an unparseable value —
214
+ * an acceptance is never discarded over a missing amount.
215
+ */
216
+ paidFee: bigint | null;
217
+ /**
218
+ * The service's acceptance-time view of the payer's remaining
219
+ * operational-fee allowance, as reported by the service. It is **not** a
220
+ * post-execution balance and not an authorization guarantee, and it can read
221
+ * `2^256 - 1` even while the payer's Core approval is bounded. Never display
222
+ * it as spendable or unlimited funds; read `getOperationalFeeAllowance`
223
+ * instead. `null` when the acceptance omitted it.
224
+ */
225
+ remainingFeeAllowance: bigint | null;
226
+ /**
227
+ * The idempotency key the request was submitted with — generated by the SDK
228
+ * when the caller passed none. Persist it: resending the byte-identical
229
+ * request under this key is what makes a lost response recoverable.
230
+ */
231
+ idempotencyKey: string;
232
+ /** Protocol instance the request was accepted on, or `null` for a proxy base that names none. */
233
+ protocolInstance: string | null;
234
+ /** The owner address the request is tracked under (the submitted `userAddress`). */
235
+ owner: Address;
236
+ /** The GaslessWallet ids the batch selected, in `signedOps` order — `0n` for ordinary InstantLayer operations. */
237
+ walletIds: readonly bigint[];
238
+ }
239
+ /**
240
+ * Outcome of one EVM broadcast attempt — the attempt's own lifecycle, which is
241
+ * **not** the request's {@link GaslessRequestStatus}. A request whose first
242
+ * attempt is `reverted` can still end `succeeded` on a later attempt, so read
243
+ * the outcome from the request and use the attempts for diagnosis.
244
+ */
245
+ export declare enum GaslessTransactionAttemptStatus {
246
+ /** Broadcast to the network; no receipt observed yet. */
247
+ SUBMITTED = "submitted",
248
+ /** Mined with `status = 1`. */
249
+ CONFIRMED = "confirmed",
250
+ /** Mined with `status = 0`. */
251
+ REVERTED = "reverted",
252
+ /** Never mined — dropped, replaced, or rejected by the node. */
253
+ FAILED = "failed"
254
+ }
255
+ /**
256
+ * One EVM broadcast attempt stored for a relayer request, with its receipt
257
+ * outcome when observed.
258
+ *
259
+ * A request can broadcast more than once (a replacement transaction after a
260
+ * stuck nonce or a gas bump), so a hash is not a stable handle on a workflow —
261
+ * {@link GaslessRequestTransaction.requestId} is.
262
+ */
263
+ export interface GaslessRequestTransaction {
264
+ /** Attempt row id. */
265
+ id: string;
266
+ /** Transaction hash of this attempt. */
267
+ txHash: Hash | null;
268
+ /** 1-based attempt number. */
269
+ attemptNumber: number;
270
+ /** Attempt outcome. */
271
+ status: GaslessTransactionAttemptStatus;
272
+ /**
273
+ * The request this attempt belongs to (the service's `entity_id`) — the same
274
+ * id `getGaslessRequest` is polled with.
275
+ */
276
+ requestId: string;
277
+ /** The service-side workflow that produced the attempt, e.g. `relay_instant`. */
278
+ workflow: string;
279
+ /**
280
+ * The raw receipt the service stored, as reported, or `null` while none was
281
+ * observed. Untyped on purpose: it is the relayer's node's JSON, not a viem
282
+ * `TransactionReceipt`, and its shape is the service's to change. Read the
283
+ * authoritative receipt from your own client with the attempt's `txHash`.
284
+ */
285
+ receipt: Record<string, unknown> | null;
286
+ /** Stored error code for a failed attempt, when present. */
287
+ errorCode: string | null;
288
+ /** Stored error message for a failed attempt, when present. */
289
+ errorMessage: string | null;
290
+ /** When the service stored the attempt (ISO-8601). */
291
+ createdAt: string | null;
292
+ /** When the service last updated the attempt (ISO-8601). */
293
+ updatedAt: string | null;
294
+ }
295
+ /**
296
+ * Everything a consumer needs to resume an accepted gasless workflow after a
297
+ * reload: the service, the instance and the identity that owns it.
298
+ *
299
+ * There is no list-by-wallet endpoint, so a request id lost to a reload is
300
+ * unrecoverable — persist this whole shape under
301
+ * `(environment, protocolInstance, service, requestId)`, with the owner and the
302
+ * selected wallet ids, as soon as it arrives.
303
+ */
304
+ export interface GaslessAcceptedRequest {
305
+ /** Stable service tracking id. */
306
+ requestId: string;
307
+ /** Which sub-service stores the request (its poll URL and its stream). */
308
+ service: GaslessService;
309
+ /** The chain the request was accepted on. */
310
+ chainId: number;
311
+ /** Protocol-instance key the request was accepted on, or `null` for a proxy base that names none. */
312
+ protocolInstance: string | null;
313
+ /** The idempotency key the request was submitted with. */
314
+ idempotencyKey: string;
315
+ /** The workflow label stored with the request, when the submit carried one. */
316
+ operationType: string | null;
317
+ /** The owner address the request is tracked under. */
318
+ owner: Address;
319
+ /** The GaslessWallet ids the request selected, in `signedOps` order. */
320
+ walletIds: readonly bigint[];
321
+ }
322
+ /**
323
+ * Lifecycle event emitted by the transparent gasless execution mode (the
324
+ * `execution.onEvent` observer on {@link SymmioGaslessConfig}).
325
+ *
326
+ * `accepted` fires as soon as the service returns a request id — persist
327
+ * `{ requestId, service, protocolInstance, chainId }` there so an in-flight
328
+ * workflow survives a reload (there is no list-by-wallet endpoint).
329
+ * `broadcast` fires when a transaction hash appears, and `terminal` when the
330
+ * request reaches a terminal status.
331
+ */
332
+ export type GaslessRelayEvent = ({
333
+ type: "accepted";
334
+ } & GaslessAcceptedRequest) | {
335
+ type: "broadcast";
336
+ requestId: string;
337
+ txHash: Hash;
338
+ chainId: number;
339
+ } | {
340
+ type: "terminal";
341
+ requestId: string;
342
+ status: GaslessRequestStatus;
343
+ txHash: Hash | null;
344
+ chainId: number;
345
+ };
346
+ /**
347
+ * The HTTP 202 acknowledgement returned by a deposit settlement submit —
348
+ * richer than the operations receipt: it echoes the swept deposit address and
349
+ * the observed, fee and credited amounts, in the collateral token's base units.
350
+ *
351
+ * The amounts are **acceptance-time estimates**, not the settlement result. The
352
+ * settlement sweeps the wallet's **full** collateral balance when the
353
+ * transaction executes, including anything that arrived after acceptance. The
354
+ * service's estimate deducts only the deposit fee, while the contract also
355
+ * charges the wallet creation fee (`getWalletCreationFee(owner, walletId)` on
356
+ * the GaslessLayer) when the settlement first deploys the wallet. Take the final
357
+ * net credit from the settlement transaction's `WalletDepositSettled` event or
358
+ * the sub-account's balance, never from `creditedAmount`.
359
+ */
360
+ export interface GaslessDepositSubmitReceipt {
361
+ /** Stable service tracking id (poll it with `service: "deposits"`). */
362
+ requestId: string;
363
+ /** Status at acceptance — normally {@link GaslessRequestStatus.QUEUED}. */
364
+ status: GaslessRequestStatus;
365
+ /** The deterministic deposit address being swept, as the service echoed it. */
366
+ depositAddress: Address;
367
+ /**
368
+ * The wallet id the service settled, echoed back. An acceptance that omits it
369
+ * means wallet `0`. The settle actions verify it against the requested wallet
370
+ * before returning.
371
+ */
372
+ walletId: bigint;
373
+ /** The owner whose wallet was settled (the submitted `owner`). */
374
+ owner: Address;
375
+ /**
376
+ * Collateral balance the service observed at the deposit address when it
377
+ * accepted the request (token base units). The settlement sweeps whatever
378
+ * balance is there at execution, which can differ. `null` when the
379
+ * acceptance omitted it.
380
+ */
381
+ observedAmount: bigint | null;
382
+ /**
383
+ * The deposit fee in the service's acceptance-time estimate (token base
384
+ * units). It excludes a wallet creation fee. `null` when the acceptance
385
+ * omitted it.
386
+ */
387
+ paidFee: bigint | null;
388
+ /**
389
+ * The net credit the service estimated at acceptance (token base units),
390
+ * with only the deposit fee deducted. Not the final credit: show it as an
391
+ * estimate. `null` when the acceptance omitted it.
392
+ */
393
+ creditedAmount: bigint | null;
394
+ /** The idempotency key the settlement was submitted with — persist it for a byte-identical resend. */
395
+ idempotencyKey: string;
396
+ /** Protocol instance the settlement was accepted on, or `null` for a proxy base that names none. */
397
+ protocolInstance: string | null;
398
+ }
399
+ /**
400
+ * Where a quoted fee is paid from — mirrors the GaslessLayer's
401
+ * `IGaslessLayer.FeeSource` enum.
402
+ */
403
+ export declare enum GaslessFeeSource {
404
+ /** The payer's SYMMIO (Core) balance, drawn through its operational-fee allowance. Every relayed-operation fee. */
405
+ SYMMIO_ACCOUNT = 0,
406
+ /** Collateral held at a GaslessWallet — deposit-settlement and wallet-withdrawal fees. */
407
+ WALLET_COLLATERAL = 1
408
+ }
409
+ /**
410
+ * One operation's charge in a {@link GaslessFeeQuote}. Every amount is **18-decimal**,
411
+ * including fees paid from wallet collateral — rescale to the collateral token's
412
+ * decimals with `core18ToCollateral(amount, quote.collateralDecimals)`, which
413
+ * rounds up, before comparing against a raw token balance.
414
+ */
415
+ export interface GaslessFeePayment {
416
+ /**
417
+ * The billed identity: the operation's `signerAccount.addr` for a relayed
418
+ * operation (a virtual account stays here even when its parent pays), or the
419
+ * GaslessWallet for a wallet-collateral payment.
420
+ */
421
+ account: Address;
422
+ /**
423
+ * Who the contract would charge, resolved from current allowances and
424
+ * balances. Show funding and allowance needs per `payer`, not per `account`.
425
+ *
426
+ * A relayed operation bills its billing parent — the parent sub-account of a
427
+ * virtual account, otherwise `account` itself — while the parent's
428
+ * operational-fee allowance and Core balance (free plus allocated) cover its
429
+ * running total in the batch. When they do not, and `account` is a live
430
+ * virtual account that covers the fee at its own fee multiplier, the preview
431
+ * already names that virtual account here. When neither can pay, and for an
432
+ * operation that costs nothing, it stays the parent. A single approval-only
433
+ * operation always names the parent.
434
+ *
435
+ * State changes inside the batch (an approval, a transfer, returned funds) can
436
+ * still move the charge at execution; only the service's simulation resolves
437
+ * that. A wallet-collateral payment names the GaslessWallet.
438
+ */
439
+ payer: Address;
440
+ /** Balance the fee is drawn from. */
441
+ source: GaslessFeeSource;
442
+ /** Operational fee for the operation's selectors after multipliers and the free quota (18-decimal). */
443
+ operationalFee18: bigint;
444
+ /** Deposit-settlement fee (18-decimal). */
445
+ depositFee18: bigint;
446
+ /**
447
+ * One-time fee for deploying a GaslessWallet — any wallet id, wallet `0`
448
+ * included (18-decimal). In a relayed batch it is charged once per undeployed
449
+ * wallet, on the first operation that executes from it, to `payer`'s SYMMIO
450
+ * balance; the free quota and fee multipliers do not reduce it. A
451
+ * wallet-collateral payment deducts it from the wallet's own collateral.
452
+ */
453
+ walletCreationFee18: bigint;
454
+ /** Native gas top-up fee (18-decimal). */
455
+ nativeTopUpFee18: bigint;
456
+ /** Collateral debited to fund a native gas top-up — a debit, not a fee (18-decimal). */
457
+ nativeGasCollateral18: bigint;
458
+ }
459
+ /**
460
+ * A fee quote from the GaslessLayer's `previewFeeQuote` view — a **preview**
461
+ * of what the relay transaction would charge at `blockNumber`, not a guarantee.
462
+ */
463
+ export interface GaslessFeeQuote {
464
+ /** The collateral token fees are denominated in. */
465
+ collateralToken: Address;
466
+ /** The collateral token's decimals, for rescaling the 18-decimal amounts. */
467
+ collateralDecimals: number;
468
+ /**
469
+ * The contract's `block.number` when the quote was computed. On Arbitrum that
470
+ * is the L1 block estimate, not the L2 block number a receipt reports.
471
+ */
472
+ blockNumber: bigint;
473
+ /** Timestamp of that block (seconds). */
474
+ timestamp: bigint;
475
+ /**
476
+ * Whether the quote came from executing the real fee-collection path. Always
477
+ * `false` from `previewFeeQuote` — only the relayer's own simulation is exact,
478
+ * and it can differ (an approval or transfer inside the same batch that changes
479
+ * the fee or its payer, state changing before execution).
480
+ */
481
+ exact: boolean;
482
+ /** One entry per quoted operation (or one wallet-collateral payment), in order. */
483
+ payments: readonly GaslessFeePayment[];
484
+ /** Sum of every payment's fees (18-decimal). */
485
+ totalFee18: bigint;
486
+ /** `totalFee18` plus native gas collateral — the full debit (18-decimal). */
487
+ totalDebit18: bigint;
488
+ /** How many operations the billing accounts' daily free quota covers. */
489
+ freeOpsApplied: bigint;
490
+ /** Whether a native gas top-up would be sponsored. `false` for relayed operations. */
491
+ nativeSponsored: boolean;
492
+ }
493
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/gasless/types.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,33 @@
1
+ //#region src/gasless/types.ts
2
+ var e = /* @__PURE__ */ function(e) {
3
+ return e.QUEUED = "queued", e.SUBMITTED = "submitted", e.SUCCEEDED = "succeeded", e.REVERTED = "reverted", e.FAILED = "failed", e.REJECTED = "rejected", e;
4
+ }({}), t = new Set([
5
+ "succeeded",
6
+ "reverted",
7
+ "failed",
8
+ "rejected"
9
+ ]);
10
+ function n(e) {
11
+ return t.has(e);
12
+ }
13
+ var r = 1500, i = 3e3, a = 1e3, o = 15e3, s = {
14
+ minMs: 1e3,
15
+ maxMs: 2e3
16
+ }, c = {
17
+ minMs: 3e3,
18
+ maxMs: 5e3
19
+ };
20
+ function l(e, t = Math.random) {
21
+ if (e && n(e)) return !1;
22
+ let r = e === "submitted" ? c : s;
23
+ return r.minMs + Math.floor(t() * (r.maxMs - r.minMs));
24
+ }
25
+ var u = /* @__PURE__ */ function(e) {
26
+ return e.SUBMITTED = "submitted", e.CONFIRMED = "confirmed", e.REVERTED = "reverted", e.FAILED = "failed", e;
27
+ }({}), d = /* @__PURE__ */ function(e) {
28
+ return e[e.SYMMIO_ACCOUNT = 0] = "SYMMIO_ACCOUNT", e[e.WALLET_COLLATERAL = 1] = "WALLET_COLLATERAL", e;
29
+ }({});
30
+ //#endregion
31
+ export { r as GASLESS_QUEUED_POLL_MS, a as GASLESS_STREAM_SETTLE_MS, o as GASLESS_STREAM_STALE_MS, i as GASLESS_SUBMITTED_POLL_MS, t as GASLESS_TERMINAL_STATUSES, d as GaslessFeeSource, e as GaslessRequestStatus, u as GaslessTransactionAttemptStatus, l as gaslessPollDelay, n as isGaslessRequestTerminal };
32
+
33
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../src/gasless/types.ts"],"sourcesContent":["import type { Address, Hash } from \"viem\";\n\n/**\n * Lifecycle status of a GaslessQ relayer request.\n *\n * A request moves `QUEUED → SUBMITTED → SUCCEEDED | REVERTED | FAILED`, or\n * `QUEUED → REJECTED` when the worker's pre-broadcast re-check refuses it.\n *\n * `SUBMITTED` is **not** success — it only means a transaction hash exists.\n * Only `SUCCEEDED` is success.\n */\nexport enum GaslessRequestStatus {\n /** Accepted by the service; no transaction broadcast yet. */\n QUEUED = \"queued\",\n /** A transaction was broadcast and `txHash` is stored; the receipt is pending. */\n SUBMITTED = \"submitted\",\n /** The relayed transaction mined with `status = 1`. */\n SUCCEEDED = \"succeeded\",\n /** The relayed transaction mined with `status = 0`; all charges rolled back. */\n REVERTED = \"reverted\",\n /** A service or RPC failure occurred before a successful receipt. */\n FAILED = \"failed\",\n /** The worker's re-check rejected the request before any broadcast. */\n REJECTED = \"rejected\",\n}\n\n/**\n * The terminal {@link GaslessRequestStatus} values — polling stops here.\n *\n * @example\n * ```ts\n * refetchInterval: (query) => {\n * const status = query.state.data?.status;\n * return status && isGaslessRequestTerminal(status) ? false : 1_500;\n * }\n * ```\n */\nexport const GASLESS_TERMINAL_STATUSES: ReadonlySet<GaslessRequestStatus> = new Set([\n GaslessRequestStatus.SUCCEEDED,\n GaslessRequestStatus.REVERTED,\n GaslessRequestStatus.FAILED,\n GaslessRequestStatus.REJECTED,\n]);\n\n/**\n * Whether a {@link GaslessRequestStatus} is terminal (no further polling needed).\n *\n * @param status - The status to check.\n * @returns `true` for `succeeded`, `reverted`, `failed`, and `rejected`.\n */\nexport function isGaslessRequestTerminal(status: GaslessRequestStatus): boolean {\n return GASLESS_TERMINAL_STATUSES.has(status);\n}\n\n/** Default poll cadence while a request is `queued` (service-recommended 1–2 s). */\nexport const GASLESS_QUEUED_POLL_MS = 1_500;\n/** Default poll cadence after a request is `submitted` (service-recommended 3–5 s). */\nexport const GASLESS_SUBMITTED_POLL_MS = 3_000;\n\n/**\n * Default window a status wait gives the stream to deliver before its first\n * HTTP read.\n *\n * Deliberately below {@link GASLESS_QUEUED_POLL_MS}: a stream that never\n * answers costs one *delayed* read, never an extra one, so the fallback is\n * strictly cheaper than the poll it defers.\n */\nexport const GASLESS_STREAM_SETTLE_MS = 1_000;\n\n/**\n * Default backstop for a *delivering* stream that reports nothing about the\n * workflow.\n *\n * Heartbeats prove the socket is alive, not that this workflow is being\n * reported, so a live-but-silent stream would otherwise blind a wait until the\n * socket's own liveness timer fires. Only records for this request reset it.\n */\nexport const GASLESS_STREAM_STALE_MS = 15_000;\n\n/** The service-recommended poll band for a `queued` request, in ms. */\nconst QUEUED_POLL_BAND = { minMs: 1_000, maxMs: 2_000 } as const;\n/** The service-recommended poll band for a `submitted` request, in ms. */\nconst SUBMITTED_POLL_BAND = { minMs: 3_000, maxMs: 5_000 } as const;\n\n/**\n * The poll cadence a request's current status calls for, or `false` once it is\n * terminal.\n *\n * Shared by the imperative wait loop and the query factory's `refetchInterval`\n * default so both follow one cadence. Terminal records are immutable, so\n * stopping is not an optimisation — a poll that never stops bills the service\n * forever for an answer that cannot change.\n *\n * The delay is drawn from the service's recommended band rather than fixed —\n * 1–2 s while `queued`, 3–5 s after `submitted`. The jitter is load-bearing on\n * the anonymous gateway: every workflow a page opened at the same moment would\n * otherwise poll in lockstep and spend the shared per-IP budget in bursts.\n *\n * Meant for a loop that sleeps between reads. As a TanStack `refetchInterval`\n * callback it needs a `random` that is stable between renders — TanStack\n * recomputes the callback on every render and restarts the countdown whenever\n * the value changed, so a fresh draw per call never fires. Use\n * `getGaslessRequestQueryOptions`, which seeds the draw from the query's own\n * fetch timestamps, rather than wiring this in by hand.\n *\n * @param status - The last known status, or `undefined` before the first fetch.\n * @param random - Source of randomness in `[0, 1)`. Injectable for deterministic tests.\n * @returns Milliseconds until the next poll, or `false` when terminal.\n *\n * @example\n * ```ts\n * for (let status: GaslessRequestStatus | undefined; ; ) {\n * const delay = gaslessPollDelay(status);\n * if (delay === false) break;\n * await new Promise((resolve) => setTimeout(resolve, delay));\n * status = (await getGaslessRequest(config, { requestId })).status;\n * }\n * ```\n */\nexport function gaslessPollDelay(\n status: GaslessRequestStatus | undefined,\n random: () => number = Math.random,\n): number | false {\n if (status && isGaslessRequestTerminal(status)) return false;\n const band = status === GaslessRequestStatus.SUBMITTED ? SUBMITTED_POLL_BAND : QUEUED_POLL_BAND;\n return band.minMs + Math.floor(random() * (band.maxMs - band.minMs));\n}\n\n/**\n * Which GaslessQ sub-service a request id belongs to. Operations and deposit\n * settlements are stored by different services with different poll URLs, so a\n * request id alone does not identify a workflow — keep the service with it.\n */\nexport type GaslessService = \"operations\" | \"deposits\";\n\n/**\n * What every stored relayer request carries, whichever service stores it.\n *\n * Raw decimal-string amounts are parsed to `bigint`; addresses come back\n * lowercased by the service, so compare case-insensitively.\n */\nexport interface GaslessRequestBase {\n /** Stable service tracking id — persist it to resume polling after a reload. */\n requestId: string;\n /** Current lifecycle status. */\n status: GaslessRequestStatus;\n /** Broadcast transaction hash, once the worker has submitted one. */\n txHash: Hash | null;\n /** Vendor error code on `rejected` / `reverted` / `failed`, when stored. */\n errorCode: string | null;\n /** Human-readable error message, when stored. */\n errorMessage: string | null;\n /** Idempotency key the request was submitted with, when stored. */\n idempotencyKey: string | null;\n /**\n * The owner address the request is tracked under — `user_address` for an\n * operation relay, `wallet_address` (which means the owner, not a\n * GaslessWallet address) for a deposit settlement. `null` when the record\n * stores none.\n */\n owner: Address | null;\n /**\n * The GaslessWallet ids the request selected, in `signedOps` order for an\n * operation relay and as a single entry for a deposit settlement. Historical\n * records that predate multiple wallets store no ids and normalize to zeros —\n * one per stored operation — because an omitted id means wallet `0`.\n */\n walletIds: readonly bigint[];\n /** When the service stored the request (ISO-8601), when recorded. */\n createdAt: string | null;\n /** When the service last updated the request (ISO-8601), when recorded. */\n updatedAt: string | null;\n}\n\n/** A stored request of the `\"operations\"` service — a relayed InstantLayer batch. */\nexport interface GaslessOperationRequest extends GaslessRequestBase {\n /** Discriminant: this record lives in the operations service. */\n service: \"operations\";\n /** The workflow label the submitter attached (`operationType`). */\n operationType: string | null;\n /** The client accounting id the submitter attached, when stored. */\n accountId: string | null;\n /**\n * The fee the service recorded for the request, in the unit the service\n * reports it in (a vendor quote, not an authoritative on-chain charge).\n */\n feeAmountRaw: bigint | null;\n}\n\n/** A stored request of the `\"deposits\"` service — a deposit-address settlement. */\nexport interface GaslessDepositRequest extends GaslessRequestBase {\n /** Discriminant: this record lives in the deposits service. */\n service: \"deposits\";\n /** The deterministic deposit address being swept, when stored. */\n depositAddress: Address | null;\n /** The settled wallet's id. A record without one means wallet `0`. */\n walletId: bigint;\n /** Name of the sub-account the settlement credits, for a new-account settlement. */\n accountName: string | null;\n /** Collateral the service observed at the deposit address (token base units). */\n amountRaw: bigint | null;\n /** The deposit fee the service recorded (token base units). */\n feeRaw: bigint | null;\n /** The net credit the service recorded (token base units) — an estimate, not the final credit. */\n creditedRaw: bigint | null;\n}\n\n/**\n * One stored relayer request, normalized from the service's snake_case record.\n *\n * A flat per-service union: the two services store different columns, so the\n * shared fields stay on {@link GaslessRequestBase} and each service's own\n * fields live on its variant. Narrow with `request.service`.\n *\n * @example\n * ```ts\n * const request = await getGaslessRequest(config, { requestId, service: \"deposits\" });\n * if (request.service === \"deposits\") console.log(request.depositAddress, request.walletId);\n * ```\n */\nexport type GaslessRequest = GaslessOperationRequest | GaslessDepositRequest;\n\n/**\n * The HTTP 202 acknowledgement returned by an operation relay submit.\n *\n * `paidFee` and `remainingFeeAllowance` are the service's **acceptance-time**\n * figures, passed through as reported by the service with no unit conversion.\n * They describe the request before it executes, so neither is an execution\n * result. The GaslessLayer collects the operational fee only when the\n * relayed batch executes, from the payer resolved at that moment, and a\n * reverted relay charges nothing. For authoritative numbers, read the payer's\n * Core allowance and balance (`getOperationalFeeAllowance`,\n * `getAccountBalanceOf` — both 18-decimal) and reconcile the charge from the\n * transaction receipt's `OperationalFeeRouted` events.\n */\nexport interface GaslessSubmitReceipt {\n /** Stable service tracking id. Persist it immediately. */\n requestId: string;\n /** Status at acceptance — normally {@link GaslessRequestStatus.QUEUED}. */\n status: GaslessRequestStatus;\n /**\n * The fee the service quoted for the request when it accepted it, as\n * reported by the service. A quote, **not proof that a fee was collected**:\n * the charge happens at execution and can differ, or not happen at all.\n * `null` when the acceptance omitted it or reported an unparseable value —\n * an acceptance is never discarded over a missing amount.\n */\n paidFee: bigint | null;\n /**\n * The service's acceptance-time view of the payer's remaining\n * operational-fee allowance, as reported by the service. It is **not** a\n * post-execution balance and not an authorization guarantee, and it can read\n * `2^256 - 1` even while the payer's Core approval is bounded. Never display\n * it as spendable or unlimited funds; read `getOperationalFeeAllowance`\n * instead. `null` when the acceptance omitted it.\n */\n remainingFeeAllowance: bigint | null;\n /**\n * The idempotency key the request was submitted with — generated by the SDK\n * when the caller passed none. Persist it: resending the byte-identical\n * request under this key is what makes a lost response recoverable.\n */\n idempotencyKey: string;\n /** Protocol instance the request was accepted on, or `null` for a proxy base that names none. */\n protocolInstance: string | null;\n /** The owner address the request is tracked under (the submitted `userAddress`). */\n owner: Address;\n /** The GaslessWallet ids the batch selected, in `signedOps` order — `0n` for ordinary InstantLayer operations. */\n walletIds: readonly bigint[];\n}\n\n/**\n * Outcome of one EVM broadcast attempt — the attempt's own lifecycle, which is\n * **not** the request's {@link GaslessRequestStatus}. A request whose first\n * attempt is `reverted` can still end `succeeded` on a later attempt, so read\n * the outcome from the request and use the attempts for diagnosis.\n */\nexport enum GaslessTransactionAttemptStatus {\n /** Broadcast to the network; no receipt observed yet. */\n SUBMITTED = \"submitted\",\n /** Mined with `status = 1`. */\n CONFIRMED = \"confirmed\",\n /** Mined with `status = 0`. */\n REVERTED = \"reverted\",\n /** Never mined — dropped, replaced, or rejected by the node. */\n FAILED = \"failed\",\n}\n\n/**\n * One EVM broadcast attempt stored for a relayer request, with its receipt\n * outcome when observed.\n *\n * A request can broadcast more than once (a replacement transaction after a\n * stuck nonce or a gas bump), so a hash is not a stable handle on a workflow —\n * {@link GaslessRequestTransaction.requestId} is.\n */\nexport interface GaslessRequestTransaction {\n /** Attempt row id. */\n id: string;\n /** Transaction hash of this attempt. */\n txHash: Hash | null;\n /** 1-based attempt number. */\n attemptNumber: number;\n /** Attempt outcome. */\n status: GaslessTransactionAttemptStatus;\n /**\n * The request this attempt belongs to (the service's `entity_id`) — the same\n * id `getGaslessRequest` is polled with.\n */\n requestId: string;\n /** The service-side workflow that produced the attempt, e.g. `relay_instant`. */\n workflow: string;\n /**\n * The raw receipt the service stored, as reported, or `null` while none was\n * observed. Untyped on purpose: it is the relayer's node's JSON, not a viem\n * `TransactionReceipt`, and its shape is the service's to change. Read the\n * authoritative receipt from your own client with the attempt's `txHash`.\n */\n receipt: Record<string, unknown> | null;\n /** Stored error code for a failed attempt, when present. */\n errorCode: string | null;\n /** Stored error message for a failed attempt, when present. */\n errorMessage: string | null;\n /** When the service stored the attempt (ISO-8601). */\n createdAt: string | null;\n /** When the service last updated the attempt (ISO-8601). */\n updatedAt: string | null;\n}\n\n/**\n * Everything a consumer needs to resume an accepted gasless workflow after a\n * reload: the service, the instance and the identity that owns it.\n *\n * There is no list-by-wallet endpoint, so a request id lost to a reload is\n * unrecoverable — persist this whole shape under\n * `(environment, protocolInstance, service, requestId)`, with the owner and the\n * selected wallet ids, as soon as it arrives.\n */\nexport interface GaslessAcceptedRequest {\n /** Stable service tracking id. */\n requestId: string;\n /** Which sub-service stores the request (its poll URL and its stream). */\n service: GaslessService;\n /** The chain the request was accepted on. */\n chainId: number;\n /** Protocol-instance key the request was accepted on, or `null` for a proxy base that names none. */\n protocolInstance: string | null;\n /** The idempotency key the request was submitted with. */\n idempotencyKey: string;\n /** The workflow label stored with the request, when the submit carried one. */\n operationType: string | null;\n /** The owner address the request is tracked under. */\n owner: Address;\n /** The GaslessWallet ids the request selected, in `signedOps` order. */\n walletIds: readonly bigint[];\n}\n\n/**\n * Lifecycle event emitted by the transparent gasless execution mode (the\n * `execution.onEvent` observer on {@link SymmioGaslessConfig}).\n *\n * `accepted` fires as soon as the service returns a request id — persist\n * `{ requestId, service, protocolInstance, chainId }` there so an in-flight\n * workflow survives a reload (there is no list-by-wallet endpoint).\n * `broadcast` fires when a transaction hash appears, and `terminal` when the\n * request reaches a terminal status.\n */\nexport type GaslessRelayEvent =\n | ({ type: \"accepted\" } & GaslessAcceptedRequest)\n | { type: \"broadcast\"; requestId: string; txHash: Hash; chainId: number }\n | {\n type: \"terminal\";\n requestId: string;\n status: GaslessRequestStatus;\n txHash: Hash | null;\n chainId: number;\n };\n\n/**\n * The HTTP 202 acknowledgement returned by a deposit settlement submit —\n * richer than the operations receipt: it echoes the swept deposit address and\n * the observed, fee and credited amounts, in the collateral token's base units.\n *\n * The amounts are **acceptance-time estimates**, not the settlement result. The\n * settlement sweeps the wallet's **full** collateral balance when the\n * transaction executes, including anything that arrived after acceptance. The\n * service's estimate deducts only the deposit fee, while the contract also\n * charges the wallet creation fee (`getWalletCreationFee(owner, walletId)` on\n * the GaslessLayer) when the settlement first deploys the wallet. Take the final\n * net credit from the settlement transaction's `WalletDepositSettled` event or\n * the sub-account's balance, never from `creditedAmount`.\n */\nexport interface GaslessDepositSubmitReceipt {\n /** Stable service tracking id (poll it with `service: \"deposits\"`). */\n requestId: string;\n /** Status at acceptance — normally {@link GaslessRequestStatus.QUEUED}. */\n status: GaslessRequestStatus;\n /** The deterministic deposit address being swept, as the service echoed it. */\n depositAddress: Address;\n /**\n * The wallet id the service settled, echoed back. An acceptance that omits it\n * means wallet `0`. The settle actions verify it against the requested wallet\n * before returning.\n */\n walletId: bigint;\n /** The owner whose wallet was settled (the submitted `owner`). */\n owner: Address;\n /**\n * Collateral balance the service observed at the deposit address when it\n * accepted the request (token base units). The settlement sweeps whatever\n * balance is there at execution, which can differ. `null` when the\n * acceptance omitted it.\n */\n observedAmount: bigint | null;\n /**\n * The deposit fee in the service's acceptance-time estimate (token base\n * units). It excludes a wallet creation fee. `null` when the acceptance\n * omitted it.\n */\n paidFee: bigint | null;\n /**\n * The net credit the service estimated at acceptance (token base units),\n * with only the deposit fee deducted. Not the final credit: show it as an\n * estimate. `null` when the acceptance omitted it.\n */\n creditedAmount: bigint | null;\n /** The idempotency key the settlement was submitted with — persist it for a byte-identical resend. */\n idempotencyKey: string;\n /** Protocol instance the settlement was accepted on, or `null` for a proxy base that names none. */\n protocolInstance: string | null;\n}\n\n/**\n * Where a quoted fee is paid from — mirrors the GaslessLayer's\n * `IGaslessLayer.FeeSource` enum.\n */\nexport enum GaslessFeeSource {\n /** The payer's SYMMIO (Core) balance, drawn through its operational-fee allowance. Every relayed-operation fee. */\n SYMMIO_ACCOUNT = 0,\n /** Collateral held at a GaslessWallet — deposit-settlement and wallet-withdrawal fees. */\n WALLET_COLLATERAL = 1,\n}\n\n/**\n * One operation's charge in a {@link GaslessFeeQuote}. Every amount is **18-decimal**,\n * including fees paid from wallet collateral — rescale to the collateral token's\n * decimals with `core18ToCollateral(amount, quote.collateralDecimals)`, which\n * rounds up, before comparing against a raw token balance.\n */\nexport interface GaslessFeePayment {\n /**\n * The billed identity: the operation's `signerAccount.addr` for a relayed\n * operation (a virtual account stays here even when its parent pays), or the\n * GaslessWallet for a wallet-collateral payment.\n */\n account: Address;\n /**\n * Who the contract would charge, resolved from current allowances and\n * balances. Show funding and allowance needs per `payer`, not per `account`.\n *\n * A relayed operation bills its billing parent — the parent sub-account of a\n * virtual account, otherwise `account` itself — while the parent's\n * operational-fee allowance and Core balance (free plus allocated) cover its\n * running total in the batch. When they do not, and `account` is a live\n * virtual account that covers the fee at its own fee multiplier, the preview\n * already names that virtual account here. When neither can pay, and for an\n * operation that costs nothing, it stays the parent. A single approval-only\n * operation always names the parent.\n *\n * State changes inside the batch (an approval, a transfer, returned funds) can\n * still move the charge at execution; only the service's simulation resolves\n * that. A wallet-collateral payment names the GaslessWallet.\n */\n payer: Address;\n /** Balance the fee is drawn from. */\n source: GaslessFeeSource;\n /** Operational fee for the operation's selectors after multipliers and the free quota (18-decimal). */\n operationalFee18: bigint;\n /** Deposit-settlement fee (18-decimal). */\n depositFee18: bigint;\n /**\n * One-time fee for deploying a GaslessWallet — any wallet id, wallet `0`\n * included (18-decimal). In a relayed batch it is charged once per undeployed\n * wallet, on the first operation that executes from it, to `payer`'s SYMMIO\n * balance; the free quota and fee multipliers do not reduce it. A\n * wallet-collateral payment deducts it from the wallet's own collateral.\n */\n walletCreationFee18: bigint;\n /** Native gas top-up fee (18-decimal). */\n nativeTopUpFee18: bigint;\n /** Collateral debited to fund a native gas top-up — a debit, not a fee (18-decimal). */\n nativeGasCollateral18: bigint;\n}\n\n/**\n * A fee quote from the GaslessLayer's `previewFeeQuote` view — a **preview**\n * of what the relay transaction would charge at `blockNumber`, not a guarantee.\n */\nexport interface GaslessFeeQuote {\n /** The collateral token fees are denominated in. */\n collateralToken: Address;\n /** The collateral token's decimals, for rescaling the 18-decimal amounts. */\n collateralDecimals: number;\n /**\n * The contract's `block.number` when the quote was computed. On Arbitrum that\n * is the L1 block estimate, not the L2 block number a receipt reports.\n */\n blockNumber: bigint;\n /** Timestamp of that block (seconds). */\n timestamp: bigint;\n /**\n * Whether the quote came from executing the real fee-collection path. Always\n * `false` from `previewFeeQuote` — only the relayer's own simulation is exact,\n * and it can differ (an approval or transfer inside the same batch that changes\n * the fee or its payer, state changing before execution).\n */\n exact: boolean;\n /** One entry per quoted operation (or one wallet-collateral payment), in order. */\n payments: readonly GaslessFeePayment[];\n /** Sum of every payment's fees (18-decimal). */\n totalFee18: bigint;\n /** `totalFee18` plus native gas collateral — the full debit (18-decimal). */\n totalDebit18: bigint;\n /** How many operations the billing accounts' daily free quota covers. */\n freeOpsApplied: bigint;\n /** Whether a native gas top-up would be sponsored. `false` for relayed operations. */\n nativeSponsored: boolean;\n}\n"],"mappings":";AAWA,IAAY,IAAL,yBAAA,GAAA;QAEL,EAAA,SAAA,UAEA,EAAA,YAAA,aAEA,EAAA,YAAA,aAEA,EAAA,WAAA,YAEA,EAAA,SAAA,UAEA,EAAA,WAAA;AACF,EAAA,CAAA,CAAA,GAaa,IAA+D,IAAI,IAAI;;;;;AAKpF,CAAC;AAQD,SAAgB,EAAyB,GAAuC;CAC9E,OAAO,EAA0B,IAAI,CAAM;AAC7C;AAGA,IAAa,IAAyB,MAEzB,IAA4B,KAU5B,IAA2B,KAU3B,IAA0B,MAGjC,IAAmB;CAAE,OAAO;CAAO,OAAO;AAAM,GAEhD,IAAsB;CAAE,OAAO;CAAO,OAAO;AAAM;AAqCzD,SAAgB,EACd,GACA,IAAuB,KAAK,QACZ;CAChB,IAAI,KAAU,EAAyB,CAAM,GAAG,OAAO;CACvD,IAAM,IAAO,MAAA,cAA4C,IAAsB;CAC/E,OAAO,EAAK,QAAQ,KAAK,MAAM,EAAO,KAAK,EAAK,QAAQ,EAAK,MAAM;AACrE;AAuJA,IAAY,IAAL,yBAAA,GAAA;QAEL,EAAA,YAAA,aAEA,EAAA,YAAA,aAEA,EAAA,WAAA,YAEA,EAAA,SAAA;AACF,EAAA,CAAA,CAAA,GAsJY,IAAL,yBAAA,GAAA;QAEL,EAAA,EAAA,iBAAA,KAAA,kBAEA,EAAA,EAAA,oBAAA,KAAA;AACF,EAAA,CAAA,CAAA"}