@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.
- package/dist/core/chains/types.d.ts +197 -0
- package/dist/core/chains/types.d.ts.map +1 -1
- package/dist/core/chains/types.js.map +1 -1
- package/dist/core/config/merge-chain-config.d.ts.map +1 -1
- package/dist/core/config/merge-chain-config.js +49 -19
- package/dist/core/config/merge-chain-config.js.map +1 -1
- package/dist/gasless/abortable-sleep.d.ts +17 -0
- package/dist/gasless/abortable-sleep.d.ts.map +1 -0
- package/dist/gasless/abortable-sleep.js +21 -0
- package/dist/gasless/abortable-sleep.js.map +1 -0
- package/dist/gasless/assert-gateway-coherence.d.ts +20 -0
- package/dist/gasless/assert-gateway-coherence.d.ts.map +1 -0
- package/dist/gasless/assert-gateway-coherence.js +26 -0
- package/dist/gasless/assert-gateway-coherence.js.map +1 -0
- package/dist/gasless/batch/calls.d.ts +121 -0
- package/dist/gasless/batch/calls.d.ts.map +1 -0
- package/dist/gasless/batch/calls.js +36 -0
- package/dist/gasless/batch/calls.js.map +1 -0
- package/dist/gasless/batch/index.d.ts +2 -0
- package/dist/gasless/batch/index.d.ts.map +1 -0
- package/dist/gasless/batch/resolve-gasless-batch.d.ts +118 -0
- package/dist/gasless/batch/resolve-gasless-batch.d.ts.map +1 -0
- package/dist/gasless/batch/resolve-gasless-batch.js +89 -0
- package/dist/gasless/batch/resolve-gasless-batch.js.map +1 -0
- package/dist/gasless/classify-gasless-failure.d.ts +99 -0
- package/dist/gasless/classify-gasless-failure.d.ts.map +1 -0
- package/dist/gasless/classify-gasless-failure.js +60 -0
- package/dist/gasless/classify-gasless-failure.js.map +1 -0
- package/dist/gasless/confirm-gasless-request/confirm-gasless-request.d.ts +121 -0
- package/dist/gasless/confirm-gasless-request/confirm-gasless-request.d.ts.map +1 -0
- package/dist/gasless/confirm-gasless-request/confirm-gasless-request.js +73 -0
- package/dist/gasless/confirm-gasless-request/confirm-gasless-request.js.map +1 -0
- package/dist/gasless/confirm-gasless-request/index.d.ts +2 -0
- package/dist/gasless/confirm-gasless-request/index.d.ts.map +1 -0
- package/dist/gasless/constants.d.ts +24 -0
- package/dist/gasless/constants.d.ts.map +1 -0
- package/dist/gasless/constants.js +6 -0
- package/dist/gasless/constants.js.map +1 -0
- package/dist/gasless/delegation-preflight.d.ts +39 -0
- package/dist/gasless/delegation-preflight.d.ts.map +1 -0
- package/dist/gasless/delegation-preflight.js +33 -0
- package/dist/gasless/delegation-preflight.js.map +1 -0
- package/dist/gasless/dispatch/maybe-relay-as-gasless.d.ts +73 -0
- package/dist/gasless/dispatch/maybe-relay-as-gasless.d.ts.map +1 -0
- package/dist/gasless/dispatch/maybe-relay-as-gasless.js +189 -0
- package/dist/gasless/dispatch/maybe-relay-as-gasless.js.map +1 -0
- package/dist/gasless/eip712.d.ts +79 -0
- package/dist/gasless/eip712.d.ts.map +1 -0
- package/dist/gasless/eip712.js +60 -0
- package/dist/gasless/eip712.js.map +1 -0
- package/dist/gasless/errors.d.ts +132 -0
- package/dist/gasless/errors.d.ts.map +1 -0
- package/dist/gasless/errors.js +110 -0
- package/dist/gasless/errors.js.map +1 -0
- package/dist/gasless/events.d.ts +37 -0
- package/dist/gasless/events.d.ts.map +1 -0
- package/dist/gasless/events.js +34 -0
- package/dist/gasless/events.js.map +1 -0
- package/dist/gasless/fallback.d.ts +58 -0
- package/dist/gasless/fallback.d.ts.map +1 -0
- package/dist/gasless/fallback.js +34 -0
- package/dist/gasless/fallback.js.map +1 -0
- package/dist/gasless/format-gasless-operation.d.ts +37 -0
- package/dist/gasless/format-gasless-operation.d.ts.map +1 -0
- package/dist/gasless/format-gasless-operation.js +33 -0
- package/dist/gasless/format-gasless-operation.js.map +1 -0
- package/dist/gasless/gasless-url.d.ts +82 -0
- package/dist/gasless/gasless-url.d.ts.map +1 -0
- package/dist/gasless/gasless-url.js +70 -0
- package/dist/gasless/gasless-url.js.map +1 -0
- package/dist/gasless/gasless-wallet-execute/calls.d.ts +73 -0
- package/dist/gasless/gasless-wallet-execute/calls.d.ts.map +1 -0
- package/dist/gasless/gasless-wallet-execute/calls.js +24 -0
- package/dist/gasless/gasless-wallet-execute/calls.js.map +1 -0
- package/dist/gasless/gasless-wallet-execute/gasless-wallet-execute.d.ts +148 -0
- package/dist/gasless/gasless-wallet-execute/gasless-wallet-execute.d.ts.map +1 -0
- package/dist/gasless/gasless-wallet-execute/gasless-wallet-execute.js +120 -0
- package/dist/gasless/gasless-wallet-execute/gasless-wallet-execute.js.map +1 -0
- package/dist/gasless/gasless-wallet-execute/index.d.ts +5 -0
- package/dist/gasless/gasless-wallet-execute/index.d.ts.map +1 -0
- package/dist/gasless/gasless-wallet-execute/query.d.ts +18 -0
- package/dist/gasless/gasless-wallet-execute/query.d.ts.map +1 -0
- package/dist/gasless/gasless-wallet-execute/query.js +12 -0
- package/dist/gasless/gasless-wallet-execute/query.js.map +1 -0
- package/dist/gasless/gasless-wallet-execute/selectors.d.ts +38 -0
- package/dist/gasless/gasless-wallet-execute/selectors.d.ts.map +1 -0
- package/dist/gasless/gasless-wallet-execute/selectors.js +15 -0
- package/dist/gasless/gasless-wallet-execute/selectors.js.map +1 -0
- package/dist/gasless/get-gasless-batch-fee-quote/get-gasless-batch-fee-quote.d.ts +72 -0
- package/dist/gasless/get-gasless-batch-fee-quote/get-gasless-batch-fee-quote.d.ts.map +1 -0
- package/dist/gasless/get-gasless-batch-fee-quote/get-gasless-batch-fee-quote.js +42 -0
- package/dist/gasless/get-gasless-batch-fee-quote/get-gasless-batch-fee-quote.js.map +1 -0
- package/dist/gasless/get-gasless-batch-fee-quote/index.d.ts +3 -0
- package/dist/gasless/get-gasless-batch-fee-quote/index.d.ts.map +1 -0
- package/dist/gasless/get-gasless-batch-fee-quote/query.d.ts +47 -0
- package/dist/gasless/get-gasless-batch-fee-quote/query.d.ts.map +1 -0
- package/dist/gasless/get-gasless-batch-fee-quote/query.js +50 -0
- package/dist/gasless/get-gasless-batch-fee-quote/query.js.map +1 -0
- package/dist/gasless/get-gasless-deposit-policy/get-gasless-deposit-policy.d.ts +80 -0
- package/dist/gasless/get-gasless-deposit-policy/get-gasless-deposit-policy.d.ts.map +1 -0
- package/dist/gasless/get-gasless-deposit-policy/get-gasless-deposit-policy.js +61 -0
- package/dist/gasless/get-gasless-deposit-policy/get-gasless-deposit-policy.js.map +1 -0
- package/dist/gasless/get-gasless-deposit-policy/index.d.ts +3 -0
- package/dist/gasless/get-gasless-deposit-policy/index.d.ts.map +1 -0
- package/dist/gasless/get-gasless-deposit-policy/query.d.ts +51 -0
- package/dist/gasless/get-gasless-deposit-policy/query.d.ts.map +1 -0
- package/dist/gasless/get-gasless-deposit-policy/query.js +25 -0
- package/dist/gasless/get-gasless-deposit-policy/query.js.map +1 -0
- package/dist/gasless/get-gasless-fee-quote/encode-relay-batch-call-data.d.ts +27 -0
- package/dist/gasless/get-gasless-fee-quote/encode-relay-batch-call-data.d.ts.map +1 -0
- package/dist/gasless/get-gasless-fee-quote/encode-relay-batch-call-data.js +22 -0
- package/dist/gasless/get-gasless-fee-quote/encode-relay-batch-call-data.js.map +1 -0
- package/dist/gasless/get-gasless-fee-quote/fee-quote-errors.d.ts +61 -0
- package/dist/gasless/get-gasless-fee-quote/fee-quote-errors.d.ts.map +1 -0
- package/dist/gasless/get-gasless-fee-quote/fee-quote-errors.js +59 -0
- package/dist/gasless/get-gasless-fee-quote/fee-quote-errors.js.map +1 -0
- package/dist/gasless/get-gasless-fee-quote/get-gasless-fee-quote.d.ts +79 -0
- package/dist/gasless/get-gasless-fee-quote/get-gasless-fee-quote.d.ts.map +1 -0
- package/dist/gasless/get-gasless-fee-quote/get-gasless-fee-quote.js +53 -0
- package/dist/gasless/get-gasless-fee-quote/get-gasless-fee-quote.js.map +1 -0
- package/dist/gasless/get-gasless-fee-quote/index.d.ts +4 -0
- package/dist/gasless/get-gasless-fee-quote/index.d.ts.map +1 -0
- package/dist/gasless/get-gasless-fee-quote/query.d.ts +41 -0
- package/dist/gasless/get-gasless-fee-quote/query.d.ts.map +1 -0
- package/dist/gasless/get-gasless-fee-quote/query.js +31 -0
- package/dist/gasless/get-gasless-fee-quote/query.js.map +1 -0
- package/dist/gasless/get-gasless-request/get-gasless-request.d.ts +51 -0
- package/dist/gasless/get-gasless-request/get-gasless-request.d.ts.map +1 -0
- package/dist/gasless/get-gasless-request/get-gasless-request.js +15 -0
- package/dist/gasless/get-gasless-request/get-gasless-request.js.map +1 -0
- package/dist/gasless/get-gasless-request/index.d.ts +4 -0
- package/dist/gasless/get-gasless-request/index.d.ts.map +1 -0
- package/dist/gasless/get-gasless-request/query.d.ts +64 -0
- package/dist/gasless/get-gasless-request/query.d.ts.map +1 -0
- package/dist/gasless/get-gasless-request/query.js +42 -0
- package/dist/gasless/get-gasless-request/query.js.map +1 -0
- package/dist/gasless/get-gasless-request/to-gasless-request.d.ts +26 -0
- package/dist/gasless/get-gasless-request/to-gasless-request.d.ts.map +1 -0
- package/dist/gasless/get-gasless-request/to-gasless-request.js +62 -0
- package/dist/gasless/get-gasless-request/to-gasless-request.js.map +1 -0
- package/dist/gasless/get-gasless-request-transactions/get-gasless-request-transactions.d.ts +40 -0
- package/dist/gasless/get-gasless-request-transactions/get-gasless-request-transactions.d.ts.map +1 -0
- package/dist/gasless/get-gasless-request-transactions/get-gasless-request-transactions.js +15 -0
- package/dist/gasless/get-gasless-request-transactions/get-gasless-request-transactions.js.map +1 -0
- package/dist/gasless/get-gasless-request-transactions/index.d.ts +4 -0
- package/dist/gasless/get-gasless-request-transactions/index.d.ts.map +1 -0
- package/dist/gasless/get-gasless-request-transactions/query.d.ts +75 -0
- package/dist/gasless/get-gasless-request-transactions/query.d.ts.map +1 -0
- package/dist/gasless/get-gasless-request-transactions/query.js +37 -0
- package/dist/gasless/get-gasless-request-transactions/query.js.map +1 -0
- package/dist/gasless/get-gasless-request-transactions/to-gasless-request-transaction.d.ts +21 -0
- package/dist/gasless/get-gasless-request-transactions/to-gasless-request-transaction.d.ts.map +1 -0
- package/dist/gasless/get-gasless-request-transactions/to-gasless-request-transaction.js +27 -0
- package/dist/gasless/get-gasless-request-transactions/to-gasless-request-transaction.js.map +1 -0
- package/dist/gasless/get-gasless-wallet-address/get-gasless-wallet-address.d.ts +48 -0
- package/dist/gasless/get-gasless-wallet-address/get-gasless-wallet-address.d.ts.map +1 -0
- package/dist/gasless/get-gasless-wallet-address/get-gasless-wallet-address.js +20 -0
- package/dist/gasless/get-gasless-wallet-address/get-gasless-wallet-address.js.map +1 -0
- package/dist/gasless/get-gasless-wallet-address/index.d.ts +3 -0
- package/dist/gasless/get-gasless-wallet-address/index.d.ts.map +1 -0
- package/dist/gasless/get-gasless-wallet-address/query.d.ts +46 -0
- package/dist/gasless/get-gasless-wallet-address/query.d.ts.map +1 -0
- package/dist/gasless/get-gasless-wallet-address/query.js +25 -0
- package/dist/gasless/get-gasless-wallet-address/query.js.map +1 -0
- package/dist/gasless/get-gasless-wallet-creation-fee/get-gasless-wallet-creation-fee.d.ts +57 -0
- package/dist/gasless/get-gasless-wallet-creation-fee/get-gasless-wallet-creation-fee.d.ts.map +1 -0
- package/dist/gasless/get-gasless-wallet-creation-fee/get-gasless-wallet-creation-fee.js +17 -0
- package/dist/gasless/get-gasless-wallet-creation-fee/get-gasless-wallet-creation-fee.js.map +1 -0
- package/dist/gasless/get-gasless-wallet-creation-fee/index.d.ts +3 -0
- package/dist/gasless/get-gasless-wallet-creation-fee/index.d.ts.map +1 -0
- package/dist/gasless/get-gasless-wallet-creation-fee/query.d.ts +51 -0
- package/dist/gasless/get-gasless-wallet-creation-fee/query.d.ts.map +1 -0
- package/dist/gasless/get-gasless-wallet-creation-fee/query.js +25 -0
- package/dist/gasless/get-gasless-wallet-creation-fee/query.js.map +1 -0
- package/dist/gasless/get-gasless-wallet-nonce/get-gasless-wallet-nonce.d.ts +51 -0
- package/dist/gasless/get-gasless-wallet-nonce/get-gasless-wallet-nonce.d.ts.map +1 -0
- package/dist/gasless/get-gasless-wallet-nonce/get-gasless-wallet-nonce.js +21 -0
- package/dist/gasless/get-gasless-wallet-nonce/get-gasless-wallet-nonce.js.map +1 -0
- package/dist/gasless/get-gasless-wallet-nonce/index.d.ts +3 -0
- package/dist/gasless/get-gasless-wallet-nonce/index.d.ts.map +1 -0
- package/dist/gasless/get-gasless-wallet-nonce/query.d.ts +47 -0
- package/dist/gasless/get-gasless-wallet-nonce/query.d.ts.map +1 -0
- package/dist/gasless/get-gasless-wallet-nonce/query.js +25 -0
- package/dist/gasless/get-gasless-wallet-nonce/query.js.map +1 -0
- package/dist/gasless/get-session-key-selectors.d.ts +83 -0
- package/dist/gasless/get-session-key-selectors.d.ts.map +1 -0
- package/dist/gasless/get-session-key-selectors.js +25 -0
- package/dist/gasless/get-session-key-selectors.js.map +1 -0
- package/dist/gasless/http.d.ts +229 -0
- package/dist/gasless/http.d.ts.map +1 -0
- package/dist/gasless/http.js +165 -0
- package/dist/gasless/http.js.map +1 -0
- package/dist/gasless/index.d.ts +34 -0
- package/dist/gasless/index.d.ts.map +1 -0
- package/dist/gasless/is-newer-gasless-request.d.ts +32 -0
- package/dist/gasless/is-newer-gasless-request.d.ts.map +1 -0
- package/dist/gasless/is-newer-gasless-request.js +21 -0
- package/dist/gasless/is-newer-gasless-request.js.map +1 -0
- package/dist/gasless/nonce-lock.d.ts +180 -0
- package/dist/gasless/nonce-lock.d.ts.map +1 -0
- package/dist/gasless/nonce-lock.js +102 -0
- package/dist/gasless/nonce-lock.js.map +1 -0
- package/dist/gasless/observe-gasless-request.d.ts +65 -0
- package/dist/gasless/observe-gasless-request.d.ts.map +1 -0
- package/dist/gasless/observe-gasless-request.js +56 -0
- package/dist/gasless/observe-gasless-request.js.map +1 -0
- package/dist/gasless/query-poll-delay.d.ts +39 -0
- package/dist/gasless/query-poll-delay.d.ts.map +1 -0
- package/dist/gasless/query-poll-delay.js +14 -0
- package/dist/gasless/query-poll-delay.js.map +1 -0
- package/dist/gasless/relay-gasless-batch/index.d.ts +3 -0
- package/dist/gasless/relay-gasless-batch/index.d.ts.map +1 -0
- package/dist/gasless/relay-gasless-batch/query.d.ts +18 -0
- package/dist/gasless/relay-gasless-batch/query.d.ts.map +1 -0
- package/dist/gasless/relay-gasless-batch/query.js +12 -0
- package/dist/gasless/relay-gasless-batch/query.js.map +1 -0
- package/dist/gasless/relay-gasless-batch/relay-gasless-batch.d.ts +106 -0
- package/dist/gasless/relay-gasless-batch/relay-gasless-batch.d.ts.map +1 -0
- package/dist/gasless/relay-gasless-batch/relay-gasless-batch.js +145 -0
- package/dist/gasless/relay-gasless-batch/relay-gasless-batch.js.map +1 -0
- package/dist/gasless/relay-gasless-batch/sign-gasless-batch.d.ts +36 -0
- package/dist/gasless/relay-gasless-batch/sign-gasless-batch.d.ts.map +1 -0
- package/dist/gasless/relay-gasless-batch/sign-gasless-batch.js +24 -0
- package/dist/gasless/relay-gasless-batch/sign-gasless-batch.js.map +1 -0
- package/dist/gasless/relay-grant-delegation/index.d.ts +3 -0
- package/dist/gasless/relay-grant-delegation/index.d.ts.map +1 -0
- package/dist/gasless/relay-grant-delegation/query.d.ts +18 -0
- package/dist/gasless/relay-grant-delegation/query.d.ts.map +1 -0
- package/dist/gasless/relay-grant-delegation/query.js +12 -0
- package/dist/gasless/relay-grant-delegation/query.js.map +1 -0
- package/dist/gasless/relay-grant-delegation/relay-grant-delegation.d.ts +69 -0
- package/dist/gasless/relay-grant-delegation/relay-grant-delegation.d.ts.map +1 -0
- package/dist/gasless/relay-grant-delegation/relay-grant-delegation.js +57 -0
- package/dist/gasless/relay-grant-delegation/relay-grant-delegation.js.map +1 -0
- package/dist/gasless/relay-instant-operations/index.d.ts +3 -0
- package/dist/gasless/relay-instant-operations/index.d.ts.map +1 -0
- package/dist/gasless/relay-instant-operations/query.d.ts +18 -0
- package/dist/gasless/relay-instant-operations/query.d.ts.map +1 -0
- package/dist/gasless/relay-instant-operations/query.js +12 -0
- package/dist/gasless/relay-instant-operations/query.js.map +1 -0
- package/dist/gasless/relay-instant-operations/relay-instant-operations.d.ts +127 -0
- package/dist/gasless/relay-instant-operations/relay-instant-operations.d.ts.map +1 -0
- package/dist/gasless/relay-instant-operations/relay-instant-operations.js +42 -0
- package/dist/gasless/relay-instant-operations/relay-instant-operations.js.map +1 -0
- package/dist/gasless/relayable-writes.d.ts +163 -0
- package/dist/gasless/relayable-writes.d.ts.map +1 -0
- package/dist/gasless/relayable-writes.js +113 -0
- package/dist/gasless/relayable-writes.js.map +1 -0
- package/dist/gasless/resolve-gasless.d.ts +52 -0
- package/dist/gasless/resolve-gasless.d.ts.map +1 -0
- package/dist/gasless/resolve-gasless.js +19 -0
- package/dist/gasless/resolve-gasless.js.map +1 -0
- package/dist/gasless/resolve-wallet-identities.d.ts +30 -0
- package/dist/gasless/resolve-wallet-identities.d.ts.map +1 -0
- package/dist/gasless/resolve-wallet-identities.js +21 -0
- package/dist/gasless/resolve-wallet-identities.js.map +1 -0
- package/dist/gasless/resubmit-gasless-request/index.d.ts +3 -0
- package/dist/gasless/resubmit-gasless-request/index.d.ts.map +1 -0
- package/dist/gasless/resubmit-gasless-request/query.d.ts +19 -0
- package/dist/gasless/resubmit-gasless-request/query.d.ts.map +1 -0
- package/dist/gasless/resubmit-gasless-request/query.js +12 -0
- package/dist/gasless/resubmit-gasless-request/query.js.map +1 -0
- package/dist/gasless/resubmit-gasless-request/resubmit-gasless-request.d.ts +50 -0
- package/dist/gasless/resubmit-gasless-request/resubmit-gasless-request.d.ts.map +1 -0
- package/dist/gasless/resubmit-gasless-request/resubmit-gasless-request.js +52 -0
- package/dist/gasless/resubmit-gasless-request/resubmit-gasless-request.js.map +1 -0
- package/dist/gasless/settle-gasless-deposit-existing-account/index.d.ts +3 -0
- package/dist/gasless/settle-gasless-deposit-existing-account/index.d.ts.map +1 -0
- package/dist/gasless/settle-gasless-deposit-existing-account/query.d.ts +18 -0
- package/dist/gasless/settle-gasless-deposit-existing-account/query.d.ts.map +1 -0
- package/dist/gasless/settle-gasless-deposit-existing-account/query.js +12 -0
- package/dist/gasless/settle-gasless-deposit-existing-account/query.js.map +1 -0
- package/dist/gasless/settle-gasless-deposit-existing-account/settle-gasless-deposit-existing-account.d.ts +66 -0
- package/dist/gasless/settle-gasless-deposit-existing-account/settle-gasless-deposit-existing-account.d.ts.map +1 -0
- package/dist/gasless/settle-gasless-deposit-existing-account/settle-gasless-deposit-existing-account.js +36 -0
- package/dist/gasless/settle-gasless-deposit-existing-account/settle-gasless-deposit-existing-account.js.map +1 -0
- package/dist/gasless/settle-gasless-deposit-new-account/index.d.ts +3 -0
- package/dist/gasless/settle-gasless-deposit-new-account/index.d.ts.map +1 -0
- package/dist/gasless/settle-gasless-deposit-new-account/query.d.ts +18 -0
- package/dist/gasless/settle-gasless-deposit-new-account/query.d.ts.map +1 -0
- package/dist/gasless/settle-gasless-deposit-new-account/query.js +12 -0
- package/dist/gasless/settle-gasless-deposit-new-account/query.js.map +1 -0
- package/dist/gasless/settle-gasless-deposit-new-account/settle-gasless-deposit-new-account.d.ts +106 -0
- package/dist/gasless/settle-gasless-deposit-new-account/settle-gasless-deposit-new-account.d.ts.map +1 -0
- package/dist/gasless/settle-gasless-deposit-new-account/settle-gasless-deposit-new-account.js +43 -0
- package/dist/gasless/settle-gasless-deposit-new-account/settle-gasless-deposit-new-account.js.map +1 -0
- package/dist/gasless/status-read-limiter.d.ts +44 -0
- package/dist/gasless/status-read-limiter.d.ts.map +1 -0
- package/dist/gasless/status-read-limiter.js +28 -0
- package/dist/gasless/status-read-limiter.js.map +1 -0
- package/dist/gasless/to-gasless-deposit-receipt.d.ts +61 -0
- package/dist/gasless/to-gasless-deposit-receipt.d.ts.map +1 -0
- package/dist/gasless/to-gasless-deposit-receipt.js +36 -0
- package/dist/gasless/to-gasless-deposit-receipt.js.map +1 -0
- package/dist/gasless/to-gasless-submit-receipt.d.ts +60 -0
- package/dist/gasless/to-gasless-submit-receipt.d.ts.map +1 -0
- package/dist/gasless/to-gasless-submit-receipt.js +26 -0
- package/dist/gasless/to-gasless-submit-receipt.js.map +1 -0
- package/dist/gasless/transient-read.d.ts +32 -0
- package/dist/gasless/transient-read.d.ts.map +1 -0
- package/dist/gasless/transient-read.js +28 -0
- package/dist/gasless/transient-read.js.map +1 -0
- package/dist/gasless/types/generated/gasless-deposits.d.ts +170 -0
- package/dist/gasless/types/generated/gasless-deposits.d.ts.map +1 -0
- package/dist/gasless/types/generated/gasless-operations.d.ts +260 -0
- package/dist/gasless/types/generated/gasless-operations.d.ts.map +1 -0
- package/dist/gasless/types.d.ts +493 -0
- package/dist/gasless/types.d.ts.map +1 -0
- package/dist/gasless/types.js +33 -0
- package/dist/gasless/types.js.map +1 -0
- package/dist/gasless/unconfirmed-submit.d.ts +132 -0
- package/dist/gasless/unconfirmed-submit.d.ts.map +1 -0
- package/dist/gasless/unconfirmed-submit.js +49 -0
- package/dist/gasless/unconfirmed-submit.js.map +1 -0
- package/dist/gasless/wait-for-gasless-request/index.d.ts +2 -0
- package/dist/gasless/wait-for-gasless-request/index.d.ts.map +1 -0
- package/dist/gasless/wait-for-gasless-request/wait-for-gasless-request.d.ts +114 -0
- package/dist/gasless/wait-for-gasless-request/wait-for-gasless-request.d.ts.map +1 -0
- package/dist/gasless/wait-for-gasless-request/wait-for-gasless-request.js +77 -0
- package/dist/gasless/wait-for-gasless-request/wait-for-gasless-request.js.map +1 -0
- package/dist/gasless/wallet-id.d.ts +42 -0
- package/dist/gasless/wallet-id.d.ts.map +1 -0
- package/dist/gasless/wallet-id.js +25 -0
- package/dist/gasless/wallet-id.js.map +1 -0
- package/dist/gasless/wire-parse.d.ts +33 -0
- package/dist/gasless/wire-parse.d.ts.map +1 -0
- package/dist/gasless/wire-parse.js +14 -0
- package/dist/gasless/wire-parse.js.map +1 -0
- package/dist/gasless/wire-types.d.ts +73 -0
- package/dist/gasless/wire-types.d.ts.map +1 -0
- package/dist/gasless/write-request-registry.d.ts +56 -0
- package/dist/gasless/write-request-registry.d.ts.map +1 -0
- package/dist/gasless/write-request-registry.js +22 -0
- package/dist/gasless/write-request-registry.js.map +1 -0
- package/dist/index.d.ts +82 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +568 -497
- package/dist/pools/listing-config/to-listing-config.js +2 -2
- package/dist/pools/listing-config/to-listing-config.js.map +1 -1
- package/dist/pools/market-detail/to-listing-market-detail.d.ts.map +1 -1
- package/dist/pools/market-detail/to-listing-market-detail.js +46 -40
- package/dist/pools/market-detail/to-listing-market-detail.js.map +1 -1
- package/dist/pools/markets/to-listing-market.d.ts.map +1 -1
- package/dist/pools/markets/to-listing-market.js +2 -1
- package/dist/pools/markets/to-listing-market.js.map +1 -1
- package/dist/pools/types/generated/listing-backend.d.ts +163 -16
- package/dist/pools/types/generated/listing-backend.d.ts.map +1 -1
- package/dist/pools/types/generated/listing-backend.js.map +1 -1
- package/dist/pools/types.d.ts +52 -2
- package/dist/pools/types.d.ts.map +1 -1
- package/dist/pools/types.js +6 -4
- package/dist/pools/types.js.map +1 -1
- package/dist/quotes/get-quote-funding/get-quote-funding.d.ts +3 -2
- package/dist/quotes/get-quote-funding/get-quote-funding.d.ts.map +1 -1
- package/dist/quotes/get-quote-funding/get-quote-funding.js.map +1 -1
- package/dist/quotes/get-quote-funding/types.d.ts +4 -2
- package/dist/quotes/get-quote-funding/types.d.ts.map +1 -1
- package/dist/quotes/get-quote-pending-funding/get-quote-pending-funding.d.ts +68 -0
- package/dist/quotes/get-quote-pending-funding/get-quote-pending-funding.d.ts.map +1 -0
- package/dist/quotes/get-quote-pending-funding/get-quote-pending-funding.js +34 -0
- package/dist/quotes/get-quote-pending-funding/get-quote-pending-funding.js.map +1 -0
- package/dist/quotes/get-quote-pending-funding/index.d.ts +4 -0
- package/dist/quotes/get-quote-pending-funding/index.d.ts.map +1 -0
- package/dist/quotes/get-quote-pending-funding/query.d.ts +58 -0
- package/dist/quotes/get-quote-pending-funding/query.d.ts.map +1 -0
- package/dist/quotes/get-quote-pending-funding/query.js +27 -0
- package/dist/quotes/get-quote-pending-funding/query.js.map +1 -0
- package/dist/quotes/get-quote-pending-funding/types.d.ts +19 -0
- package/dist/quotes/get-quote-pending-funding/types.d.ts.map +1 -0
- package/dist/quotes/get-quotes-events-by-type/get-quotes-events-by-type.d.ts +2 -1
- package/dist/quotes/get-quotes-events-by-type/get-quotes-events-by-type.d.ts.map +1 -1
- package/dist/quotes/get-quotes-events-by-type/get-quotes-events-by-type.js.map +1 -1
- package/dist/quotes/grouping/aggregate-group-funding.d.ts +9 -8
- package/dist/quotes/grouping/aggregate-group-funding.d.ts.map +1 -1
- package/dist/quotes/grouping/aggregate-group-funding.js.map +1 -1
- package/dist/quotes/grouping/partition-quotes.d.ts +30 -0
- package/dist/quotes/grouping/partition-quotes.d.ts.map +1 -1
- package/dist/quotes/grouping/partition-quotes.js +9 -6
- package/dist/quotes/grouping/partition-quotes.js.map +1 -1
- package/dist/quotes/index.d.ts +1 -0
- package/dist/quotes/index.d.ts.map +1 -1
- package/dist/quotes/unified-quote.d.ts +6 -6
- package/dist/quotes/unified-quote.js.map +1 -1
- package/dist/shared/errors/redact-url.d.ts +15 -0
- package/dist/shared/errors/redact-url.d.ts.map +1 -0
- package/dist/shared/errors/redact-url.js +9 -0
- package/dist/shared/errors/redact-url.js.map +1 -0
- package/dist/shared/errors/retry-after.d.ts +17 -0
- package/dist/shared/errors/retry-after.d.ts.map +1 -0
- package/dist/shared/errors/retry-after.js +16 -0
- package/dist/shared/errors/retry-after.js.map +1 -0
- package/dist/shared/errors/sanitized-api-error.d.ts +32 -0
- package/dist/shared/errors/sanitized-api-error.d.ts.map +1 -0
- package/dist/shared/errors/sanitized-api-error.js +41 -0
- package/dist/shared/errors/sanitized-api-error.js.map +1 -0
- package/dist/shared/errors/symm-error.d.ts +39 -4
- package/dist/shared/errors/symm-error.d.ts.map +1 -1
- package/dist/shared/errors/symm-error.js +29 -15
- package/dist/shared/errors/symm-error.js.map +1 -1
- package/dist/shared/types/properties.d.ts +53 -5
- package/dist/shared/types/properties.d.ts.map +1 -1
- package/dist/shared/utils/core-units.d.ts +82 -0
- package/dist/shared/utils/core-units.d.ts.map +1 -0
- package/dist/shared/utils/core-units.js +21 -0
- package/dist/shared/utils/core-units.js.map +1 -0
- package/dist/shared/utils/http-header.d.ts +16 -0
- package/dist/shared/utils/http-header.d.ts.map +1 -0
- package/dist/shared/utils/http-header.js +14 -0
- package/dist/shared/utils/http-header.js.map +1 -0
- package/dist/shared/utils/query.js +2 -1
- package/dist/shared/utils/query.js.map +1 -1
- package/dist/solvers/force-close/force-close-auto.d.ts +6 -2
- package/dist/solvers/force-close/force-close-auto.d.ts.map +1 -1
- package/dist/solvers/force-close/force-close-auto.js +2 -1
- package/dist/solvers/force-close/force-close-auto.js.map +1 -1
- package/dist/solvers/force-close/force-close-position.d.ts +9 -3
- package/dist/solvers/force-close/force-close-position.d.ts.map +1 -1
- package/dist/solvers/force-close/force-close-position.js +2 -1
- package/dist/solvers/force-close/force-close-position.js.map +1 -1
- package/dist/solvers/instant-open/instant-open/adapters/enigma-instant-open.js +12 -12
- package/dist/solvers/instant-open/instant-open/adapters/rasa-instant-open.js +7 -7
- package/dist/symmio-contracts/abi/index.d.ts +2 -0
- package/dist/symmio-contracts/abi/index.d.ts.map +1 -1
- package/dist/symmio-contracts/abi/v0.8.6/gasless-layer.d.ts +2323 -0
- package/dist/symmio-contracts/abi/v0.8.6/gasless-layer.d.ts.map +1 -0
- package/dist/symmio-contracts/abi/v0.8.6/gasless-layer.js +2706 -0
- package/dist/symmio-contracts/abi/v0.8.6/gasless-layer.js.map +1 -0
- package/dist/symmio-contracts/abi/v0.8.6/gasless-wallet.d.ts +137 -0
- package/dist/symmio-contracts/abi/v0.8.6/gasless-wallet.d.ts.map +1 -0
- package/dist/symmio-contracts/abi/v0.8.6/gasless-wallet.js +145 -0
- package/dist/symmio-contracts/abi/v0.8.6/gasless-wallet.js.map +1 -0
- package/dist/symmio-contracts/abi/v0.8.6/index.d.ts +2 -0
- package/dist/symmio-contracts/abi/v0.8.6/index.d.ts.map +1 -1
- package/dist/symmio-contracts/abi/v0.8.6/instant-layer.d.ts +1879 -37
- package/dist/symmio-contracts/abi/v0.8.6/instant-layer.d.ts.map +1 -1
- package/dist/symmio-contracts/abi/v0.8.6/instant-layer.js +2180 -50
- package/dist/symmio-contracts/abi/v0.8.6/instant-layer.js.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/add-margin.d.ts +2 -2
- package/dist/symmio-contracts/account-layer/actions/add-margin.d.ts.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/add-margin.js +34 -17
- package/dist/symmio-contracts/account-layer/actions/add-margin.js.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/create-sub-accounts.d.ts +11 -2
- package/dist/symmio-contracts/account-layer/actions/create-sub-accounts.d.ts.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/create-sub-accounts.js +33 -17
- package/dist/symmio-contracts/account-layer/actions/create-sub-accounts.js.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/delete-sub-account.d.ts +9 -2
- package/dist/symmio-contracts/account-layer/actions/delete-sub-account.d.ts.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/delete-sub-account.js +33 -16
- package/dist/symmio-contracts/account-layer/actions/delete-sub-account.js.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/deposit-and-allocate-for-account.d.ts +8 -2
- package/dist/symmio-contracts/account-layer/actions/deposit-and-allocate-for-account.d.ts.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/deposit-and-allocate-for-account.js +34 -17
- package/dist/symmio-contracts/account-layer/actions/deposit-and-allocate-for-account.js.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/deposit-for-account.d.ts +8 -2
- package/dist/symmio-contracts/account-layer/actions/deposit-for-account.d.ts.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/deposit-for-account.js +34 -17
- package/dist/symmio-contracts/account-layer/actions/deposit-for-account.js.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/edit-account-name.d.ts +7 -2
- package/dist/symmio-contracts/account-layer/actions/edit-account-name.d.ts.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/edit-account-name.js +34 -17
- package/dist/symmio-contracts/account-layer/actions/edit-account-name.js.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/get-account-balance-info.d.ts +1 -1
- package/dist/symmio-contracts/account-layer/actions/get-account-balance-info.js.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/get-account-balance-of.d.ts +9 -3
- package/dist/symmio-contracts/account-layer/actions/get-account-balance-of.d.ts.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/get-account-balance-of.js.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/remove-margin.d.ts +2 -2
- package/dist/symmio-contracts/account-layer/actions/remove-margin.d.ts.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/remove-margin.js +41 -20
- package/dist/symmio-contracts/account-layer/actions/remove-margin.js.map +1 -1
- package/dist/symmio-contracts/account-layer/types.d.ts +3 -1
- package/dist/symmio-contracts/account-layer/types.d.ts.map +1 -1
- package/dist/symmio-contracts/account-layer/types.js.map +1 -1
- package/dist/symmio-contracts/instant-layer/actions/finalize-revoke-delegation.d.ts +60 -0
- package/dist/symmio-contracts/instant-layer/actions/finalize-revoke-delegation.d.ts.map +1 -0
- package/dist/symmio-contracts/instant-layer/actions/finalize-revoke-delegation.js +35 -0
- package/dist/symmio-contracts/instant-layer/actions/finalize-revoke-delegation.js.map +1 -0
- package/dist/symmio-contracts/instant-layer/actions/get-active-delegations.d.ts +91 -0
- package/dist/symmio-contracts/instant-layer/actions/get-active-delegations.d.ts.map +1 -0
- package/dist/symmio-contracts/instant-layer/actions/get-active-delegations.js +19 -0
- package/dist/symmio-contracts/instant-layer/actions/get-active-delegations.js.map +1 -0
- package/dist/symmio-contracts/instant-layer/actions/get-instant-layer-nonce.d.ts +36 -0
- package/dist/symmio-contracts/instant-layer/actions/get-instant-layer-nonce.d.ts.map +1 -0
- package/dist/symmio-contracts/instant-layer/actions/get-instant-layer-nonce.js +15 -0
- package/dist/symmio-contracts/instant-layer/actions/get-instant-layer-nonce.js.map +1 -0
- package/dist/symmio-contracts/instant-layer/actions/get-pending-revocation-etas.d.ts +79 -0
- package/dist/symmio-contracts/instant-layer/actions/get-pending-revocation-etas.d.ts.map +1 -0
- package/dist/symmio-contracts/instant-layer/actions/get-pending-revocation-etas.js +32 -0
- package/dist/symmio-contracts/instant-layer/actions/get-pending-revocation-etas.js.map +1 -0
- package/dist/symmio-contracts/instant-layer/actions/get-revocation-cooldown.d.ts +43 -0
- package/dist/symmio-contracts/instant-layer/actions/get-revocation-cooldown.d.ts.map +1 -0
- package/dist/symmio-contracts/instant-layer/actions/get-revocation-cooldown.js +14 -0
- package/dist/symmio-contracts/instant-layer/actions/get-revocation-cooldown.js.map +1 -0
- package/dist/symmio-contracts/instant-layer/actions/grant-delegation.d.ts +24 -3
- package/dist/symmio-contracts/instant-layer/actions/grant-delegation.d.ts.map +1 -1
- package/dist/symmio-contracts/instant-layer/actions/grant-delegation.js +48 -22
- package/dist/symmio-contracts/instant-layer/actions/grant-delegation.js.map +1 -1
- package/dist/symmio-contracts/instant-layer/actions/initiate-revoke-delegation.d.ts +62 -0
- package/dist/symmio-contracts/instant-layer/actions/initiate-revoke-delegation.d.ts.map +1 -0
- package/dist/symmio-contracts/instant-layer/actions/initiate-revoke-delegation.js +35 -0
- package/dist/symmio-contracts/instant-layer/actions/initiate-revoke-delegation.js.map +1 -0
- package/dist/symmio-contracts/instant-layer/index.d.ts +12 -0
- package/dist/symmio-contracts/instant-layer/index.d.ts.map +1 -1
- package/dist/symmio-contracts/instant-layer/query/finalize-revoke-delegation.d.ts +22 -0
- package/dist/symmio-contracts/instant-layer/query/finalize-revoke-delegation.d.ts.map +1 -0
- package/dist/symmio-contracts/instant-layer/query/finalize-revoke-delegation.js +12 -0
- package/dist/symmio-contracts/instant-layer/query/finalize-revoke-delegation.js.map +1 -0
- package/dist/symmio-contracts/instant-layer/query/get-active-delegations.d.ts +36 -0
- package/dist/symmio-contracts/instant-layer/query/get-active-delegations.d.ts.map +1 -0
- package/dist/symmio-contracts/instant-layer/query/get-active-delegations.js +29 -0
- package/dist/symmio-contracts/instant-layer/query/get-active-delegations.js.map +1 -0
- package/dist/symmio-contracts/instant-layer/query/get-instant-layer-nonce.d.ts +39 -0
- package/dist/symmio-contracts/instant-layer/query/get-instant-layer-nonce.d.ts.map +1 -0
- package/dist/symmio-contracts/instant-layer/query/get-instant-layer-nonce.js +27 -0
- package/dist/symmio-contracts/instant-layer/query/get-instant-layer-nonce.js.map +1 -0
- package/dist/symmio-contracts/instant-layer/query/get-is-delegation-active.js +7 -7
- package/dist/symmio-contracts/instant-layer/query/get-pending-revocation-etas.d.ts +42 -0
- package/dist/symmio-contracts/instant-layer/query/get-pending-revocation-etas.d.ts.map +1 -0
- package/dist/symmio-contracts/instant-layer/query/get-pending-revocation-etas.js +30 -0
- package/dist/symmio-contracts/instant-layer/query/get-pending-revocation-etas.js.map +1 -0
- package/dist/symmio-contracts/instant-layer/query/get-revocation-cooldown.d.ts +36 -0
- package/dist/symmio-contracts/instant-layer/query/get-revocation-cooldown.d.ts.map +1 -0
- package/dist/symmio-contracts/instant-layer/query/get-revocation-cooldown.js +21 -0
- package/dist/symmio-contracts/instant-layer/query/get-revocation-cooldown.js.map +1 -0
- package/dist/symmio-contracts/instant-layer/query/initiate-revoke-delegation.d.ts +22 -0
- package/dist/symmio-contracts/instant-layer/query/initiate-revoke-delegation.d.ts.map +1 -0
- package/dist/symmio-contracts/instant-layer/query/initiate-revoke-delegation.js +12 -0
- package/dist/symmio-contracts/instant-layer/query/initiate-revoke-delegation.js.map +1 -0
- package/dist/symmio-contracts/symmio/actions/allocate.d.ts +2 -2
- package/dist/symmio-contracts/symmio/actions/allocate.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/actions/allocate.js +2 -1
- package/dist/symmio-contracts/symmio/actions/allocate.js.map +1 -1
- package/dist/symmio-contracts/symmio/actions/approve-operational-fee.d.ts +87 -0
- package/dist/symmio-contracts/symmio/actions/approve-operational-fee.d.ts.map +1 -0
- package/dist/symmio-contracts/symmio/actions/approve-operational-fee.js +38 -0
- package/dist/symmio-contracts/symmio/actions/approve-operational-fee.js.map +1 -0
- package/dist/symmio-contracts/symmio/actions/deallocate-and-initiate-withdraw.d.ts +2 -2
- package/dist/symmio-contracts/symmio/actions/deallocate-and-initiate-withdraw.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/actions/deallocate-and-initiate-withdraw.js +2 -1
- package/dist/symmio-contracts/symmio/actions/deallocate-and-initiate-withdraw.js.map +1 -1
- package/dist/symmio-contracts/symmio/actions/deallocate.d.ts +2 -2
- package/dist/symmio-contracts/symmio/actions/deallocate.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/actions/deallocate.js +2 -1
- package/dist/symmio-contracts/symmio/actions/deallocate.js.map +1 -1
- package/dist/symmio-contracts/symmio/actions/finalize-withdraw-request.d.ts +15 -3
- package/dist/symmio-contracts/symmio/actions/finalize-withdraw-request.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/actions/finalize-withdraw-request.js +34 -17
- package/dist/symmio-contracts/symmio/actions/finalize-withdraw-request.js.map +1 -1
- package/dist/symmio-contracts/symmio/actions/force-cancel-close-request.d.ts +2 -2
- package/dist/symmio-contracts/symmio/actions/force-cancel-close-request.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/actions/force-cancel-close-request.js +2 -1
- package/dist/symmio-contracts/symmio/actions/force-cancel-close-request.js.map +1 -1
- package/dist/symmio-contracts/symmio/actions/force-cancel-quote.d.ts +2 -2
- package/dist/symmio-contracts/symmio/actions/force-cancel-quote.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/actions/force-cancel-quote.js +2 -1
- package/dist/symmio-contracts/symmio/actions/force-cancel-quote.js.map +1 -1
- package/dist/symmio-contracts/symmio/actions/get-operational-fee-allowance.d.ts +85 -0
- package/dist/symmio-contracts/symmio/actions/get-operational-fee-allowance.d.ts.map +1 -0
- package/dist/symmio-contracts/symmio/actions/get-operational-fee-allowance.js +29 -0
- package/dist/symmio-contracts/symmio/actions/get-operational-fee-allowance.js.map +1 -0
- package/dist/symmio-contracts/symmio/actions/initiate-withdraw.d.ts +2 -2
- package/dist/symmio-contracts/symmio/actions/initiate-withdraw.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/actions/initiate-withdraw.js +2 -1
- package/dist/symmio-contracts/symmio/actions/initiate-withdraw.js.map +1 -1
- package/dist/symmio-contracts/symmio/actions/request-cancel-withdraw.d.ts +2 -2
- package/dist/symmio-contracts/symmio/actions/request-cancel-withdraw.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/actions/request-cancel-withdraw.js +2 -1
- package/dist/symmio-contracts/symmio/actions/request-cancel-withdraw.js.map +1 -1
- package/dist/symmio-contracts/symmio/actions/request-to-cancel-close-request.d.ts +2 -2
- package/dist/symmio-contracts/symmio/actions/request-to-cancel-close-request.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/actions/request-to-cancel-close-request.js +2 -1
- package/dist/symmio-contracts/symmio/actions/request-to-cancel-close-request.js.map +1 -1
- package/dist/symmio-contracts/symmio/actions/request-to-cancel-quote.d.ts +2 -2
- package/dist/symmio-contracts/symmio/actions/request-to-cancel-quote.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/actions/request-to-cancel-quote.js +2 -1
- package/dist/symmio-contracts/symmio/actions/request-to-cancel-quote.js.map +1 -1
- package/dist/symmio-contracts/symmio/actions/withdraw-auto.d.ts +9 -7
- package/dist/symmio-contracts/symmio/actions/withdraw-auto.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/actions/withdraw-auto.js +24 -22
- package/dist/symmio-contracts/symmio/actions/withdraw-auto.js.map +1 -1
- package/dist/symmio-contracts/symmio/actions/withdraw.d.ts +2 -2
- package/dist/symmio-contracts/symmio/actions/withdraw.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/actions/withdraw.js +4 -2
- package/dist/symmio-contracts/symmio/actions/withdraw.js.map +1 -1
- package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/get-funding-fees-of-party-b.d.ts +43 -0
- package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/get-funding-fees-of-party-b.d.ts.map +1 -0
- package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/get-funding-fees-of-party-b.js +15 -0
- package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/get-funding-fees-of-party-b.js.map +1 -0
- package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/index.d.ts +4 -0
- package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/index.d.ts.map +1 -0
- package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/query.d.ts +43 -0
- package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/query.d.ts.map +1 -0
- package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/query.js +25 -0
- package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/query.js.map +1 -0
- package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/types.d.ts +85 -0
- package/dist/symmio-contracts/symmio/get-funding-fees-of-party-b/types.d.ts.map +1 -0
- package/dist/symmio-contracts/symmio/index.d.ts +5 -0
- package/dist/symmio-contracts/symmio/index.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/internal/call-as-sub-account.d.ts +2 -1
- package/dist/symmio-contracts/symmio/internal/call-as-sub-account.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/internal/call-as-sub-account.js +46 -17
- package/dist/symmio-contracts/symmio/internal/call-as-sub-account.js.map +1 -1
- package/dist/symmio-contracts/symmio/query/approve-operational-fee.d.ts +18 -0
- package/dist/symmio-contracts/symmio/query/approve-operational-fee.d.ts.map +1 -0
- package/dist/symmio-contracts/symmio/query/approve-operational-fee.js +12 -0
- package/dist/symmio-contracts/symmio/query/approve-operational-fee.js.map +1 -0
- package/dist/symmio-contracts/symmio/query/get-operational-fee-allowance.d.ts +35 -0
- package/dist/symmio-contracts/symmio/query/get-operational-fee-allowance.d.ts.map +1 -0
- package/dist/symmio-contracts/symmio/query/get-operational-fee-allowance.js +28 -0
- package/dist/symmio-contracts/symmio/query/get-operational-fee-allowance.js.map +1 -0
- package/dist/symmio-contracts/symmio/types.d.ts +6 -6
- package/dist/symmio-contracts/symmio/types.js.map +1 -1
- package/dist/symmio-subgraph/executeSubgraphRequest.d.ts +2 -1
- package/dist/symmio-subgraph/executeSubgraphRequest.d.ts.map +1 -1
- package/dist/symmio-subgraph/executeSubgraphRequest.js +24 -21
- package/dist/symmio-subgraph/executeSubgraphRequest.js.map +1 -1
- package/dist/websocket/gasless/close-code-policy.d.ts +51 -0
- package/dist/websocket/gasless/close-code-policy.d.ts.map +1 -0
- package/dist/websocket/gasless/close-code-policy.js +75 -0
- package/dist/websocket/gasless/close-code-policy.js.map +1 -0
- package/dist/websocket/gasless/gasless-stream-hub.d.ts +61 -0
- package/dist/websocket/gasless/gasless-stream-hub.d.ts.map +1 -0
- package/dist/websocket/gasless/gasless-stream-hub.js +311 -0
- package/dist/websocket/gasless/gasless-stream-hub.js.map +1 -0
- package/dist/websocket/gasless/index.d.ts +7 -0
- package/dist/websocket/gasless/index.d.ts.map +1 -0
- package/dist/websocket/gasless/parse-gasless-stream-message.d.ts +82 -0
- package/dist/websocket/gasless/parse-gasless-stream-message.d.ts.map +1 -0
- package/dist/websocket/gasless/parse-gasless-stream-message.js +136 -0
- package/dist/websocket/gasless/parse-gasless-stream-message.js.map +1 -0
- package/dist/websocket/gasless/resolve-gasless-stream-url.d.ts +58 -0
- package/dist/websocket/gasless/resolve-gasless-stream-url.d.ts.map +1 -0
- package/dist/websocket/gasless/resolve-gasless-stream-url.js +59 -0
- package/dist/websocket/gasless/resolve-gasless-stream-url.js.map +1 -0
- package/dist/websocket/gasless/types.d.ts +48 -0
- package/dist/websocket/gasless/types.d.ts.map +1 -0
- package/dist/websocket/gasless/watch-gasless-request.d.ts +72 -0
- package/dist/websocket/gasless/watch-gasless-request.d.ts.map +1 -0
- package/dist/websocket/gasless/watch-gasless-request.js +35 -0
- package/dist/websocket/gasless/watch-gasless-request.js.map +1 -0
- package/dist/websocket/index.d.ts +1 -0
- package/dist/websocket/index.d.ts.map +1 -1
- package/dist/websocket/socket/create-reconnecting-socket.d.ts +39 -6
- package/dist/websocket/socket/create-reconnecting-socket.d.ts.map +1 -1
- package/dist/websocket/socket/create-reconnecting-socket.js +92 -53
- package/dist/websocket/socket/create-reconnecting-socket.js.map +1 -1
- package/dist/websocket/socket/socket-status.d.ts +7 -2
- package/dist/websocket/socket/socket-status.d.ts.map +1 -1
- package/dist/websocket/socket/socket-status.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"force-cancel-close-request.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/symmio/actions/force-cancel-close-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,MAAM,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"force-cancel-close-request.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/symmio/actions/force-cancel-close-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,MAAM,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAI/G;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,OAAO,CACrD,sBAAsB,GACpB,qBAAqB,GAAG;IACtB;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB,wEAAwE;IACxE,OAAO,EAAE,MAAM,CAAC;CACjB,CACJ,CAAC;AAEF,sFAAsF;AACtF,MAAM,MAAM,iCAAiC,GAAG,IAAI,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,iCAAiC,GAC5C,OAAO,CAAC,iCAAiC,CAAC,CAiB5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"force-cancel-close-request.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/force-cancel-close-request.ts"],"sourcesContent":["import { encodeFunctionData, type Address, type Hash } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { Compute, WriteContractParameter } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.6/symmio\";\nimport { callAsSubAccount } from \"../internal/call-as-sub-account\";\n\n/**\n * Parameters for {@link forceCancelCloseRequest}.\n */\nexport type ForceCancelCloseRequestParameters = Compute<\n WriteContractParameter & {\n
|
|
1
|
+
{"version":3,"file":"force-cancel-close-request.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/force-cancel-close-request.ts"],"sourcesContent":["import { encodeFunctionData, type Address, type Hash } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { Compute, GaslessWriteParameter, WriteContractParameter } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.6/symmio\";\nimport { callAsSubAccount } from \"../internal/call-as-sub-account\";\n\n/**\n * Parameters for {@link forceCancelCloseRequest}.\n */\nexport type ForceCancelCloseRequestParameters = Compute<\n WriteContractParameter &\n GaslessWriteParameter & {\n /**\n * The subaccount (partyA) that owns the quote. Routed through the AccountLayer\n * `_call` proxy so the core sees this subaccount as the caller; the connected\n * wallet must be its on-chain `owner`.\n */\n account: Address;\n /** The `CANCEL_CLOSE_PENDING` quote id to force-cancel the close on. */\n quoteId: bigint;\n }\n>;\n\n/** Return type of {@link forceCancelCloseRequest}: the submitted transaction hash. */\nexport type ForceCancelCloseRequestReturnType = Hash;\n\n/**\n * Force-cancel a stuck close request (`forceCancelCloseRequest`) — the escalation\n * when partyB stalls on a close-cancel request.\n *\n * A quote reaches `CANCEL_CLOSE_PENDING` only when it was `CLOSE_PENDING` and\n * partyA called `requestToCancelCloseRequest`. If partyB does not acknowledge\n * within `coolDownsOfMA()[2]` (`forceCancelCloseCooldown`) after the request,\n * partyA may force it — the quote returns to `OPENED`. The core\n * `forceCancelCloseRequest(quoteId)` is routed through `AccountLayer._call(account, …)`;\n * the connected wallet must be the sub-account's `owner`.\n *\n * @param config - The SDK config (must have a `getWalletClient` resolver).\n * @param parameters - The owning subaccount, the quote id, optional `from` / pre-flight / chain id.\n * @returns The submitted transaction hash.\n * @throws {SymmError} when the chain is unsupported or no wallet client is available.\n *\n * @example\n * ```ts\n * const hash = await forceCancelCloseRequest(config, { account: \"0xsub…\", quoteId: 42n });\n * ```\n */\nexport async function forceCancelCloseRequest(\n config: Config,\n parameters: ForceCancelCloseRequestParameters,\n): Promise<ForceCancelCloseRequestReturnType> {\n const { chainId, account, quoteId } = parameters;\n\n const data = encodeFunctionData({\n abi: symmioAbi,\n functionName: \"forceCancelCloseRequest\",\n args: [quoteId],\n });\n\n return callAsSubAccount(config, {\n account,\n data,\n chainId,\n from: parameters.from,\n simulateBeforeWrite: parameters.simulateBeforeWrite,\n gasless: parameters.gasless,\n });\n}\n"],"mappings":";;;;AA+CA,eAAsB,EACpB,GACA,GAC4C;CAC5C,IAAM,EAAE,YAAS,YAAS,eAAY;CAQtC,OAAO,EAAiB,GAAQ;EAC9B;EACA,MARW,EAAmB;GAC9B,KAAK;GACL,cAAc;GACd,MAAM,CAAC,CAAO;EAChB,CAIE;EACA;EACA,MAAM,EAAW;EACjB,qBAAqB,EAAW;EAChC,SAAS,EAAW;CACtB,CAAC;AACH"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Address, Hash } from 'viem';
|
|
2
2
|
import { Config } from '../../../core/config/index.js';
|
|
3
|
-
import { Compute, WriteContractParameter } from '../../../shared/types/properties.js';
|
|
3
|
+
import { Compute, GaslessWriteParameter, WriteContractParameter } from '../../../shared/types/properties.js';
|
|
4
4
|
/**
|
|
5
5
|
* Parameters for {@link forceCancelQuote}.
|
|
6
6
|
*/
|
|
7
|
-
export type ForceCancelQuoteParameters = Compute<WriteContractParameter & {
|
|
7
|
+
export type ForceCancelQuoteParameters = Compute<WriteContractParameter & GaslessWriteParameter & {
|
|
8
8
|
/**
|
|
9
9
|
* The subaccount (partyA) that owns the quote. Routed through the AccountLayer
|
|
10
10
|
* `_call` proxy so the core sees this subaccount as the caller; the connected
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"force-cancel-quote.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/symmio/actions/force-cancel-quote.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,MAAM,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"force-cancel-quote.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/symmio/actions/force-cancel-quote.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,MAAM,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAI/G;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,OAAO,CAC9C,sBAAsB,GACpB,qBAAqB,GAAG;IACtB;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB,qDAAqD;IACrD,OAAO,EAAE,MAAM,CAAC;CACjB,CACJ,CAAC;AAEF,+EAA+E;AAC/E,MAAM,MAAM,0BAA0B,GAAG,IAAI,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,0BAA0B,GACrC,OAAO,CAAC,0BAA0B,CAAC,CAiBrC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"force-cancel-quote.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/force-cancel-quote.ts"],"sourcesContent":["import { encodeFunctionData, type Address, type Hash } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { Compute, WriteContractParameter } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.6/symmio\";\nimport { callAsSubAccount } from \"../internal/call-as-sub-account\";\n\n/**\n * Parameters for {@link forceCancelQuote}.\n */\nexport type ForceCancelQuoteParameters = Compute<\n WriteContractParameter & {\n
|
|
1
|
+
{"version":3,"file":"force-cancel-quote.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/force-cancel-quote.ts"],"sourcesContent":["import { encodeFunctionData, type Address, type Hash } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { Compute, GaslessWriteParameter, WriteContractParameter } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.6/symmio\";\nimport { callAsSubAccount } from \"../internal/call-as-sub-account\";\n\n/**\n * Parameters for {@link forceCancelQuote}.\n */\nexport type ForceCancelQuoteParameters = Compute<\n WriteContractParameter &\n GaslessWriteParameter & {\n /**\n * The subaccount (partyA) that owns the quote. Routed through the AccountLayer\n * `_call` proxy so the core sees this subaccount as the caller; the connected\n * wallet must be its on-chain `owner`.\n */\n account: Address;\n /** The `CANCEL_PENDING` quote id to force-cancel. */\n quoteId: bigint;\n }\n>;\n\n/** Return type of {@link forceCancelQuote}: the submitted transaction hash. */\nexport type ForceCancelQuoteReturnType = Hash;\n\n/**\n * Force-cancel a stuck quote (`forceCancelQuote`) — the escalation when partyB\n * stalls on a cancel request.\n *\n * A quote reaches `CANCEL_PENDING` only when it was `LOCKED` and partyA called\n * `requestToCancelQuote` (a `PENDING` quote cancels instantly and never needs\n * this). If partyB does not acknowledge within `coolDownsOfMA()[1]`\n * (`forceCancelCooldown`) after the request, partyA may force it. The core\n * `forceCancelQuote(quoteId)` is routed through `AccountLayer._call(account, …)`;\n * the connected wallet must be the sub-account's `owner`.\n *\n * @param config - The SDK config (must have a `getWalletClient` resolver).\n * @param parameters - The owning subaccount, the quote id, optional `from` / pre-flight / chain id.\n * @returns The submitted transaction hash.\n * @throws {SymmError} when the chain is unsupported or no wallet client is available.\n *\n * @example\n * ```ts\n * const hash = await forceCancelQuote(config, { account: \"0xsub…\", quoteId: 42n });\n * ```\n */\nexport async function forceCancelQuote(\n config: Config,\n parameters: ForceCancelQuoteParameters,\n): Promise<ForceCancelQuoteReturnType> {\n const { chainId, account, quoteId } = parameters;\n\n const data = encodeFunctionData({\n abi: symmioAbi,\n functionName: \"forceCancelQuote\",\n args: [quoteId],\n });\n\n return callAsSubAccount(config, {\n account,\n data,\n chainId,\n from: parameters.from,\n simulateBeforeWrite: parameters.simulateBeforeWrite,\n gasless: parameters.gasless,\n });\n}\n"],"mappings":";;;;AA+CA,eAAsB,EACpB,GACA,GACqC;CACrC,IAAM,EAAE,YAAS,YAAS,eAAY;CAQtC,OAAO,EAAiB,GAAQ;EAC9B;EACA,MARW,EAAmB;GAC9B,KAAK;GACL,cAAc;GACd,MAAM,CAAC,CAAO;EAChB,CAIE;EACA;EACA,MAAM,EAAW;EACjB,qBAAqB,EAAW;EAChC,SAAS,EAAW;CACtB,CAAC;AACH"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { Address } from 'viem';
|
|
2
|
+
import { Config } from '../../../core/config/index.js';
|
|
3
|
+
import { ChainIdParameter, Compute } from '../../../shared/types/properties.js';
|
|
4
|
+
/**
|
|
5
|
+
* Parameters for {@link getOperationalFeeAllowance}.
|
|
6
|
+
*/
|
|
7
|
+
export type GetOperationalFeeAllowanceParameters = Compute<ChainIdParameter & {
|
|
8
|
+
/**
|
|
9
|
+
* The fee payer — the account whose Core balance the charger draws from.
|
|
10
|
+
* Read it for the account a fee quote names as `GaslessFeePayment.payer`: a
|
|
11
|
+
* virtual account's operations normally bill its parent sub-account.
|
|
12
|
+
*/
|
|
13
|
+
payer: Address;
|
|
14
|
+
/**
|
|
15
|
+
* The registered fee charger: the GaslessLayer **proxy**, not the relayer's
|
|
16
|
+
* executor address. Defaults to the chain's `gasless.gaslessLayerAddress`
|
|
17
|
+
* when the chain has a gasless block.
|
|
18
|
+
*/
|
|
19
|
+
charger?: Address;
|
|
20
|
+
}>;
|
|
21
|
+
/**
|
|
22
|
+
* Return type of {@link getOperationalFeeAllowance}. The amounts are
|
|
23
|
+
* **18-decimal Core units** — the scale of the Core balance the fee is drawn
|
|
24
|
+
* from, not the collateral token's decimals.
|
|
25
|
+
*/
|
|
26
|
+
export interface GetOperationalFeeAllowanceReturnType {
|
|
27
|
+
/**
|
|
28
|
+
* What the charger may still draw from the payer, in 18-decimal Core units.
|
|
29
|
+
* Every charge decrements it — `maxUint256` included, so there is no
|
|
30
|
+
* "unlimited" value. Compare it with 18-decimal fees, such as the fee-quote
|
|
31
|
+
* payments that name this payer, or convert a token amount with
|
|
32
|
+
* `collateralToCore18` first.
|
|
33
|
+
*/
|
|
34
|
+
allowance: bigint;
|
|
35
|
+
/**
|
|
36
|
+
* The allowance a scheduled reduction will lower to, in 18-decimal Core
|
|
37
|
+
* units. Only meaningful while `reductionReadyAt` is non-zero: until then the
|
|
38
|
+
* current `allowance` keeps applying, and charges keep consuming it. When the
|
|
39
|
+
* reduction takes effect the allowance becomes the lower of the two.
|
|
40
|
+
*/
|
|
41
|
+
pendingAllowance: bigint;
|
|
42
|
+
/**
|
|
43
|
+
* Unix timestamp (seconds) when the scheduled reduction takes effect. `0n`
|
|
44
|
+
* when none is pending — including once its time has passed, because the view
|
|
45
|
+
* then already reports the reduced `allowance`.
|
|
46
|
+
*/
|
|
47
|
+
reductionReadyAt: bigint;
|
|
48
|
+
/**
|
|
49
|
+
* Fee multiplier for this `(payer, charger)` pair in basis points. The
|
|
50
|
+
* GaslessLayer scales this payer's selector fees by `feeMultiplier / 10000`:
|
|
51
|
+
* `10000n` is list price (reported when unset), below is a discount, above a
|
|
52
|
+
* surcharge. It does not scale a wallet creation fee.
|
|
53
|
+
*/
|
|
54
|
+
feeMultiplier: bigint;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Read a payer's operational-fee allowance for a charger from the SYMMIO core
|
|
58
|
+
* diamond.
|
|
59
|
+
*
|
|
60
|
+
* The allowance caps what the GaslessLayer may charge the payer for relayed
|
|
61
|
+
* operations. The fee is collected after the relayed batch executes, in the same
|
|
62
|
+
* transaction, from the payer's Core balance (free balance first, then
|
|
63
|
+
* allocated). The allowance only permits that charge — it adds no balance, so a
|
|
64
|
+
* payer with allowance but too little Core balance still fails with
|
|
65
|
+
* `OperationalFee: Insufficient balance`. A never-approved pair reads `0n`.
|
|
66
|
+
*
|
|
67
|
+
* Every amount is in **18-decimal Core units**. Read the allowance back after
|
|
68
|
+
* approving and before submitting a relay.
|
|
69
|
+
*
|
|
70
|
+
* @param config - The SDK config.
|
|
71
|
+
* @param parameters - Payer, optional charger override and chain id.
|
|
72
|
+
* @returns The allowance tuple, in 18-decimal Core units.
|
|
73
|
+
* @throws {SymmError} `GASLESS_CHARGER_REQUIRED` when no `charger` is given and
|
|
74
|
+
* the chain has no gasless block to default from.
|
|
75
|
+
* @throws Viem read errors.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```ts
|
|
79
|
+
* const { allowance } = await getOperationalFeeAllowance(config, { payer: subAccount });
|
|
80
|
+
* // Both 18-decimal Core units. The payer's Core balance must cover the fee too.
|
|
81
|
+
* const allowanceCoversFee = allowance >= fee18;
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
export declare function getOperationalFeeAllowance(config: Config, parameters: GetOperationalFeeAllowanceParameters): Promise<GetOperationalFeeAllowanceReturnType>;
|
|
85
|
+
//# sourceMappingURL=get-operational-fee-allowance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-operational-fee-allowance.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/symmio/actions/get-operational-fee-allowance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAGnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAGlF;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG,OAAO,CACxD,gBAAgB,GAAG;IACjB;;;;OAIG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CACF,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,oCAAoC;IACnD;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;OAKG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB;;;;;OAKG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,oCAAoC,GAC/C,OAAO,CAAC,oCAAoC,CAAC,CAe/C"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { symmioAbi as e } from "../../abi/v0.8.6/symmio.js";
|
|
2
|
+
import { SymmError as t } from "../../../shared/errors/symm-error.js";
|
|
3
|
+
import { resolveGaslessService as n } from "../../../gasless/resolve-gasless.js";
|
|
4
|
+
//#region src/symmio-contracts/symmio/actions/get-operational-fee-allowance.ts
|
|
5
|
+
async function r(t, n) {
|
|
6
|
+
let { chainId: r, payer: a } = n, { addresses: o } = t.getChainConfig(r), s = t.getClient({ chainId: r }), c = n.charger ?? i(t, r), [l, u, d, f] = await s.readContract({
|
|
7
|
+
address: o.symmioAddress,
|
|
8
|
+
abi: e,
|
|
9
|
+
functionName: "getOperationalFeeAllowance",
|
|
10
|
+
args: [a, c]
|
|
11
|
+
});
|
|
12
|
+
return {
|
|
13
|
+
allowance: l,
|
|
14
|
+
pendingAllowance: u,
|
|
15
|
+
reductionReadyAt: d,
|
|
16
|
+
feeMultiplier: f
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function i(e, r) {
|
|
20
|
+
try {
|
|
21
|
+
return n(e, { chainId: r }).gaslessLayerAddress;
|
|
22
|
+
} catch {
|
|
23
|
+
throw new t("validation", "GASLESS_CHARGER_REQUIRED", "getOperationalFeeAllowance: pass `charger` explicitly — the chain has no gasless block to default it from.");
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { r as getOperationalFeeAllowance };
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=get-operational-fee-allowance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-operational-fee-allowance.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/get-operational-fee-allowance.ts"],"sourcesContent":["import type { Address } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport { resolveGaslessService } from \"../../../gasless/resolve-gasless\";\nimport { SymmError } from \"../../../shared/errors/symm-error\";\nimport type { ChainIdParameter, Compute } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.6/symmio\";\n\n/**\n * Parameters for {@link getOperationalFeeAllowance}.\n */\nexport type GetOperationalFeeAllowanceParameters = Compute<\n ChainIdParameter & {\n /**\n * The fee payer — the account whose Core balance the charger draws from.\n * Read it for the account a fee quote names as `GaslessFeePayment.payer`: a\n * virtual account's operations normally bill its parent sub-account.\n */\n payer: Address;\n /**\n * The registered fee charger: the GaslessLayer **proxy**, not the relayer's\n * executor address. Defaults to the chain's `gasless.gaslessLayerAddress`\n * when the chain has a gasless block.\n */\n charger?: Address;\n }\n>;\n\n/**\n * Return type of {@link getOperationalFeeAllowance}. The amounts are\n * **18-decimal Core units** — the scale of the Core balance the fee is drawn\n * from, not the collateral token's decimals.\n */\nexport interface GetOperationalFeeAllowanceReturnType {\n /**\n * What the charger may still draw from the payer, in 18-decimal Core units.\n * Every charge decrements it — `maxUint256` included, so there is no\n * \"unlimited\" value. Compare it with 18-decimal fees, such as the fee-quote\n * payments that name this payer, or convert a token amount with\n * `collateralToCore18` first.\n */\n allowance: bigint;\n /**\n * The allowance a scheduled reduction will lower to, in 18-decimal Core\n * units. Only meaningful while `reductionReadyAt` is non-zero: until then the\n * current `allowance` keeps applying, and charges keep consuming it. When the\n * reduction takes effect the allowance becomes the lower of the two.\n */\n pendingAllowance: bigint;\n /**\n * Unix timestamp (seconds) when the scheduled reduction takes effect. `0n`\n * when none is pending — including once its time has passed, because the view\n * then already reports the reduced `allowance`.\n */\n reductionReadyAt: bigint;\n /**\n * Fee multiplier for this `(payer, charger)` pair in basis points. The\n * GaslessLayer scales this payer's selector fees by `feeMultiplier / 10000`:\n * `10000n` is list price (reported when unset), below is a discount, above a\n * surcharge. It does not scale a wallet creation fee.\n */\n feeMultiplier: bigint;\n}\n\n/**\n * Read a payer's operational-fee allowance for a charger from the SYMMIO core\n * diamond.\n *\n * The allowance caps what the GaslessLayer may charge the payer for relayed\n * operations. The fee is collected after the relayed batch executes, in the same\n * transaction, from the payer's Core balance (free balance first, then\n * allocated). The allowance only permits that charge — it adds no balance, so a\n * payer with allowance but too little Core balance still fails with\n * `OperationalFee: Insufficient balance`. A never-approved pair reads `0n`.\n *\n * Every amount is in **18-decimal Core units**. Read the allowance back after\n * approving and before submitting a relay.\n *\n * @param config - The SDK config.\n * @param parameters - Payer, optional charger override and chain id.\n * @returns The allowance tuple, in 18-decimal Core units.\n * @throws {SymmError} `GASLESS_CHARGER_REQUIRED` when no `charger` is given and\n * the chain has no gasless block to default from.\n * @throws Viem read errors.\n *\n * @example\n * ```ts\n * const { allowance } = await getOperationalFeeAllowance(config, { payer: subAccount });\n * // Both 18-decimal Core units. The payer's Core balance must cover the fee too.\n * const allowanceCoversFee = allowance >= fee18;\n * ```\n */\nexport async function getOperationalFeeAllowance(\n config: Config,\n parameters: GetOperationalFeeAllowanceParameters,\n): Promise<GetOperationalFeeAllowanceReturnType> {\n const { chainId, payer } = parameters;\n\n const { addresses } = config.getChainConfig(chainId);\n const client = config.getClient({ chainId });\n const charger = parameters.charger ?? resolveDefaultCharger(config, chainId);\n\n const [allowance, pendingAllowance, reductionReadyAt, feeMultiplier] = await client.readContract({\n address: addresses.symmioAddress,\n abi: symmioAbi,\n functionName: \"getOperationalFeeAllowance\",\n args: [payer, charger],\n });\n\n return { allowance, pendingAllowance, reductionReadyAt, feeMultiplier };\n}\n\nfunction resolveDefaultCharger(config: Config, chainId: number | undefined): Address {\n try {\n return resolveGaslessService(config, { chainId }).gaslessLayerAddress;\n } catch {\n throw new SymmError(\n \"validation\",\n \"GASLESS_CHARGER_REQUIRED\",\n \"getOperationalFeeAllowance: pass `charger` explicitly — the chain has no gasless block to default it from.\",\n );\n }\n}\n"],"mappings":";;;;AA2FA,eAAsB,EACpB,GACA,GAC+C;CAC/C,IAAM,EAAE,YAAS,aAAU,GAErB,EAAE,iBAAc,EAAO,eAAe,CAAO,GAC7C,IAAS,EAAO,UAAU,EAAE,WAAQ,CAAC,GACrC,IAAU,EAAW,WAAW,EAAsB,GAAQ,CAAO,GAErE,CAAC,GAAW,GAAkB,GAAkB,KAAiB,MAAM,EAAO,aAAa;EAC/F,SAAS,EAAU;EACnB,KAAK;EACL,cAAc;EACd,MAAM,CAAC,GAAO,CAAO;CACvB,CAAC;CAED,OAAO;EAAE;EAAW;EAAkB;EAAkB;CAAc;AACxE;AAEA,SAAS,EAAsB,GAAgB,GAAsC;CACnF,IAAI;EACF,OAAO,EAAsB,GAAQ,EAAE,WAAQ,CAAC,EAAE;CACpD,QAAQ;EACN,MAAM,IAAI,EACR,cACA,4BACA,4GACF;CACF;AACF"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Address, Hash, Hex } from 'viem';
|
|
2
2
|
import { Config } from '../../../core/config/index.js';
|
|
3
|
-
import { Compute, WriteContractParameter } from '../../../shared/types/properties.js';
|
|
3
|
+
import { Compute, GaslessWriteParameter, WriteContractParameter } from '../../../shared/types/properties.js';
|
|
4
4
|
import { WithdrawReceiverPart } from '../types.js';
|
|
5
5
|
/**
|
|
6
6
|
* Parameters for {@link initiateWithdraw}.
|
|
7
7
|
*/
|
|
8
|
-
export type InitiateWithdrawParameters = Compute<WriteContractParameter & {
|
|
8
|
+
export type InitiateWithdrawParameters = Compute<WriteContractParameter & GaslessWriteParameter & {
|
|
9
9
|
/**
|
|
10
10
|
* The subaccount initiating the withdrawal. The call is routed through the
|
|
11
11
|
* AccountLayer `_call` proxy so the core sees this subaccount as the caller;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initiate-withdraw.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/symmio/actions/initiate-withdraw.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,GAAG,EAAE,MAAM,MAAM,CAAC;AAC7E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"initiate-withdraw.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/symmio/actions/initiate-withdraw.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,GAAG,EAAE,MAAM,MAAM,CAAC;AAC7E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAG/G,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,OAAO,CAC9C,sBAAsB,GACpB,qBAAqB,GAAG;IACtB;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,KAAK,EAAE,SAAS,oBAAoB,EAAE,CAAC;IACvC;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,YAAY,CAAC,EAAE,GAAG,CAAC;CACpB,CACJ,CAAC;AAEF,+EAA+E;AAC/E,MAAM,MAAM,0BAA0B,GAAG,IAAI,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,0BAA0B,GACrC,OAAO,CAAC,0BAA0B,CAAC,CAiBrC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initiate-withdraw.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/initiate-withdraw.ts"],"sourcesContent":["import { encodeFunctionData, type Address, type Hash, type Hex } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { Compute, WriteContractParameter } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.6/symmio\";\nimport { callAsSubAccount } from \"../internal/call-as-sub-account\";\nimport type { WithdrawReceiverPart } from \"../types\";\n\n/**\n * Parameters for {@link initiateWithdraw}.\n */\nexport type InitiateWithdrawParameters = Compute<\n WriteContractParameter & {\n
|
|
1
|
+
{"version":3,"file":"initiate-withdraw.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/initiate-withdraw.ts"],"sourcesContent":["import { encodeFunctionData, type Address, type Hash, type Hex } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { Compute, GaslessWriteParameter, WriteContractParameter } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.6/symmio\";\nimport { callAsSubAccount } from \"../internal/call-as-sub-account\";\nimport type { WithdrawReceiverPart } from \"../types\";\n\n/**\n * Parameters for {@link initiateWithdraw}.\n */\nexport type InitiateWithdrawParameters = Compute<\n WriteContractParameter &\n GaslessWriteParameter & {\n /**\n * The subaccount initiating the withdrawal. The call is routed through the\n * AccountLayer `_call` proxy so the core sees this subaccount as the caller;\n * the connected wallet must be its on-chain `owner`.\n */\n account: Address;\n /**\n * The receiver parts the withdrawal is split into. A plain same-chain\n * withdrawal is a single part with both provider fields set to the zero\n * address — see `createClassicWithdrawPart`.\n */\n parts: readonly WithdrawReceiverPart[];\n /**\n * Opt into the cooldown speed-up flow. Only effective for speed-up-eligible\n * users; ignored otherwise.\n * @default false\n */\n speedUp?: boolean;\n /**\n * Opaque provider data forwarded to express/virtual providers (e.g. a signed\n * option). Pass `0x` for a classic withdrawal.\n * @default \"0x\"\n */\n providerData?: Hex;\n }\n>;\n\n/** Return type of {@link initiateWithdraw}: the submitted transaction hash. */\nexport type InitiateWithdrawReturnType = Hash;\n\n/**\n * Open a withdraw request for a subaccount.\n *\n * Encodes the SYMMIO core `initiateWithdraw(parts, speedUp, data)` call and routes\n * it through `AccountLayer._call(account, …)` so the core attributes the request\n * to `account`. The request matures after the cooldown (tied to the subaccount's\n * last deallocation) and is then completed with {@link finalizeWithdrawRequest}.\n *\n * Dry-runs the call with {@link simulateInitiateWithdraw} first unless\n * `simulateBeforeWrite` is `false` (per-call, falling back to the config default).\n *\n * @remarks\n * The full input surface is exposed: provider fields on each part plus `speedUp`\n * and `providerData` enable express/virtual/cross-chain withdrawals where\n * providers are available. For a standard same-chain withdrawal, pass a single\n * classic part and leave `speedUp`/`providerData` at their defaults.\n *\n * @param config - The SDK config (must have a `getWalletClient` resolver).\n * @param parameters - Subaccount, receiver parts, optional speed-up / provider data, optional chain id.\n * @returns The submitted transaction hash. The caller waits on the receipt; the\n * created `requestId` is available from the receipt's events or via\n * `getLastWithdrawRequestId`.\n * @throws {SymmError} when the chain is unsupported or no wallet is available.\n * @throws Viem's write errors (`ContractFunctionExecutionError`, ...).\n *\n * @example\n * ```ts\n * const part = createClassicWithdrawPart({ id: 0n, amount: 1_000000n, receiver: \"0xabc…\", chainId: 42161n });\n * const hash = await initiateWithdraw(config, { account: \"0xsub…\", parts: [part] });\n * ```\n */\nexport async function initiateWithdraw(\n config: Config,\n parameters: InitiateWithdrawParameters,\n): Promise<InitiateWithdrawReturnType> {\n const { chainId, account, parts, speedUp = false, providerData = \"0x\" } = parameters;\n\n const data = encodeFunctionData({\n abi: symmioAbi,\n functionName: \"initiateWithdraw\",\n args: [parts, speedUp, providerData],\n });\n\n return callAsSubAccount(config, {\n account,\n data,\n chainId,\n from: parameters.from,\n simulateBeforeWrite: parameters.simulateBeforeWrite,\n gasless: parameters.gasless,\n });\n}\n"],"mappings":";;;;AA0EA,eAAsB,EACpB,GACA,GACqC;CACrC,IAAM,EAAE,YAAS,YAAS,UAAO,aAAU,IAAO,kBAAe,SAAS;CAQ1E,OAAO,EAAiB,GAAQ;EAC9B;EACA,MARW,EAAmB;GAC9B,KAAK;GACL,cAAc;GACd,MAAM;IAAC;IAAO;IAAS;GAAY;EACrC,CAIE;EACA;EACA,MAAM,EAAW;EACjB,qBAAqB,EAAW;EAChC,SAAS,EAAW;CACtB,CAAC;AACH"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Address, Hash } from 'viem';
|
|
2
2
|
import { Config } from '../../../core/config/index.js';
|
|
3
|
-
import { Compute, WriteContractParameter } from '../../../shared/types/properties.js';
|
|
3
|
+
import { Compute, GaslessWriteParameter, WriteContractParameter } from '../../../shared/types/properties.js';
|
|
4
4
|
/**
|
|
5
5
|
* Parameters for {@link requestCancelWithdraw}.
|
|
6
6
|
*/
|
|
7
|
-
export type RequestCancelWithdrawParameters = Compute<WriteContractParameter & {
|
|
7
|
+
export type RequestCancelWithdrawParameters = Compute<WriteContractParameter & GaslessWriteParameter & {
|
|
8
8
|
/**
|
|
9
9
|
* The subaccount that owns the request. The call is routed through the
|
|
10
10
|
* AccountLayer `_call` proxy; the connected wallet must be its on-chain `owner`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-cancel-withdraw.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/symmio/actions/request-cancel-withdraw.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,MAAM,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"request-cancel-withdraw.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/symmio/actions/request-cancel-withdraw.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,MAAM,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAI/G;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,OAAO,CACnD,sBAAsB,GACpB,qBAAqB,GAAG;IACtB;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB,4CAA4C;IAC5C,SAAS,EAAE,MAAM,CAAC;CACnB,CACJ,CAAC;AAEF,oFAAoF;AACpF,MAAM,MAAM,+BAA+B,GAAG,IAAI,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,+BAA+B,GAC1C,OAAO,CAAC,+BAA+B,CAAC,CAiB1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-cancel-withdraw.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/request-cancel-withdraw.ts"],"sourcesContent":["import { encodeFunctionData, type Address, type Hash } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { Compute, WriteContractParameter } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.6/symmio\";\nimport { callAsSubAccount } from \"../internal/call-as-sub-account\";\n\n/**\n * Parameters for {@link requestCancelWithdraw}.\n */\nexport type RequestCancelWithdrawParameters = Compute<\n WriteContractParameter & {\n
|
|
1
|
+
{"version":3,"file":"request-cancel-withdraw.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/request-cancel-withdraw.ts"],"sourcesContent":["import { encodeFunctionData, type Address, type Hash } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { Compute, GaslessWriteParameter, WriteContractParameter } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.6/symmio\";\nimport { callAsSubAccount } from \"../internal/call-as-sub-account\";\n\n/**\n * Parameters for {@link requestCancelWithdraw}.\n */\nexport type RequestCancelWithdrawParameters = Compute<\n WriteContractParameter &\n GaslessWriteParameter & {\n /**\n * The subaccount that owns the request. The call is routed through the\n * AccountLayer `_call` proxy; the connected wallet must be its on-chain `owner`.\n */\n account: Address;\n /** Id of the withdraw request to cancel. */\n requestId: bigint;\n }\n>;\n\n/** Return type of {@link requestCancelWithdraw}: the submitted transaction hash. */\nexport type RequestCancelWithdrawReturnType = Hash;\n\n/**\n * Request cancellation of a pending withdraw request.\n *\n * Encodes the SYMMIO core `requestCancelWithdraw(requestId)` call and routes it\n * through `AccountLayer._call(account, …)` so the core attributes it to the\n * subaccount. For a classic (provider-free) request outside any blackout this\n * cancels immediately and returns the locked balance; for provider-backed\n * requests it may transition to `CANCEL_REQUESTED` pending provider approval.\n *\n * Dry-runs the call with {@link simulateRequestCancelWithdraw} first unless\n * `simulateBeforeWrite` is `false` (per-call, falling back to the config default).\n *\n * @param config - The SDK config (must have a `getWalletClient` resolver).\n * @param parameters - Subaccount, request id, optional chain id.\n * @returns The submitted transaction hash. The caller waits on the receipt.\n * @throws {SymmError} when the chain is unsupported or no wallet is available.\n * @throws Viem's write errors (`ContractFunctionExecutionError`, ...).\n *\n * @example\n * ```ts\n * const hash = await requestCancelWithdraw(config, { account: \"0xsub…\", requestId: 1n });\n * ```\n */\nexport async function requestCancelWithdraw(\n config: Config,\n parameters: RequestCancelWithdrawParameters,\n): Promise<RequestCancelWithdrawReturnType> {\n const { chainId, account, requestId } = parameters;\n\n const data = encodeFunctionData({\n abi: symmioAbi,\n functionName: \"requestCancelWithdraw\",\n args: [requestId],\n });\n\n return callAsSubAccount(config, {\n account,\n data,\n chainId,\n from: parameters.from,\n simulateBeforeWrite: parameters.simulateBeforeWrite,\n gasless: parameters.gasless,\n });\n}\n"],"mappings":";;;;AAgDA,eAAsB,EACpB,GACA,GAC0C;CAC1C,IAAM,EAAE,YAAS,YAAS,iBAAc;CAQxC,OAAO,EAAiB,GAAQ;EAC9B;EACA,MARW,EAAmB;GAC9B,KAAK;GACL,cAAc;GACd,MAAM,CAAC,CAAS;EAClB,CAIE;EACA;EACA,MAAM,EAAW;EACjB,qBAAqB,EAAW;EAChC,SAAS,EAAW;CACtB,CAAC;AACH"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Address, Hash } from 'viem';
|
|
2
2
|
import { Config } from '../../../core/config/index.js';
|
|
3
|
-
import { Compute, WriteContractParameter } from '../../../shared/types/properties.js';
|
|
3
|
+
import { Compute, GaslessWriteParameter, WriteContractParameter } from '../../../shared/types/properties.js';
|
|
4
4
|
/**
|
|
5
5
|
* Parameters for {@link requestToCancelCloseRequest}.
|
|
6
6
|
*/
|
|
7
|
-
export type RequestToCancelCloseRequestParameters = Compute<WriteContractParameter & {
|
|
7
|
+
export type RequestToCancelCloseRequestParameters = Compute<WriteContractParameter & GaslessWriteParameter & {
|
|
8
8
|
/**
|
|
9
9
|
* The subaccount (partyA) that owns the quote. The call is routed through the
|
|
10
10
|
* AccountLayer `_call` proxy so the core sees this subaccount as the caller;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-to-cancel-close-request.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/symmio/actions/request-to-cancel-close-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,MAAM,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"request-to-cancel-close-request.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/symmio/actions/request-to-cancel-close-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,MAAM,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAI/G;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAAG,OAAO,CACzD,sBAAsB,GACpB,qBAAqB,GAAG;IACtB;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB,kEAAkE;IAClE,OAAO,EAAE,MAAM,CAAC;CACjB,CACJ,CAAC;AAEF,0FAA0F;AAC1F,MAAM,MAAM,qCAAqC,GAAG,IAAI,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,2BAA2B,CAC/C,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,qCAAqC,GAChD,OAAO,CAAC,qCAAqC,CAAC,CAiBhD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-to-cancel-close-request.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/request-to-cancel-close-request.ts"],"sourcesContent":["import { encodeFunctionData, type Address, type Hash } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { Compute, WriteContractParameter } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.6/symmio\";\nimport { callAsSubAccount } from \"../internal/call-as-sub-account\";\n\n/**\n * Parameters for {@link requestToCancelCloseRequest}.\n */\nexport type RequestToCancelCloseRequestParameters = Compute<\n WriteContractParameter & {\n
|
|
1
|
+
{"version":3,"file":"request-to-cancel-close-request.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/request-to-cancel-close-request.ts"],"sourcesContent":["import { encodeFunctionData, type Address, type Hash } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { Compute, GaslessWriteParameter, WriteContractParameter } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.6/symmio\";\nimport { callAsSubAccount } from \"../internal/call-as-sub-account\";\n\n/**\n * Parameters for {@link requestToCancelCloseRequest}.\n */\nexport type RequestToCancelCloseRequestParameters = Compute<\n WriteContractParameter &\n GaslessWriteParameter & {\n /**\n * The subaccount (partyA) that owns the quote. The call is routed through the\n * AccountLayer `_call` proxy so the core sees this subaccount as the caller;\n * the connected wallet must be its on-chain `owner`.\n */\n account: Address;\n /** The `CLOSE_PENDING` quote id whose close request to cancel. */\n quoteId: bigint;\n }\n>;\n\n/** Return type of {@link requestToCancelCloseRequest}: the submitted transaction hash. */\nexport type RequestToCancelCloseRequestReturnType = Hash;\n\n/**\n * Request cancellation of a pending **close** (`requestToCancelCloseRequest`) —\n * the way a partyA backs out of a resting close (e.g. a limit close) while the\n * quote is `CLOSE_PENDING`.\n *\n * The core `requestToCancelCloseRequest(quoteId)` must be attributed to the\n * sub-account, so it is encoded and routed through `AccountLayer._call(account, …)`;\n * the connected wallet must be the sub-account's `owner`. If partyB accepts, the\n * quote returns to `OPENED`; if partyB stalls, it enters `CANCEL_CLOSE_PENDING`\n * until the force-cancel-close cooldown elapses (see `forceCancelCloseRequest`).\n *\n * @param config - The SDK config (must have a `getWalletClient` resolver).\n * @param parameters - The owning subaccount, the quote id, optional `from` / pre-flight / chain id.\n * @returns The submitted transaction hash.\n * @throws {SymmError} when the chain is unsupported or no wallet client is available.\n *\n * @example\n * ```ts\n * const hash = await requestToCancelCloseRequest(config, { account: \"0xsub…\", quoteId: 42n });\n * ```\n */\nexport async function requestToCancelCloseRequest(\n config: Config,\n parameters: RequestToCancelCloseRequestParameters,\n): Promise<RequestToCancelCloseRequestReturnType> {\n const { chainId, account, quoteId } = parameters;\n\n const data = encodeFunctionData({\n abi: symmioAbi,\n functionName: \"requestToCancelCloseRequest\",\n args: [quoteId],\n });\n\n return callAsSubAccount(config, {\n account,\n data,\n chainId,\n from: parameters.from,\n simulateBeforeWrite: parameters.simulateBeforeWrite,\n gasless: parameters.gasless,\n });\n}\n"],"mappings":";;;;AA+CA,eAAsB,EACpB,GACA,GACgD;CAChD,IAAM,EAAE,YAAS,YAAS,eAAY;CAQtC,OAAO,EAAiB,GAAQ;EAC9B;EACA,MARW,EAAmB;GAC9B,KAAK;GACL,cAAc;GACd,MAAM,CAAC,CAAO;EAChB,CAIE;EACA;EACA,MAAM,EAAW;EACjB,qBAAqB,EAAW;EAChC,SAAS,EAAW;CACtB,CAAC;AACH"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Address, Hash } from 'viem';
|
|
2
2
|
import { Config } from '../../../core/config/index.js';
|
|
3
|
-
import { Compute, WriteContractParameter } from '../../../shared/types/properties.js';
|
|
3
|
+
import { Compute, GaslessWriteParameter, WriteContractParameter } from '../../../shared/types/properties.js';
|
|
4
4
|
/**
|
|
5
5
|
* Parameters for {@link requestToCancelQuote}.
|
|
6
6
|
*/
|
|
7
|
-
export type RequestToCancelQuoteParameters = Compute<WriteContractParameter & {
|
|
7
|
+
export type RequestToCancelQuoteParameters = Compute<WriteContractParameter & GaslessWriteParameter & {
|
|
8
8
|
/**
|
|
9
9
|
* The subaccount (partyA) that owns the quote. The call is routed through the
|
|
10
10
|
* AccountLayer `_call` proxy so the core sees this subaccount as the caller;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-to-cancel-quote.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/symmio/actions/request-to-cancel-quote.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,MAAM,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"request-to-cancel-quote.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/symmio/actions/request-to-cancel-quote.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,MAAM,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAI/G;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,OAAO,CAClD,sBAAsB,GACpB,qBAAqB,GAAG;IACtB;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB,mEAAmE;IACnE,OAAO,EAAE,MAAM,CAAC;CACjB,CACJ,CAAC;AAEF,mFAAmF;AACnF,MAAM,MAAM,8BAA8B,GAAG,IAAI,CAAC;AAElD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,8BAA8B,GACzC,OAAO,CAAC,8BAA8B,CAAC,CAiBzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-to-cancel-quote.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/request-to-cancel-quote.ts"],"sourcesContent":["import { encodeFunctionData, type Address, type Hash } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { Compute, WriteContractParameter } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.6/symmio\";\nimport { callAsSubAccount } from \"../internal/call-as-sub-account\";\n\n/**\n * Parameters for {@link requestToCancelQuote}.\n */\nexport type RequestToCancelQuoteParameters = Compute<\n WriteContractParameter & {\n
|
|
1
|
+
{"version":3,"file":"request-to-cancel-quote.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/request-to-cancel-quote.ts"],"sourcesContent":["import { encodeFunctionData, type Address, type Hash } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { Compute, GaslessWriteParameter, WriteContractParameter } from \"../../../shared/types/properties\";\nimport { symmioAbi } from \"../../abi/v0.8.6/symmio\";\nimport { callAsSubAccount } from \"../internal/call-as-sub-account\";\n\n/**\n * Parameters for {@link requestToCancelQuote}.\n */\nexport type RequestToCancelQuoteParameters = Compute<\n WriteContractParameter &\n GaslessWriteParameter & {\n /**\n * The subaccount (partyA) that owns the quote. The call is routed through the\n * AccountLayer `_call` proxy so the core sees this subaccount as the caller;\n * the connected wallet must be its on-chain `owner`.\n */\n account: Address;\n /** The pending quote id to cancel — e.g. a resting LIMIT order. */\n quoteId: bigint;\n }\n>;\n\n/** Return type of {@link requestToCancelQuote}: the submitted transaction hash. */\nexport type RequestToCancelQuoteReturnType = Hash;\n\n/**\n * Request cancellation of a pending quote (`requestToCancelQuote`) — the way a\n * partyA cancels a resting **LIMIT order** (or any not-yet-opened quote).\n *\n * The core `requestToCancelQuote(quoteId)` must be attributed to the sub-account,\n * so it is encoded and routed through `AccountLayer._call(account, …)`; the\n * connected wallet must be the sub-account's `owner`. A `PENDING` quote cancels\n * immediately; a `LOCKED` one enters `CANCEL_PENDING` until partyB acknowledges.\n *\n * @param config - The SDK config (must have a `getWalletClient` resolver).\n * @param parameters - The owning subaccount, the quote id, optional `from` / pre-flight / chain id.\n * @returns The submitted transaction hash.\n * @throws {SymmError} when the chain is unsupported or no wallet client is available.\n *\n * @example\n * ```ts\n * const hash = await requestToCancelQuote(config, { account: \"0xsub…\", quoteId: 42n });\n * ```\n */\nexport async function requestToCancelQuote(\n config: Config,\n parameters: RequestToCancelQuoteParameters,\n): Promise<RequestToCancelQuoteReturnType> {\n const { chainId, account, quoteId } = parameters;\n\n const data = encodeFunctionData({\n abi: symmioAbi,\n functionName: \"requestToCancelQuote\",\n args: [quoteId],\n });\n\n return callAsSubAccount(config, {\n account,\n data,\n chainId,\n from: parameters.from,\n simulateBeforeWrite: parameters.simulateBeforeWrite,\n gasless: parameters.gasless,\n });\n}\n"],"mappings":";;;;AA6CA,eAAsB,EACpB,GACA,GACyC;CACzC,IAAM,EAAE,YAAS,YAAS,eAAY;CAQtC,OAAO,EAAiB,GAAQ;EAC9B;EACA,MARW,EAAmB;GAC9B,KAAK;GACL,cAAc;GACd,MAAM,CAAC,CAAO;EAChB,CAIE;EACA;EACA,MAAM,EAAW;EACjB,qBAAqB,EAAW;EAChC,SAAS,EAAW;CACtB,CAAC;AACH"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Address, Hash, Hex } from 'viem';
|
|
2
2
|
import { Config } from '../../../core/config/index.js';
|
|
3
|
-
import { Compute, WriteContractParameter } from '../../../shared/types/properties.js';
|
|
3
|
+
import { Compute, GaslessWriteParameter, WriteContractParameter } from '../../../shared/types/properties.js';
|
|
4
4
|
import { SingleUpnlSig, SubAccountIsolationType } from '../../account-layer/types.js';
|
|
5
5
|
/**
|
|
6
6
|
* Parameters for {@link withdrawAuto}.
|
|
7
7
|
*/
|
|
8
|
-
export type WithdrawAutoParameters = Compute<WriteContractParameter & {
|
|
8
|
+
export type WithdrawAutoParameters = Compute<WriteContractParameter & GaslessWriteParameter & {
|
|
9
9
|
/**
|
|
10
10
|
* The subaccount to withdraw from. The action routes the call through the
|
|
11
11
|
* AccountLayer `_call` proxy so the core attributes it to this subaccount; the
|
|
@@ -69,17 +69,19 @@ export type WithdrawAutoReturnType = Hash;
|
|
|
69
69
|
* @remarks
|
|
70
70
|
* Account-layer balances are `1e18`-scaled regardless of the collateral token's
|
|
71
71
|
* decimals, so the `CUSTOM` deallocate leg needs the 18-decimal amount; this action
|
|
72
|
-
* derives it
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
72
|
+
* derives it with {@link collateralToCore18} (`amount * 10 ** (18 - collateralDecimals)`).
|
|
73
|
+
* On the `CUSTOM` path it also fetches a fresh Muon `upnlSig` for the deallocate
|
|
74
|
+
* leg unless one is passed. Reach for {@link withdraw} directly when you already
|
|
75
|
+
* hold the subaccount's `isolationType` and want to skip the extra read, or need
|
|
76
|
+
* custom (multi-part / cross-chain) withdraw parts.
|
|
77
77
|
*
|
|
78
78
|
* @param config - The SDK config (must have a `getWalletClient` resolver).
|
|
79
79
|
* @param parameters - Subaccount, `amount` (collateral decimals), `receiver`,
|
|
80
80
|
* optional speed-up / provider data, optional Muon `upnlSig`, optional chain id.
|
|
81
81
|
* @returns The submitted transaction hash. The caller waits on the receipt.
|
|
82
82
|
* @throws {SymmError} when the chain is unsupported or no wallet is available.
|
|
83
|
+
* @throws {SymmError} `COLLATERAL_DECIMALS_UNSUPPORTED` when the chain's
|
|
84
|
+
* `collateralDecimals` is not an integer from 0 to 18.
|
|
83
85
|
* @throws Viem's write errors (`ContractFunctionExecutionError`, ...).
|
|
84
86
|
*
|
|
85
87
|
* @example
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withdraw-auto.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/symmio/actions/withdraw-auto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAC/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"withdraw-auto.d.ts","sourceRoot":"","sources":["../../../../src/symmio-contracts/symmio/actions/withdraw-auto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAC/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAG/G,OAAO,KAAK,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAIxF;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAC1C,sBAAsB,GACpB,qBAAqB,GAAG;IACtB;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;;;OAKG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,uBAAuB,CAAC;CACzC,CACJ,CAAC;AAEF,2EAA2E;AAC3E,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,sBAAsB,GACjC,OAAO,CAAC,sBAAsB,CAAC,CAgCjC"}
|
|
@@ -1,31 +1,33 @@
|
|
|
1
1
|
import { getSubAccount as e } from "../../account-layer/actions/get-sub-account.js";
|
|
2
2
|
import { withdraw as t } from "./withdraw.js";
|
|
3
|
-
import {
|
|
3
|
+
import { collateralToCore18 as n } from "../../../shared/utils/core-units.js";
|
|
4
|
+
import { createClassicWithdrawPart as r } from "../parts.js";
|
|
4
5
|
//#region src/symmio-contracts/symmio/actions/withdraw-auto.ts
|
|
5
|
-
async function
|
|
6
|
-
let
|
|
7
|
-
account:
|
|
8
|
-
chainId:
|
|
9
|
-
})).isolationType, { addresses:
|
|
6
|
+
async function i(i, a) {
|
|
7
|
+
let o = a.chainId ?? i.defaultChainId, s = a.isolationType ?? (await e(i, {
|
|
8
|
+
account: a.account,
|
|
9
|
+
chainId: o
|
|
10
|
+
})).isolationType, { addresses: c } = i.getChainConfig(o), l = r({
|
|
10
11
|
id: 0n,
|
|
11
|
-
amount:
|
|
12
|
-
receiver:
|
|
13
|
-
chainId: BigInt(
|
|
14
|
-
}),
|
|
15
|
-
return t(
|
|
16
|
-
account:
|
|
17
|
-
isolationType:
|
|
18
|
-
parts: [
|
|
19
|
-
amount:
|
|
20
|
-
speedUp:
|
|
21
|
-
providerData:
|
|
22
|
-
upnlSig:
|
|
23
|
-
chainId:
|
|
24
|
-
from:
|
|
25
|
-
simulateBeforeWrite:
|
|
12
|
+
amount: a.amount,
|
|
13
|
+
receiver: a.receiver,
|
|
14
|
+
chainId: BigInt(o)
|
|
15
|
+
}), u = n(a.amount, c.collateralDecimals);
|
|
16
|
+
return t(i, {
|
|
17
|
+
account: a.account,
|
|
18
|
+
isolationType: s,
|
|
19
|
+
parts: [l],
|
|
20
|
+
amount: u,
|
|
21
|
+
speedUp: a.speedUp,
|
|
22
|
+
providerData: a.providerData,
|
|
23
|
+
upnlSig: a.upnlSig,
|
|
24
|
+
chainId: o,
|
|
25
|
+
from: a.from,
|
|
26
|
+
simulateBeforeWrite: a.simulateBeforeWrite,
|
|
27
|
+
gasless: a.gasless
|
|
26
28
|
});
|
|
27
29
|
}
|
|
28
30
|
//#endregion
|
|
29
|
-
export {
|
|
31
|
+
export { i as withdrawAuto };
|
|
30
32
|
|
|
31
33
|
//# sourceMappingURL=withdraw-auto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withdraw-auto.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/withdraw-auto.ts"],"sourcesContent":["import type { Address, Hash, Hex } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { Compute, WriteContractParameter } from \"../../../shared/types/properties\";\nimport { getSubAccount } from \"../../account-layer/actions/get-sub-account\";\nimport type { SingleUpnlSig, SubAccountIsolationType } from \"../../account-layer/types\";\nimport { createClassicWithdrawPart } from \"../parts\";\nimport { withdraw } from \"./withdraw\";\n\n/**\n * Parameters for {@link withdrawAuto}.\n */\nexport type WithdrawAutoParameters = Compute<\n WriteContractParameter & {\n
|
|
1
|
+
{"version":3,"file":"withdraw-auto.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/actions/withdraw-auto.ts"],"sourcesContent":["import type { Address, Hash, Hex } from \"viem\";\nimport type { Config } from \"../../../core/config\";\nimport type { Compute, GaslessWriteParameter, WriteContractParameter } from \"../../../shared/types/properties\";\nimport { collateralToCore18 } from \"../../../shared/utils/core-units\";\nimport { getSubAccount } from \"../../account-layer/actions/get-sub-account\";\nimport type { SingleUpnlSig, SubAccountIsolationType } from \"../../account-layer/types\";\nimport { createClassicWithdrawPart } from \"../parts\";\nimport { withdraw } from \"./withdraw\";\n\n/**\n * Parameters for {@link withdrawAuto}.\n */\nexport type WithdrawAutoParameters = Compute<\n WriteContractParameter &\n GaslessWriteParameter & {\n /**\n * The subaccount to withdraw from. The action routes the call through the\n * AccountLayer `_call` proxy so the core attributes it to this subaccount; the\n * connected wallet must be its on-chain `owner`.\n */\n account: Address;\n /**\n * Amount to withdraw, in the **collateral token's decimals** (e.g. 6 for a\n * USDC-collateralized chain). The action builds the withdraw part from this\n * amount as-is and, on the `CUSTOM` (cross-margin) path, scales it to the\n * 18-decimal amount the `deallocate` leg needs.\n */\n amount: bigint;\n /** Destination EVM address the freed collateral is withdrawn to. */\n receiver: Address;\n /**\n * Opt into the cooldown speed-up flow. Only effective for speed-up-eligible\n * users; ignored otherwise.\n * @default false\n */\n speedUp?: boolean;\n /**\n * Opaque provider data forwarded to express/virtual providers (e.g. a signed\n * option). Pass `0x` for a classic withdrawal.\n * @default \"0x\"\n */\n providerData?: Hex;\n /**\n * A fresh Muon uPnL (`uPnl_A`) attestation for `account`, used only by the\n * `CUSTOM` (deallocate) path. Omit it to have the action fetch a fresh one;\n * pass one only to reuse a signature you already fetched. Ignored on the\n * `MARKET` / `MARKET_DIRECTION` path.\n */\n upnlSig?: SingleUpnlSig;\n /**\n * The subaccount's isolation type. Pass it to **skip the `getSubAccount` read**\n * — the React layer already holds it (cached via `useSubAccount`), so passing it\n * avoids a redundant RPC. Omit it and the action fetches the subaccount to\n * resolve it.\n */\n isolationType?: SubAccountIsolationType;\n }\n>;\n\n/** Return type of {@link withdrawAuto}: the submitted transaction hash. */\nexport type WithdrawAutoReturnType = Hash;\n\n/**\n * Withdraw from a subaccount from a **minimal, collateral-decimals input** — the\n * high-level entry point that does all the plumbing so callers pass only\n * `{ account, amount, receiver }` and never touch isolation, parts, or scaling.\n *\n * The action resolves the subaccount's {@link SubAccountIsolationType} — from the\n * passed `isolationType`, or by reading the subaccount when it is omitted — builds\n * the classic same-chain withdraw part from `amount` (in the collateral token's\n * decimals), scales that amount to 18 decimals for the deallocate leg, and hands\n * off to {@link withdraw} — which dispatches on the resolved isolation:\n *\n * | `isolationType` | Balance | What runs |\n * | ----------------------------------- | --------- | ------------------------------------- |\n * | `CUSTOM` (cross-margin) | allocated | deallocate + initiate in one atomic tx |\n * | `MARKET` / `MARKET_DIRECTION` (VA) | available | initiate the withdraw request only |\n *\n * @remarks\n * Account-layer balances are `1e18`-scaled regardless of the collateral token's\n * decimals, so the `CUSTOM` deallocate leg needs the 18-decimal amount; this action\n * derives it with {@link collateralToCore18} (`amount * 10 ** (18 - collateralDecimals)`).\n * On the `CUSTOM` path it also fetches a fresh Muon `upnlSig` for the deallocate\n * leg unless one is passed. Reach for {@link withdraw} directly when you already\n * hold the subaccount's `isolationType` and want to skip the extra read, or need\n * custom (multi-part / cross-chain) withdraw parts.\n *\n * @param config - The SDK config (must have a `getWalletClient` resolver).\n * @param parameters - Subaccount, `amount` (collateral decimals), `receiver`,\n * optional speed-up / provider data, optional Muon `upnlSig`, optional chain id.\n * @returns The submitted transaction hash. The caller waits on the receipt.\n * @throws {SymmError} when the chain is unsupported or no wallet is available.\n * @throws {SymmError} `COLLATERAL_DECIMALS_UNSUPPORTED` when the chain's\n * `collateralDecimals` is not an integer from 0 to 18.\n * @throws Viem's write errors (`ContractFunctionExecutionError`, ...).\n *\n * @example\n * ```ts\n * // amount in the collateral token's decimals (6-dec USDC → 1 USDC):\n * const hash = await withdrawAuto(config, {\n * account: \"0xsub…\",\n * amount: 1_000000n,\n * receiver: \"0xabc…\",\n * });\n * ```\n */\nexport async function withdrawAuto(\n config: Config,\n parameters: WithdrawAutoParameters,\n): Promise<WithdrawAutoReturnType> {\n const chainId = parameters.chainId ?? config.defaultChainId;\n\n // Use the caller-supplied isolation type when present (the React layer reads it\n // from cache); otherwise fetch the subaccount to resolve it.\n const isolationType =\n parameters.isolationType ?? (await getSubAccount(config, { account: parameters.account, chainId })).isolationType;\n const { addresses } = config.getChainConfig(chainId);\n\n const part = createClassicWithdrawPart({\n id: 0n,\n amount: parameters.amount,\n receiver: parameters.receiver,\n chainId: BigInt(chainId),\n });\n\n /** Account-layer balances are 1e18-scaled whatever the collateral's decimals; the deallocate leg needs that scale. */\n const amount18 = collateralToCore18(parameters.amount, addresses.collateralDecimals);\n\n return withdraw(config, {\n account: parameters.account,\n isolationType,\n parts: [part],\n amount: amount18,\n speedUp: parameters.speedUp,\n providerData: parameters.providerData,\n upnlSig: parameters.upnlSig,\n chainId,\n from: parameters.from,\n simulateBeforeWrite: parameters.simulateBeforeWrite,\n gasless: parameters.gasless,\n });\n}\n"],"mappings":";;;;;AA0GA,eAAsB,EACpB,GACA,GACiC;CACjC,IAAM,IAAU,EAAW,WAAW,EAAO,gBAIvC,IACJ,EAAW,kBAAkB,MAAM,EAAc,GAAQ;EAAE,SAAS,EAAW;EAAS;CAAQ,CAAC,GAAG,eAChG,EAAE,iBAAc,EAAO,eAAe,CAAO,GAE7C,IAAO,EAA0B;EACrC,IAAI;EACJ,QAAQ,EAAW;EACnB,UAAU,EAAW;EACrB,SAAS,OAAO,CAAO;CACzB,CAAC,GAGK,IAAW,EAAmB,EAAW,QAAQ,EAAU,kBAAkB;CAEnF,OAAO,EAAS,GAAQ;EACtB,SAAS,EAAW;EACpB;EACA,OAAO,CAAC,CAAI;EACZ,QAAQ;EACR,SAAS,EAAW;EACpB,cAAc,EAAW;EACzB,SAAS,EAAW;EACpB;EACA,MAAM,EAAW;EACjB,qBAAqB,EAAW;EAChC,SAAS,EAAW;CACtB,CAAC;AACH"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Address, Hash, Hex } from 'viem';
|
|
2
2
|
import { Config } from '../../../core/config/index.js';
|
|
3
|
-
import { Compute, WriteContractParameter } from '../../../shared/types/properties.js';
|
|
3
|
+
import { Compute, GaslessWriteParameter, WriteContractParameter } from '../../../shared/types/properties.js';
|
|
4
4
|
import { SubAccountIsolationType, SingleUpnlSig } from '../../account-layer/types.js';
|
|
5
5
|
import { WithdrawReceiverPart } from '../types.js';
|
|
6
6
|
/**
|
|
7
7
|
* Parameters for {@link withdraw}.
|
|
8
8
|
*/
|
|
9
|
-
export type WithdrawParameters = Compute<WriteContractParameter & {
|
|
9
|
+
export type WithdrawParameters = Compute<WriteContractParameter & GaslessWriteParameter & {
|
|
10
10
|
/**
|
|
11
11
|
* The subaccount to withdraw from. Both underlying actions route the call
|
|
12
12
|
* through the AccountLayer `_call` proxy so the core attributes it to this
|