@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-operational-fee-allowance.js","names":[],"sources":["../../../../src/symmio-contracts/symmio/query/get-operational-fee-allowance.ts"],"sourcesContent":["import type { Config } from \"../../../core/config\";\nimport type { Compute, ConfigKeyParameter, ExactPartial } from \"../../../shared/types/properties\";\nimport type { QueryParameter, SymmioQueryOptions } from \"../../../shared/types/query\";\nimport { filterQueryOptions } from \"../../../shared/utils/query\";\nimport {\n getOperationalFeeAllowance,\n type GetOperationalFeeAllowanceParameters,\n type GetOperationalFeeAllowanceReturnType,\n} from \"../actions/get-operational-fee-allowance\";\n\n/** Data resolved by the {@link getOperationalFeeAllowanceQueryOptions} query. */\nexport type GetOperationalFeeAllowanceData = GetOperationalFeeAllowanceReturnType;\n\n/**\n * Build the TanStack Query key for {@link getOperationalFeeAllowanceQueryOptions}.\n *\n * @param options - Partial query parameters.\n * @returns A stable, hashable query key.\n */\nexport function getOperationalFeeAllowanceQueryKey(\n options: Compute<ExactPartial<GetOperationalFeeAllowanceParameters> & ConfigKeyParameter> = {},\n) {\n return [\"getOperationalFeeAllowance\", filterQueryOptions(options)] as const;\n}\n\n/** Query-key type produced by {@link getOperationalFeeAllowanceQueryKey}. */\nexport type GetOperationalFeeAllowanceQueryKey = ReturnType<typeof getOperationalFeeAllowanceQueryKey>;\n\n/**\n * Options accepted by {@link getOperationalFeeAllowanceQueryOptions}.\n */\nexport type GetOperationalFeeAllowanceOptions = Compute<\n GetOperationalFeeAllowanceParameters &\n QueryParameter<\n GetOperationalFeeAllowanceData,\n Error,\n GetOperationalFeeAllowanceData,\n GetOperationalFeeAllowanceQueryKey\n >\n>;\n\n/** TanStack Query options returned by {@link getOperationalFeeAllowanceQueryOptions}. */\nexport type GetOperationalFeeAllowanceQueryOptions = SymmioQueryOptions<\n GetOperationalFeeAllowanceData,\n Error,\n GetOperationalFeeAllowanceData,\n GetOperationalFeeAllowanceQueryKey\n>;\n\n/**\n * Build TanStack Query options for {@link getOperationalFeeAllowance}.\n *\n * @param config - The SDK config.\n * @param options - Query parameters and TanStack overrides.\n * @returns Options to pass to `useQuery` / `queryClient.fetchQuery`.\n *\n * @example\n * ```ts\n * useQuery(getOperationalFeeAllowanceQueryOptions(config, { payer: subAccount }));\n * ```\n */\nexport function getOperationalFeeAllowanceQueryOptions(\n config: Config,\n options: GetOperationalFeeAllowanceOptions,\n): GetOperationalFeeAllowanceQueryOptions {\n return {\n ...options.query,\n queryKey: getOperationalFeeAllowanceQueryKey({\n ...options,\n configKey: config.getChainConfigKey(options.chainId),\n }),\n enabled: options.query?.enabled ?? true,\n queryFn: () => {\n const { chainId, payer, charger } = options;\n return getOperationalFeeAllowance(config, { chainId, payer, charger });\n },\n };\n}\n"],"mappings":";;;AAmBA,SAAgB,EACd,IAA4F,CAAC,GAC7F;CACA,OAAO,CAAC,8BAA8B,EAAmB,CAAO,CAAC;AACnE;AAsCA,SAAgB,EACd,GACA,GACwC;CACxC,OAAO;EACL,GAAG,EAAQ;EACX,UAAU,EAAmC;GAC3C,GAAG;GACH,WAAW,EAAO,kBAAkB,EAAQ,OAAO;EACrD,CAAC;EACD,SAAS,EAAQ,OAAO,WAAW;EACnC,eAAe;GACb,IAAM,EAAE,YAAS,UAAO,eAAY;GACpC,OAAO,EAA2B,GAAQ;IAAE;IAAS;IAAO;GAAQ,CAAC;EACvE;CACF;AACF"}
|
|
@@ -331,12 +331,12 @@ export interface Quote {
|
|
|
331
331
|
/** Affiliate address attributed to the quote, or the zero address. */
|
|
332
332
|
affiliate: Address;
|
|
333
333
|
/**
|
|
334
|
-
*
|
|
335
|
-
* 18-decimal fixed point)
|
|
336
|
-
*
|
|
337
|
-
*
|
|
338
|
-
*
|
|
339
|
-
*
|
|
334
|
+
* Per-unit cumulative funding-fee **index** recorded at this quote's last
|
|
335
|
+
* settlement (`int256`, 18-decimal fixed point, cost-positive). **Not a
|
|
336
|
+
* currency amount**, so summing this field across quotes is meaningless:
|
|
337
|
+
* `openAmount × (currentFee − accumulatedPaidFunding) / 1e18` is the
|
|
338
|
+
* **pending**, not-yet-settled fee — read that with
|
|
339
|
+
* {@link getQuotePendingFunding}. For settled funding amounts use
|
|
340
340
|
* {@link getQuoteFunding} / {@link aggregateGroupFunding}.
|
|
341
341
|
*/
|
|
342
342
|
accumulatedPaidFunding: bigint;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../src/symmio-contracts/symmio/types.ts"],"sourcesContent":["import type { Address, Hex } from \"viem\";\nimport type { SchnorrSign } from \"../account-layer/types\";\n\n/**\n * A Muon attestation covering a party's uPnL **and** a symbol price, mirrored\n * from the on-chain `SingleUpnlAndPriceSig` struct field-for-field (same order)\n * so the object encodes directly as the contract tuple without translation.\n *\n * @remarks\n * This is the `upnlSig` argument of `sendQuoteWithAffiliateAndData`. Solvers\n * that enforce Muon verification (Rasa / majors) require a live attestation\n * here; the lowcap InstantLayer flow instead passes a placeholder and delegates\n * the byte range to the solver. Fetch a fresh one with `getSendQuoteUpnlSig`\n * immediately before signing — the attestation is timestamped and short-lived.\n *\n * Compare {@link SingleUpnlSig}, which is the uPnL-only variant (no `price`).\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/core/storages/MuonStorage.sol}\n */\nexport interface SingleUpnlAndPriceSig {\n /** Muon request id (opaque bytes). */\n reqId: Hex;\n /** Attestation timestamp (seconds). */\n timestamp: bigint;\n /** Signed unrealized PnL of the party, `int256` (may be negative). */\n upnl: bigint;\n /** Attested symbol price as 18-decimal fixed point. */\n price: bigint;\n /** Muon gateway signature over the request (opaque bytes). */\n gatewaySignature: Hex;\n /** The Schnorr TSS signature pieces. */\n sigs: SchnorrSign;\n}\n\n/**\n * A Muon attestation covering a symbol's price range over a time window,\n * mirrored from the on-chain `HighLowPriceSig` struct field-for-field (same\n * order) so the object encodes directly as the contract tuple without\n * translation.\n *\n * @remarks\n * This is what `forceClosePosition` / `settleAndForceClosePosition` verify to\n * prove the market traded through the position's close price during the window.\n * Fetch one with `getForceClosePriceSig`.\n *\n * **Field-order footgun:** `upnlPartyB` comes **before** `upnlPartyA`. Swapping\n * them type-checks green (both are `bigint`) and silently mis-encodes the call.\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/core/storages/MuonStorage.sol}\n */\nexport interface HighLowPriceSig {\n /** Muon request id (opaque bytes). */\n reqId: Hex;\n /** Attestation timestamp (seconds). */\n timestamp: bigint;\n /** Symbol id the price range is for. */\n symbolId: bigint;\n /** Highest price observed in the window, 18-decimal fixed point. */\n highest: bigint;\n /** Lowest price observed in the window, 18-decimal fixed point. */\n lowest: bigint;\n /** Mean price over the window, 18-decimal fixed point (Muon returns it as `mean`). */\n averagePrice: bigint;\n /** Window start timestamp (seconds). */\n startTime: bigint;\n /** Window end timestamp (seconds). */\n endTime: bigint;\n /** PartyB's signed unrealized PnL, `int256`. Declared **before** `upnlPartyA`. */\n upnlPartyB: bigint;\n /** PartyA's signed unrealized PnL, `int256`. */\n upnlPartyA: bigint;\n /** Current price at attestation time, 18-decimal fixed point. */\n currentPrice: bigint;\n /** Muon gateway signature over the request (opaque bytes). */\n gatewaySignature: Hex;\n /** The Schnorr TSS signature pieces. */\n sigs: SchnorrSign;\n}\n\n/**\n * Lifecycle status of a SYMMIO withdraw request.\n *\n * @remarks\n * Names and ordering mirror the on-chain `enum WithdrawStatus` in\n * `WithdrawStorage.sol` (perps-core v0.8.6) exactly, so the `uint8` returned by\n * the withdraw read views casts directly to this enum without translation.\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/core/storages/WithdrawStorage.sol}\n */\nexport enum WithdrawStatus {\n /** Created, awaiting provider acceptance (classic withdrawals stay here until finalized). */\n PENDING = 0,\n /** A provider accepted the request. */\n PROVIDER_ACCEPTED = 1,\n /** A provider declined the request; it was refunded. */\n PROVIDER_REJECTED = 2,\n /** Finalized successfully; funds were paid out. */\n COMPLETED = 3,\n /** The user requested cancellation; awaiting provider approval. */\n CANCEL_REQUESTED = 4,\n /** Fully cancelled and refunded. */\n CANCELLED = 5,\n /** Suspended due to a user-level restriction. */\n SUSPENDED = 6,\n}\n\n/**\n * One receiver \"part\" of a withdraw request. A single request may split its\n * amount across several parts (different chains/providers); a plain same-chain\n * withdrawal is a single part with both provider fields set to the zero address.\n *\n * Field shapes and ordering mirror the on-chain `WithdrawReceiverPart` struct in\n * `WithdrawStorage.sol` (perps-core v0.8.6) exactly, so the object encodes\n * directly as the contract tuple without translation.\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/core/storages/WithdrawStorage.sol}\n */\nexport interface WithdrawReceiverPart {\n /** Caller-assigned part id, unique within the request. */\n id: bigint;\n /** Amount of collateral for this part, in the collateral token's smallest unit. */\n amount: bigint;\n /** Destination chain id (`int256` on-chain; the source chain for a same-chain part). */\n chainId: bigint;\n /** Destination address as raw bytes (a 20-byte EVM address is its own byte representation). */\n receiver: Hex;\n /** Virtual (cross-chain) provider, or the zero address for a same-chain part. */\n virtualProvider: Address;\n /** Express (instant) provider, or the zero address for a standard-cooldown part. */\n expressProvider: Address;\n}\n\n/**\n * A full withdraw request as stored on the SYMMIO core, returned by the withdraw\n * read views ({@link \"getWithdrawRequests\"}, {@link \"getPendingWithdrawRequests\"}).\n *\n * Field shapes and ordering mirror the on-chain `WithdrawRequest` struct in\n * `WithdrawStorage.sol` (perps-core v0.8.6). `status` is surfaced as the\n * {@link WithdrawStatus} enum rather than a raw `uint8`. Fields a newer\n * contracts generation added are **optional** and `undefined` on chains whose\n * deployment predates them (see `contractsVersion` in the chain config) —\n * today that is {@link WithdrawRequest.advancedAmount}, added in v0.8.6.\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/core/storages/WithdrawStorage.sol}\n */\nexport interface WithdrawRequest {\n /** Sequential request id (starts at 1 per user). */\n id: bigint;\n /** The subaccount the request belongs to. */\n user: Address;\n /** The receiver parts the withdrawal is split into. */\n parts: readonly WithdrawReceiverPart[];\n /** Block timestamp at which the request was created. */\n timestamp: bigint;\n /** Earliest timestamp the request can be finalized. */\n cooldownEndTime: bigint;\n /** Current lifecycle status. */\n status: WithdrawStatus;\n /** Whether the request opted into the cooldown speed-up flow. */\n speedUp: boolean;\n /** Whether the cooldown was modified after creation (e.g. by an accepted speed-up). */\n isCooldownModified: boolean;\n /** The provider bound to the request, or the zero address for a classic withdrawal. */\n provider: Address;\n /** Whether the request is a pure-virtual (cross-chain, no express) withdrawal. */\n isPureVirtual: boolean;\n /** Opaque provider data (e.g. a signed option), or `0x`. */\n providerData: Hex;\n /** Total collateral amount across all parts. */\n totalAmount: bigint;\n /** Total amount delivered via virtual providers. */\n totalVirtualAmount: bigint;\n /**\n * Collateral already advanced to the provider before cooldown expiry\n * (express credit-line flow). Added in perps-core v0.8.6 — **`undefined` on a\n * `contractsVersion: \"0.8.5\"` chain**, whose contracts predate withdraw\n * advances.\n */\n advancedAmount?: bigint;\n}\n\n/**\n * Direction of a trading position.\n *\n * @remarks\n * Names and ordering mirror the on-chain `enum PositionType` in\n * `QuoteStorage.sol` (perps-core v0.8.6) exactly, so the `uint8` carried on a\n * {@link Quote} casts directly to this enum without translation.\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/core/storages/QuoteStorage.sol}\n */\nexport enum PositionType {\n /** A long position — profits when the market price rises. */\n LONG = 0,\n /** A short position — profits when the market price falls. */\n SHORT = 1,\n}\n\n/**\n * How an order is priced and filled.\n *\n * @remarks\n * Names and ordering mirror the on-chain `enum OrderType` in `QuoteStorage.sol`\n * (perps-core v0.8.6) exactly, so the `uint8` carried on a {@link Quote} casts\n * directly to this enum without translation.\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/core/storages/QuoteStorage.sol}\n */\nexport enum OrderType {\n /** Fills only at the requested price or better. */\n LIMIT = 0,\n /** Fills at the prevailing market price. */\n MARKET = 1,\n}\n\n/**\n * Lifecycle status of a quote, from creation through settlement.\n *\n * @remarks\n * Names and ordering mirror the on-chain `enum QuoteStatus` in\n * `QuoteStorage.sol` (perps-core v0.8.6) exactly — all 11 members, including\n * `LIQUIDATED_PENDING` (10) — so the `uint8` carried on a {@link Quote} casts\n * directly to this enum without translation. `getPartyAOpenPositions` returns\n * only `OPENED`, `CLOSE_PENDING`, `CANCEL_CLOSE_PENDING`, and `LIQUIDATED_PENDING`\n * quotes; `getPartyAPendingQuotes` returns only `PENDING`, `LOCKED`, and\n * `CANCEL_PENDING`.\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/core/storages/QuoteStorage.sol}\n */\nexport enum QuoteStatus {\n /** Created, awaiting a partyB to lock it. */\n PENDING = 0,\n /** A partyB locked the quote and is preparing to open it. */\n LOCKED = 1,\n /** PartyA requested cancellation of a still-pending quote. */\n CANCEL_PENDING = 2,\n /** The pending quote was cancelled before opening. */\n CANCELED = 3,\n /** Opened into a live position. */\n OPENED = 4,\n /** PartyA requested a (full or partial) close of the open position. */\n CLOSE_PENDING = 5,\n /** PartyA requested cancellation of a pending close. */\n CANCEL_CLOSE_PENDING = 6,\n /** The position was fully closed. */\n CLOSED = 7,\n /** The position was liquidated. */\n LIQUIDATED = 8,\n /** The pending quote expired before being opened. */\n EXPIRED = 9,\n /** Liquidation is in progress for the position. */\n LIQUIDATED_PENDING = 10,\n}\n\n/**\n * Margin amounts locked against a {@link Quote}, in the collateral token's\n * smallest unit (raw `uint256`).\n *\n * Field shapes and ordering mirror the on-chain `struct LockedValues` in\n * `QuoteStorage.sol` (perps-core v0.8.6) exactly, so the object decodes directly\n * from the contract tuple without translation.\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/core/storages/QuoteStorage.sol}\n */\nexport interface LockedValues {\n /** Credit Valuation Adjustment locked by partyA. */\n cva: bigint;\n /** Liquidation Fee locked by partyA. */\n lf: bigint;\n /** PartyA maintenance margin. */\n partyAmm: bigint;\n /** PartyB maintenance margin. */\n partyBmm: bigint;\n}\n\n/**\n * A full trading quote or open position as stored on the SYMMIO core, returned\n * by the quote read views ({@link \"getQuote\"}, {@link \"getPartyAOpenPositions\"}).\n *\n * Field shapes and ordering mirror the on-chain `struct Quote` in\n * `QuoteStorage.sol` (perps-core v0.8.6) exactly — every `uint256`/`int256` is a\n * raw `bigint` (no decimal scaling applied) and the `uint8` enum fields are\n * surfaced as the {@link PositionType}, {@link OrderType}, and {@link QuoteStatus}\n * enums rather than raw numbers. Prices and amounts are 18-decimal fixed point.\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/core/storages/QuoteStorage.sol}\n */\nexport interface Quote {\n /** Sequential quote id (starts at 1; `0n` is the not-found sentinel). */\n id: bigint;\n /** PartyB addresses allowed to fill this quote (empty means any). */\n partyBsWhiteList: readonly Address[];\n /** Market identifier (`symbolId`) the quote trades. */\n symbolId: bigint;\n /** Long or short. */\n positionType: PositionType;\n /** Limit or market order. */\n orderType: OrderType;\n /** Price partyB actually opened at (0 until opened). */\n openedPrice: bigint;\n /** Price partyA originally requested to open at. */\n initialOpenedPrice: bigint;\n /** Current requested open price (may differ from `initialOpenedPrice` after edits). */\n requestedOpenPrice: bigint;\n /** Market price snapshot recorded on the quote at its last state change. */\n marketPrice: bigint;\n /** Total quantity partyA requested. */\n quantity: bigint;\n /** Quantity already closed. */\n closedAmount: bigint;\n /** Margin locked at open time (basis for leverage). */\n initialLockedValues: LockedValues;\n /** Margin currently locked. */\n lockedValues: LockedValues;\n /** Maximum funding rate partyA accepts. */\n maxFundingRate: bigint;\n /** Owner of the quote — the virtual account (lowcap). */\n partyA: Address;\n /** The partyB (hedger/solver) that locked/opened the quote, or the zero address. */\n partyB: Address;\n /** Current lifecycle status. */\n quoteStatus: QuoteStatus;\n /** Average price across executed closes. */\n avgClosedPrice: bigint;\n /** Requested limit price for a pending close. */\n requestedClosePrice: bigint;\n /** Quantity of a pending close request. */\n quantityToClose: bigint;\n /** Parent quote id for a partially-opened child, or `0n`. */\n parentId: bigint;\n /** Block timestamp the quote was created. */\n createTimestamp: bigint;\n /** Block timestamp of the last status change (sort key). */\n statusModifyTimestamp: bigint;\n /** Block timestamp funding was last applied. */\n lastFundingPaymentTimestamp: bigint;\n /** Quote deadline (expiry) timestamp. */\n deadline: bigint;\n /** Trading fee charged on the quote. */\n tradingFee: bigint;\n /** Affiliate address attributed to the quote, or the zero address. */\n affiliate: Address;\n /**\n * Cumulative funding-**rate index** already settled on this quote (`int256`,\n * 18-decimal fixed point) — the position's funding rate multiplied by the\n * epochs elapsed since the funding fee started. **Not a currency amount**:\n * the settled fee is only obtained as\n * `openAmount × (currentFee − accumulatedPaidFunding) / 1e18`, so summing this\n * field across quotes is meaningless. For real settled funding amounts use\n * {@link getQuoteFunding} / {@link aggregateGroupFunding}.\n */\n accumulatedPaidFunding: bigint;\n /** Fee charged on close. */\n closeFee: bigint;\n /** Opaque per-quote data, or `0x`. */\n data: Hex;\n}\n"],"mappings":";AAyFA,IAAY,IAAL,yBAAA,GAAA;QAEL,EAAA,EAAA,UAAA,KAAA,WAEA,EAAA,EAAA,oBAAA,KAAA,qBAEA,EAAA,EAAA,oBAAA,KAAA,qBAEA,EAAA,EAAA,YAAA,KAAA,aAEA,EAAA,EAAA,mBAAA,KAAA,oBAEA,EAAA,EAAA,YAAA,KAAA,aAEA,EAAA,EAAA,YAAA,KAAA;AACF,EAAA,CAAA,CAAA,GAuFY,IAAL,yBAAA,GAAA;QAEL,EAAA,EAAA,OAAA,KAAA,QAEA,EAAA,EAAA,QAAA,KAAA;AACF,EAAA,CAAA,CAAA,GAYY,IAAL,yBAAA,GAAA;QAEL,EAAA,EAAA,QAAA,KAAA,SAEA,EAAA,EAAA,SAAA,KAAA;AACF,EAAA,CAAA,CAAA,GAgBY,IAAL,yBAAA,GAAA;QAEL,EAAA,EAAA,UAAA,KAAA,WAEA,EAAA,EAAA,SAAA,KAAA,UAEA,EAAA,EAAA,iBAAA,KAAA,kBAEA,EAAA,EAAA,WAAA,KAAA,YAEA,EAAA,EAAA,SAAA,KAAA,UAEA,EAAA,EAAA,gBAAA,KAAA,iBAEA,EAAA,EAAA,uBAAA,KAAA,wBAEA,EAAA,EAAA,SAAA,KAAA,UAEA,EAAA,EAAA,aAAA,KAAA,cAEA,EAAA,EAAA,UAAA,KAAA,WAEA,EAAA,EAAA,qBAAA,MAAA;AACF,EAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../src/symmio-contracts/symmio/types.ts"],"sourcesContent":["import type { Address, Hex } from \"viem\";\nimport type { SchnorrSign } from \"../account-layer/types\";\n\n/**\n * A Muon attestation covering a party's uPnL **and** a symbol price, mirrored\n * from the on-chain `SingleUpnlAndPriceSig` struct field-for-field (same order)\n * so the object encodes directly as the contract tuple without translation.\n *\n * @remarks\n * This is the `upnlSig` argument of `sendQuoteWithAffiliateAndData`. Solvers\n * that enforce Muon verification (Rasa / majors) require a live attestation\n * here; the lowcap InstantLayer flow instead passes a placeholder and delegates\n * the byte range to the solver. Fetch a fresh one with `getSendQuoteUpnlSig`\n * immediately before signing — the attestation is timestamped and short-lived.\n *\n * Compare {@link SingleUpnlSig}, which is the uPnL-only variant (no `price`).\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/core/storages/MuonStorage.sol}\n */\nexport interface SingleUpnlAndPriceSig {\n /** Muon request id (opaque bytes). */\n reqId: Hex;\n /** Attestation timestamp (seconds). */\n timestamp: bigint;\n /** Signed unrealized PnL of the party, `int256` (may be negative). */\n upnl: bigint;\n /** Attested symbol price as 18-decimal fixed point. */\n price: bigint;\n /** Muon gateway signature over the request (opaque bytes). */\n gatewaySignature: Hex;\n /** The Schnorr TSS signature pieces. */\n sigs: SchnorrSign;\n}\n\n/**\n * A Muon attestation covering a symbol's price range over a time window,\n * mirrored from the on-chain `HighLowPriceSig` struct field-for-field (same\n * order) so the object encodes directly as the contract tuple without\n * translation.\n *\n * @remarks\n * This is what `forceClosePosition` / `settleAndForceClosePosition` verify to\n * prove the market traded through the position's close price during the window.\n * Fetch one with `getForceClosePriceSig`.\n *\n * **Field-order footgun:** `upnlPartyB` comes **before** `upnlPartyA`. Swapping\n * them type-checks green (both are `bigint`) and silently mis-encodes the call.\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/core/storages/MuonStorage.sol}\n */\nexport interface HighLowPriceSig {\n /** Muon request id (opaque bytes). */\n reqId: Hex;\n /** Attestation timestamp (seconds). */\n timestamp: bigint;\n /** Symbol id the price range is for. */\n symbolId: bigint;\n /** Highest price observed in the window, 18-decimal fixed point. */\n highest: bigint;\n /** Lowest price observed in the window, 18-decimal fixed point. */\n lowest: bigint;\n /** Mean price over the window, 18-decimal fixed point (Muon returns it as `mean`). */\n averagePrice: bigint;\n /** Window start timestamp (seconds). */\n startTime: bigint;\n /** Window end timestamp (seconds). */\n endTime: bigint;\n /** PartyB's signed unrealized PnL, `int256`. Declared **before** `upnlPartyA`. */\n upnlPartyB: bigint;\n /** PartyA's signed unrealized PnL, `int256`. */\n upnlPartyA: bigint;\n /** Current price at attestation time, 18-decimal fixed point. */\n currentPrice: bigint;\n /** Muon gateway signature over the request (opaque bytes). */\n gatewaySignature: Hex;\n /** The Schnorr TSS signature pieces. */\n sigs: SchnorrSign;\n}\n\n/**\n * Lifecycle status of a SYMMIO withdraw request.\n *\n * @remarks\n * Names and ordering mirror the on-chain `enum WithdrawStatus` in\n * `WithdrawStorage.sol` (perps-core v0.8.6) exactly, so the `uint8` returned by\n * the withdraw read views casts directly to this enum without translation.\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/core/storages/WithdrawStorage.sol}\n */\nexport enum WithdrawStatus {\n /** Created, awaiting provider acceptance (classic withdrawals stay here until finalized). */\n PENDING = 0,\n /** A provider accepted the request. */\n PROVIDER_ACCEPTED = 1,\n /** A provider declined the request; it was refunded. */\n PROVIDER_REJECTED = 2,\n /** Finalized successfully; funds were paid out. */\n COMPLETED = 3,\n /** The user requested cancellation; awaiting provider approval. */\n CANCEL_REQUESTED = 4,\n /** Fully cancelled and refunded. */\n CANCELLED = 5,\n /** Suspended due to a user-level restriction. */\n SUSPENDED = 6,\n}\n\n/**\n * One receiver \"part\" of a withdraw request. A single request may split its\n * amount across several parts (different chains/providers); a plain same-chain\n * withdrawal is a single part with both provider fields set to the zero address.\n *\n * Field shapes and ordering mirror the on-chain `WithdrawReceiverPart` struct in\n * `WithdrawStorage.sol` (perps-core v0.8.6) exactly, so the object encodes\n * directly as the contract tuple without translation.\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/core/storages/WithdrawStorage.sol}\n */\nexport interface WithdrawReceiverPart {\n /** Caller-assigned part id, unique within the request. */\n id: bigint;\n /** Amount of collateral for this part, in the collateral token's smallest unit. */\n amount: bigint;\n /** Destination chain id (`int256` on-chain; the source chain for a same-chain part). */\n chainId: bigint;\n /** Destination address as raw bytes (a 20-byte EVM address is its own byte representation). */\n receiver: Hex;\n /** Virtual (cross-chain) provider, or the zero address for a same-chain part. */\n virtualProvider: Address;\n /** Express (instant) provider, or the zero address for a standard-cooldown part. */\n expressProvider: Address;\n}\n\n/**\n * A full withdraw request as stored on the SYMMIO core, returned by the withdraw\n * read views ({@link \"getWithdrawRequests\"}, {@link \"getPendingWithdrawRequests\"}).\n *\n * Field shapes and ordering mirror the on-chain `WithdrawRequest` struct in\n * `WithdrawStorage.sol` (perps-core v0.8.6). `status` is surfaced as the\n * {@link WithdrawStatus} enum rather than a raw `uint8`. Fields a newer\n * contracts generation added are **optional** and `undefined` on chains whose\n * deployment predates them (see `contractsVersion` in the chain config) —\n * today that is {@link WithdrawRequest.advancedAmount}, added in v0.8.6.\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/core/storages/WithdrawStorage.sol}\n */\nexport interface WithdrawRequest {\n /** Sequential request id (starts at 1 per user). */\n id: bigint;\n /** The subaccount the request belongs to. */\n user: Address;\n /** The receiver parts the withdrawal is split into. */\n parts: readonly WithdrawReceiverPart[];\n /** Block timestamp at which the request was created. */\n timestamp: bigint;\n /** Earliest timestamp the request can be finalized. */\n cooldownEndTime: bigint;\n /** Current lifecycle status. */\n status: WithdrawStatus;\n /** Whether the request opted into the cooldown speed-up flow. */\n speedUp: boolean;\n /** Whether the cooldown was modified after creation (e.g. by an accepted speed-up). */\n isCooldownModified: boolean;\n /** The provider bound to the request, or the zero address for a classic withdrawal. */\n provider: Address;\n /** Whether the request is a pure-virtual (cross-chain, no express) withdrawal. */\n isPureVirtual: boolean;\n /** Opaque provider data (e.g. a signed option), or `0x`. */\n providerData: Hex;\n /** Total collateral amount across all parts. */\n totalAmount: bigint;\n /** Total amount delivered via virtual providers. */\n totalVirtualAmount: bigint;\n /**\n * Collateral already advanced to the provider before cooldown expiry\n * (express credit-line flow). Added in perps-core v0.8.6 — **`undefined` on a\n * `contractsVersion: \"0.8.5\"` chain**, whose contracts predate withdraw\n * advances.\n */\n advancedAmount?: bigint;\n}\n\n/**\n * Direction of a trading position.\n *\n * @remarks\n * Names and ordering mirror the on-chain `enum PositionType` in\n * `QuoteStorage.sol` (perps-core v0.8.6) exactly, so the `uint8` carried on a\n * {@link Quote} casts directly to this enum without translation.\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/core/storages/QuoteStorage.sol}\n */\nexport enum PositionType {\n /** A long position — profits when the market price rises. */\n LONG = 0,\n /** A short position — profits when the market price falls. */\n SHORT = 1,\n}\n\n/**\n * How an order is priced and filled.\n *\n * @remarks\n * Names and ordering mirror the on-chain `enum OrderType` in `QuoteStorage.sol`\n * (perps-core v0.8.6) exactly, so the `uint8` carried on a {@link Quote} casts\n * directly to this enum without translation.\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/core/storages/QuoteStorage.sol}\n */\nexport enum OrderType {\n /** Fills only at the requested price or better. */\n LIMIT = 0,\n /** Fills at the prevailing market price. */\n MARKET = 1,\n}\n\n/**\n * Lifecycle status of a quote, from creation through settlement.\n *\n * @remarks\n * Names and ordering mirror the on-chain `enum QuoteStatus` in\n * `QuoteStorage.sol` (perps-core v0.8.6) exactly — all 11 members, including\n * `LIQUIDATED_PENDING` (10) — so the `uint8` carried on a {@link Quote} casts\n * directly to this enum without translation. `getPartyAOpenPositions` returns\n * only `OPENED`, `CLOSE_PENDING`, `CANCEL_CLOSE_PENDING`, and `LIQUIDATED_PENDING`\n * quotes; `getPartyAPendingQuotes` returns only `PENDING`, `LOCKED`, and\n * `CANCEL_PENDING`.\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/core/storages/QuoteStorage.sol}\n */\nexport enum QuoteStatus {\n /** Created, awaiting a partyB to lock it. */\n PENDING = 0,\n /** A partyB locked the quote and is preparing to open it. */\n LOCKED = 1,\n /** PartyA requested cancellation of a still-pending quote. */\n CANCEL_PENDING = 2,\n /** The pending quote was cancelled before opening. */\n CANCELED = 3,\n /** Opened into a live position. */\n OPENED = 4,\n /** PartyA requested a (full or partial) close of the open position. */\n CLOSE_PENDING = 5,\n /** PartyA requested cancellation of a pending close. */\n CANCEL_CLOSE_PENDING = 6,\n /** The position was fully closed. */\n CLOSED = 7,\n /** The position was liquidated. */\n LIQUIDATED = 8,\n /** The pending quote expired before being opened. */\n EXPIRED = 9,\n /** Liquidation is in progress for the position. */\n LIQUIDATED_PENDING = 10,\n}\n\n/**\n * Margin amounts locked against a {@link Quote}, in the collateral token's\n * smallest unit (raw `uint256`).\n *\n * Field shapes and ordering mirror the on-chain `struct LockedValues` in\n * `QuoteStorage.sol` (perps-core v0.8.6) exactly, so the object decodes directly\n * from the contract tuple without translation.\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/core/storages/QuoteStorage.sol}\n */\nexport interface LockedValues {\n /** Credit Valuation Adjustment locked by partyA. */\n cva: bigint;\n /** Liquidation Fee locked by partyA. */\n lf: bigint;\n /** PartyA maintenance margin. */\n partyAmm: bigint;\n /** PartyB maintenance margin. */\n partyBmm: bigint;\n}\n\n/**\n * A full trading quote or open position as stored on the SYMMIO core, returned\n * by the quote read views ({@link \"getQuote\"}, {@link \"getPartyAOpenPositions\"}).\n *\n * Field shapes and ordering mirror the on-chain `struct Quote` in\n * `QuoteStorage.sol` (perps-core v0.8.6) exactly — every `uint256`/`int256` is a\n * raw `bigint` (no decimal scaling applied) and the `uint8` enum fields are\n * surfaced as the {@link PositionType}, {@link OrderType}, and {@link QuoteStatus}\n * enums rather than raw numbers. Prices and amounts are 18-decimal fixed point.\n *\n * @see {@link https://github.com/SYMM-IO/perps-core/blob/version_0.8.6/contracts/core/storages/QuoteStorage.sol}\n */\nexport interface Quote {\n /** Sequential quote id (starts at 1; `0n` is the not-found sentinel). */\n id: bigint;\n /** PartyB addresses allowed to fill this quote (empty means any). */\n partyBsWhiteList: readonly Address[];\n /** Market identifier (`symbolId`) the quote trades. */\n symbolId: bigint;\n /** Long or short. */\n positionType: PositionType;\n /** Limit or market order. */\n orderType: OrderType;\n /** Price partyB actually opened at (0 until opened). */\n openedPrice: bigint;\n /** Price partyA originally requested to open at. */\n initialOpenedPrice: bigint;\n /** Current requested open price (may differ from `initialOpenedPrice` after edits). */\n requestedOpenPrice: bigint;\n /** Market price snapshot recorded on the quote at its last state change. */\n marketPrice: bigint;\n /** Total quantity partyA requested. */\n quantity: bigint;\n /** Quantity already closed. */\n closedAmount: bigint;\n /** Margin locked at open time (basis for leverage). */\n initialLockedValues: LockedValues;\n /** Margin currently locked. */\n lockedValues: LockedValues;\n /** Maximum funding rate partyA accepts. */\n maxFundingRate: bigint;\n /** Owner of the quote — the virtual account (lowcap). */\n partyA: Address;\n /** The partyB (hedger/solver) that locked/opened the quote, or the zero address. */\n partyB: Address;\n /** Current lifecycle status. */\n quoteStatus: QuoteStatus;\n /** Average price across executed closes. */\n avgClosedPrice: bigint;\n /** Requested limit price for a pending close. */\n requestedClosePrice: bigint;\n /** Quantity of a pending close request. */\n quantityToClose: bigint;\n /** Parent quote id for a partially-opened child, or `0n`. */\n parentId: bigint;\n /** Block timestamp the quote was created. */\n createTimestamp: bigint;\n /** Block timestamp of the last status change (sort key). */\n statusModifyTimestamp: bigint;\n /** Block timestamp funding was last applied. */\n lastFundingPaymentTimestamp: bigint;\n /** Quote deadline (expiry) timestamp. */\n deadline: bigint;\n /** Trading fee charged on the quote. */\n tradingFee: bigint;\n /** Affiliate address attributed to the quote, or the zero address. */\n affiliate: Address;\n /**\n * Per-unit cumulative funding-fee **index** recorded at this quote's last\n * settlement (`int256`, 18-decimal fixed point, cost-positive). **Not a\n * currency amount**, so summing this field across quotes is meaningless:\n * `openAmount × (currentFee − accumulatedPaidFunding) / 1e18` is the\n * **pending**, not-yet-settled fee — read that with\n * {@link getQuotePendingFunding}. For settled funding amounts use\n * {@link getQuoteFunding} / {@link aggregateGroupFunding}.\n */\n accumulatedPaidFunding: bigint;\n /** Fee charged on close. */\n closeFee: bigint;\n /** Opaque per-quote data, or `0x`. */\n data: Hex;\n}\n"],"mappings":";AAyFA,IAAY,IAAL,yBAAA,GAAA;QAEL,EAAA,EAAA,UAAA,KAAA,WAEA,EAAA,EAAA,oBAAA,KAAA,qBAEA,EAAA,EAAA,oBAAA,KAAA,qBAEA,EAAA,EAAA,YAAA,KAAA,aAEA,EAAA,EAAA,mBAAA,KAAA,oBAEA,EAAA,EAAA,YAAA,KAAA,aAEA,EAAA,EAAA,YAAA,KAAA;AACF,EAAA,CAAA,CAAA,GAuFY,IAAL,yBAAA,GAAA;QAEL,EAAA,EAAA,OAAA,KAAA,QAEA,EAAA,EAAA,QAAA,KAAA;AACF,EAAA,CAAA,CAAA,GAYY,IAAL,yBAAA,GAAA;QAEL,EAAA,EAAA,QAAA,KAAA,SAEA,EAAA,EAAA,SAAA,KAAA;AACF,EAAA,CAAA,CAAA,GAgBY,IAAL,yBAAA,GAAA;QAEL,EAAA,EAAA,UAAA,KAAA,WAEA,EAAA,EAAA,SAAA,KAAA,UAEA,EAAA,EAAA,iBAAA,KAAA,kBAEA,EAAA,EAAA,WAAA,KAAA,YAEA,EAAA,EAAA,SAAA,KAAA,UAEA,EAAA,EAAA,gBAAA,KAAA,iBAEA,EAAA,EAAA,uBAAA,KAAA,wBAEA,EAAA,EAAA,SAAA,KAAA,UAEA,EAAA,EAAA,aAAA,KAAA,cAEA,EAAA,EAAA,UAAA,KAAA,WAEA,EAAA,EAAA,qBAAA,MAAA;AACF,EAAA,CAAA,CAAA"}
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
* @param variables - The operation variables.
|
|
12
12
|
* @param errorCode - Stable `SymmError`/`SymmApiError` code for the caller's domain.
|
|
13
13
|
* @returns The operation's `data`.
|
|
14
|
-
* @throws {SymmApiError} on HTTP failure (non-2xx, network error)
|
|
14
|
+
* @throws {SymmApiError} on HTTP failure (non-2xx, network error), with the
|
|
15
|
+
* axios error as `cause` and any `Retry-After` delay as `retryAfterMs`.
|
|
15
16
|
* @throws {SymmError} (`kind: "api"`) when the response carries GraphQL `errors`
|
|
16
17
|
* or omits `data`.
|
|
17
18
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executeSubgraphRequest.d.ts","sourceRoot":"","sources":["../../src/symmio-subgraph/executeSubgraphRequest.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"executeSubgraphRequest.d.ts","sourceRoot":"","sources":["../../src/symmio-subgraph/executeSubgraphRequest.ts"],"names":[],"mappings":"AAaA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,sBAAsB,CAAC,OAAO,EAClD,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,OAAO,EAClB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,OAAO,CAAC,CA4ClB"}
|
|
@@ -1,30 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { readHttpHeader as e } from "../shared/utils/http-header.js";
|
|
2
|
+
import { parseRetryAfterMs as t } from "../shared/errors/retry-after.js";
|
|
3
|
+
import { SymmApiError as n, SymmError as r } from "../shared/errors/symm-error.js";
|
|
4
|
+
import i, { isAxiosError as a } from "axios";
|
|
3
5
|
//#region src/symmio-subgraph/executeSubgraphRequest.ts
|
|
4
|
-
async function
|
|
5
|
-
let
|
|
6
|
+
async function o(o, s, c, l) {
|
|
7
|
+
let u;
|
|
6
8
|
try {
|
|
7
|
-
|
|
8
|
-
query:
|
|
9
|
-
variables:
|
|
9
|
+
u = (await i.post(o, {
|
|
10
|
+
query: s,
|
|
11
|
+
variables: c
|
|
10
12
|
}, { headers: { "content-type": "application/json" } })).data;
|
|
11
|
-
} catch (
|
|
12
|
-
throw
|
|
13
|
-
code:
|
|
14
|
-
message: `${
|
|
15
|
-
status:
|
|
16
|
-
statusText:
|
|
17
|
-
responseData:
|
|
18
|
-
url:
|
|
13
|
+
} catch (i) {
|
|
14
|
+
throw a(i) ? new n({
|
|
15
|
+
code: l,
|
|
16
|
+
message: `${l}: ${i.message} (POST ${o} → ${i.response?.status ?? 0} ${i.response?.statusText ?? "Unknown"})`,
|
|
17
|
+
status: i.response?.status ?? 0,
|
|
18
|
+
statusText: i.response?.statusText ?? "Unknown",
|
|
19
|
+
responseData: i.response?.data,
|
|
20
|
+
url: o,
|
|
19
21
|
method: "POST",
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
retryAfterMs: t(e(i.response?.headers, "retry-after")),
|
|
23
|
+
cause: i
|
|
24
|
+
}) : new r("api", l, `Subgraph request failed: ${i instanceof Error ? i.message : String(i)}`, { cause: i instanceof Error ? i : void 0 });
|
|
22
25
|
}
|
|
23
|
-
if (
|
|
24
|
-
if (!
|
|
25
|
-
return
|
|
26
|
+
if (u.errors?.length) throw new r("api", l, `Subgraph query failed: ${u.errors.map((e) => e.message).join("; ")}`);
|
|
27
|
+
if (!u.data) throw new r("api", l, "Subgraph query returned no data.");
|
|
28
|
+
return u.data;
|
|
26
29
|
}
|
|
27
30
|
//#endregion
|
|
28
|
-
export {
|
|
31
|
+
export { o as executeSubgraphRequest };
|
|
29
32
|
|
|
30
33
|
//# sourceMappingURL=executeSubgraphRequest.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executeSubgraphRequest.js","names":[],"sources":["../../src/symmio-subgraph/executeSubgraphRequest.ts"],"sourcesContent":["import axios, { isAxiosError } from \"axios\";\nimport { SymmApiError, SymmError } from \"../shared/errors/symm-error\";\n\n/** Shape of a GraphQL-over-HTTP response body. */\ninterface GraphQLResponse<TResult> {\n /** The query result, present when the operation succeeded. */\n data?: TResult;\n /** GraphQL-level errors (a 200 response can still carry these). */\n errors?: { message: string }[];\n}\n\n/**\n * POST a GraphQL query to a subgraph endpoint over the SDK's axios transport and\n * return its typed `data`.\n *\n * The SDK's only GraphQL transport: a single POST, no cache and no batching —\n * TanStack Query owns caching in the framework layer. A `200` carrying GraphQL\n * `errors`, or a response with no `data`, is treated as a failure.\n *\n * @param url - The subgraph endpoint URL.\n * @param query - The serialized GraphQL document text.\n * @param variables - The operation variables.\n * @param errorCode - Stable `SymmError`/`SymmApiError` code for the caller's domain.\n * @returns The operation's `data`.\n * @throws {SymmApiError} on HTTP failure (non-2xx, network error)
|
|
1
|
+
{"version":3,"file":"executeSubgraphRequest.js","names":[],"sources":["../../src/symmio-subgraph/executeSubgraphRequest.ts"],"sourcesContent":["import axios, { isAxiosError } from \"axios\";\nimport { parseRetryAfterMs } from \"../shared/errors/retry-after\";\nimport { SymmApiError, SymmError } from \"../shared/errors/symm-error\";\nimport { readHttpHeader } from \"../shared/utils/http-header\";\n\n/** Shape of a GraphQL-over-HTTP response body. */\ninterface GraphQLResponse<TResult> {\n /** The query result, present when the operation succeeded. */\n data?: TResult;\n /** GraphQL-level errors (a 200 response can still carry these). */\n errors?: { message: string }[];\n}\n\n/**\n * POST a GraphQL query to a subgraph endpoint over the SDK's axios transport and\n * return its typed `data`.\n *\n * The SDK's only GraphQL transport: a single POST, no cache and no batching —\n * TanStack Query owns caching in the framework layer. A `200` carrying GraphQL\n * `errors`, or a response with no `data`, is treated as a failure.\n *\n * @param url - The subgraph endpoint URL.\n * @param query - The serialized GraphQL document text.\n * @param variables - The operation variables.\n * @param errorCode - Stable `SymmError`/`SymmApiError` code for the caller's domain.\n * @returns The operation's `data`.\n * @throws {SymmApiError} on HTTP failure (non-2xx, network error), with the\n * axios error as `cause` and any `Retry-After` delay as `retryAfterMs`.\n * @throws {SymmError} (`kind: \"api\"`) when the response carries GraphQL `errors`\n * or omits `data`.\n */\nexport async function executeSubgraphRequest<TResult>(\n url: string,\n query: string,\n variables: unknown,\n errorCode: string,\n): Promise<TResult> {\n let body: GraphQLResponse<TResult>;\n try {\n const response = await axios.post<GraphQLResponse<TResult>>(\n url,\n { query, variables },\n { headers: { \"content-type\": \"application/json\" } },\n );\n body = response.data;\n } catch (err) {\n if (isAxiosError(err)) {\n throw new SymmApiError({\n code: errorCode,\n message: `${errorCode}: ${err.message} (POST ${url} → ${err.response?.status ?? 0} ${err.response?.statusText ?? \"Unknown\"})`,\n status: err.response?.status ?? 0,\n statusText: err.response?.statusText ?? \"Unknown\",\n responseData: err.response?.data,\n url,\n method: \"POST\",\n retryAfterMs: parseRetryAfterMs(readHttpHeader(err.response?.headers, \"retry-after\")),\n cause: err,\n });\n }\n throw new SymmError(\n \"api\",\n errorCode,\n `Subgraph request failed: ${err instanceof Error ? err.message : String(err)}`,\n {\n cause: err instanceof Error ? err : undefined,\n },\n );\n }\n\n if (body.errors?.length) {\n throw new SymmError(\n \"api\",\n errorCode,\n `Subgraph query failed: ${body.errors.map((error) => error.message).join(\"; \")}`,\n );\n }\n if (!body.data) {\n throw new SymmError(\"api\", errorCode, \"Subgraph query returned no data.\");\n }\n return body.data;\n}\n"],"mappings":";;;;;AA+BA,eAAsB,EACpB,GACA,GACA,GACA,GACkB;CAClB,IAAI;CACJ,IAAI;EAMF,KAAO,MALgB,EAAM,KAC3B,GACA;GAAE;GAAO;EAAU,GACnB,EAAE,SAAS,EAAE,gBAAgB,mBAAmB,EAAE,CACpD,GACgB;CAClB,SAAS,GAAK;EAcZ,MAbI,EAAa,CAAG,IACZ,IAAI,EAAa;GACrB,MAAM;GACN,SAAS,GAAG,EAAU,IAAI,EAAI,QAAQ,SAAS,EAAI,KAAK,EAAI,UAAU,UAAU,EAAE,GAAG,EAAI,UAAU,cAAc,UAAU;GAC3H,QAAQ,EAAI,UAAU,UAAU;GAChC,YAAY,EAAI,UAAU,cAAc;GACxC,cAAc,EAAI,UAAU;GAC5B;GACA,QAAQ;GACR,cAAc,EAAkB,EAAe,EAAI,UAAU,SAAS,aAAa,CAAC;GACpF,OAAO;EACT,CAAC,IAEG,IAAI,EACR,OACA,GACA,4BAA4B,aAAe,QAAQ,EAAI,UAAU,OAAO,CAAG,KAC3E,EACE,OAAO,aAAe,QAAQ,IAAM,KAAA,EACtC,CACF;CACF;CAEA,IAAI,EAAK,QAAQ,QACf,MAAM,IAAI,EACR,OACA,GACA,0BAA0B,EAAK,OAAO,KAAK,MAAU,EAAM,OAAO,EAAE,KAAK,IAAI,GAC/E;CAEF,IAAI,CAAC,EAAK,MACR,MAAM,IAAI,EAAU,OAAO,GAAW,kCAAkC;CAE1E,OAAO,EAAK;AACd"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the hub does after a status stream closes.
|
|
3
|
+
*
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export type GaslessCloseAction =
|
|
7
|
+
/** Dial again after backoff; HTTP fallback covers the gap. */
|
|
8
|
+
"retry"
|
|
9
|
+
/** Dial again, but give up after a few attempts that never reach `ready`. */
|
|
10
|
+
| "retry-bounded"
|
|
11
|
+
/** Stop dialing for this config: the cause cannot fix itself. */
|
|
12
|
+
| "disable";
|
|
13
|
+
/**
|
|
14
|
+
* Why a stream stopped, as reported to watchers.
|
|
15
|
+
*
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export type GaslessCloseReason = "streams-disabled" | "unauthorized" | "forbidden" | "unknown-instance" | "client-error" | "protocol-error" | "capacity" | "gateway-not-ready" | "handshake-rejected" | "unreachable";
|
|
19
|
+
/**
|
|
20
|
+
* The hub's reaction to one close code.
|
|
21
|
+
*
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
export interface GaslessClosePolicy {
|
|
25
|
+
action: GaslessCloseAction;
|
|
26
|
+
reason: GaslessCloseReason;
|
|
27
|
+
/** One sentence for `onError`, naming what an operator or developer must change. */
|
|
28
|
+
detail: string;
|
|
29
|
+
}
|
|
30
|
+
/** Attempts without a `ready` frame before a bounded retry gives up. */
|
|
31
|
+
export declare const GASLESS_STREAM_BOUNDED_ATTEMPTS = 3;
|
|
32
|
+
/**
|
|
33
|
+
* Map a WebSocket close code to the hub's reaction, following the gateway's
|
|
34
|
+
* documented codes.
|
|
35
|
+
*
|
|
36
|
+
* Retryable causes are transient service states (`1011` stream failure, `1013`
|
|
37
|
+
* capacity or slow consumer, `4008` handshake cap, `4013` gateway not ready) and
|
|
38
|
+
* a server-initiated normal close. Bounded retries cover the ambiguous ones: a
|
|
39
|
+
* browser reports a rejected handshake — a disallowed `Origin`, for instance —
|
|
40
|
+
* as `1006` with no detail, so a few attempts distinguish a flaky network from a
|
|
41
|
+
* misconfiguration without looping forever. The rest are permanent for this
|
|
42
|
+
* config: streams disabled (`1008`), a client bug (`1009`), or credentials and
|
|
43
|
+
* routing the SDK cannot fix (`4001`, `4003`, `4004`).
|
|
44
|
+
*
|
|
45
|
+
* @param code - The close code, or `undefined` when the implementation gave none.
|
|
46
|
+
* @returns The action, a reason for watchers, and a one-sentence detail.
|
|
47
|
+
*
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
export declare function classifyGaslessCloseCode(code?: number): GaslessClosePolicy;
|
|
51
|
+
//# sourceMappingURL=close-code-policy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"close-code-policy.d.ts","sourceRoot":"","sources":["../../../src/websocket/gasless/close-code-policy.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,kBAAkB;AAC5B,8DAA8D;AAC5D,OAAO;AACT,6EAA6E;GAC3E,eAAe;AACjB,iEAAiE;GAC/D,SAAS,CAAC;AAEd;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAC1B,kBAAkB,GAClB,cAAc,GACd,WAAW,GACX,kBAAkB,GAClB,cAAc,GACd,gBAAgB,GAChB,UAAU,GACV,mBAAmB,GACnB,oBAAoB,GACpB,aAAa,CAAC;AAElB;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,kBAAkB,CAAC;IAC3B,MAAM,EAAE,kBAAkB,CAAC;IAC3B,oFAAoF;IACpF,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wEAAwE;AACxE,eAAO,MAAM,+BAA+B,IAAI,CAAC;AAEjD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,kBAAkB,CAwF1E"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
//#region src/websocket/gasless/close-code-policy.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
switch (e) {
|
|
4
|
+
case 1e3:
|
|
5
|
+
case 1001: return {
|
|
6
|
+
action: "retry",
|
|
7
|
+
reason: "unreachable",
|
|
8
|
+
detail: "The gateway closed the stream normally; reconnecting."
|
|
9
|
+
};
|
|
10
|
+
case 1002: return {
|
|
11
|
+
action: "retry-bounded",
|
|
12
|
+
reason: "protocol-error",
|
|
13
|
+
detail: "The gateway reported a WebSocket protocol error. Status reads continue over HTTP; check any proxy between the app and the gateway if it recurs."
|
|
14
|
+
};
|
|
15
|
+
case 1008: return {
|
|
16
|
+
action: "disable",
|
|
17
|
+
reason: "streams-disabled",
|
|
18
|
+
detail: "The gateway has status WebSockets disabled for this instance. Status reads fall back to HTTP until operators enable them."
|
|
19
|
+
};
|
|
20
|
+
case 1009: return {
|
|
21
|
+
action: "disable",
|
|
22
|
+
reason: "client-error",
|
|
23
|
+
detail: "The gateway rejected a command as too large. This is an SDK bug; status reads fall back to HTTP."
|
|
24
|
+
};
|
|
25
|
+
case 1011: return {
|
|
26
|
+
action: "retry",
|
|
27
|
+
reason: "unreachable",
|
|
28
|
+
detail: "The gateway's stream failed or named a different backend; reconnecting with backoff."
|
|
29
|
+
};
|
|
30
|
+
case 1013: return {
|
|
31
|
+
action: "retry",
|
|
32
|
+
reason: "capacity",
|
|
33
|
+
detail: "The gateway is at capacity, has no listener, or dropped a slow consumer; reconnecting with backoff while HTTP covers the gap."
|
|
34
|
+
};
|
|
35
|
+
case 4001: return {
|
|
36
|
+
action: "disable",
|
|
37
|
+
reason: "unauthorized",
|
|
38
|
+
detail: "The gateway rejected the stream handshake as unauthenticated. Browser streams are anonymous, so this instance does not allow anonymous streaming."
|
|
39
|
+
};
|
|
40
|
+
case 4003: return {
|
|
41
|
+
action: "disable",
|
|
42
|
+
reason: "forbidden",
|
|
43
|
+
detail: "The caller may not stream this service or instance. Correct the gateway configuration."
|
|
44
|
+
};
|
|
45
|
+
case 4004: return {
|
|
46
|
+
action: "disable",
|
|
47
|
+
reason: "unknown-instance",
|
|
48
|
+
detail: "The gateway does not know this protocol instance or service. Check `gasless.protocolInstance` and the stream origin."
|
|
49
|
+
};
|
|
50
|
+
case 4008: return {
|
|
51
|
+
action: "retry",
|
|
52
|
+
reason: "capacity",
|
|
53
|
+
detail: "The gateway's handshake or connection cap was reached; reconnecting with backoff."
|
|
54
|
+
};
|
|
55
|
+
case 4013: return {
|
|
56
|
+
action: "retry",
|
|
57
|
+
reason: "gateway-not-ready",
|
|
58
|
+
detail: "The gateway is not ready yet; reconnecting with backoff."
|
|
59
|
+
};
|
|
60
|
+
case 1006: return {
|
|
61
|
+
action: "retry-bounded",
|
|
62
|
+
reason: "handshake-rejected",
|
|
63
|
+
detail: "The connection closed without a code. A browser reports a rejected handshake — a disallowed Origin, for instance — this way, so retries are bounded and status reads continue over HTTP."
|
|
64
|
+
};
|
|
65
|
+
default: return {
|
|
66
|
+
action: "retry-bounded",
|
|
67
|
+
reason: "unreachable",
|
|
68
|
+
detail: `The stream closed with an unexpected code (${e ?? "none"}); retries are bounded and status reads continue over HTTP.`
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
export { e as classifyGaslessCloseCode };
|
|
74
|
+
|
|
75
|
+
//# sourceMappingURL=close-code-policy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"close-code-policy.js","names":[],"sources":["../../../src/websocket/gasless/close-code-policy.ts"],"sourcesContent":["/**\n * What the hub does after a status stream closes.\n *\n * @internal\n */\nexport type GaslessCloseAction =\n /** Dial again after backoff; HTTP fallback covers the gap. */\n | \"retry\"\n /** Dial again, but give up after a few attempts that never reach `ready`. */\n | \"retry-bounded\"\n /** Stop dialing for this config: the cause cannot fix itself. */\n | \"disable\";\n\n/**\n * Why a stream stopped, as reported to watchers.\n *\n * @internal\n */\nexport type GaslessCloseReason =\n | \"streams-disabled\"\n | \"unauthorized\"\n | \"forbidden\"\n | \"unknown-instance\"\n | \"client-error\"\n | \"protocol-error\"\n | \"capacity\"\n | \"gateway-not-ready\"\n | \"handshake-rejected\"\n | \"unreachable\";\n\n/**\n * The hub's reaction to one close code.\n *\n * @internal\n */\nexport interface GaslessClosePolicy {\n action: GaslessCloseAction;\n reason: GaslessCloseReason;\n /** One sentence for `onError`, naming what an operator or developer must change. */\n detail: string;\n}\n\n/** Attempts without a `ready` frame before a bounded retry gives up. */\nexport const GASLESS_STREAM_BOUNDED_ATTEMPTS = 3;\n\n/**\n * Map a WebSocket close code to the hub's reaction, following the gateway's\n * documented codes.\n *\n * Retryable causes are transient service states (`1011` stream failure, `1013`\n * capacity or slow consumer, `4008` handshake cap, `4013` gateway not ready) and\n * a server-initiated normal close. Bounded retries cover the ambiguous ones: a\n * browser reports a rejected handshake — a disallowed `Origin`, for instance —\n * as `1006` with no detail, so a few attempts distinguish a flaky network from a\n * misconfiguration without looping forever. The rest are permanent for this\n * config: streams disabled (`1008`), a client bug (`1009`), or credentials and\n * routing the SDK cannot fix (`4001`, `4003`, `4004`).\n *\n * @param code - The close code, or `undefined` when the implementation gave none.\n * @returns The action, a reason for watchers, and a one-sentence detail.\n *\n * @internal\n */\nexport function classifyGaslessCloseCode(code?: number): GaslessClosePolicy {\n switch (code) {\n case 1000:\n case 1001:\n return {\n action: \"retry\",\n reason: \"unreachable\",\n detail: \"The gateway closed the stream normally; reconnecting.\",\n };\n case 1002:\n return {\n action: \"retry-bounded\",\n reason: \"protocol-error\",\n detail:\n \"The gateway reported a WebSocket protocol error. Status reads continue over HTTP; check any proxy between the app and the gateway if it recurs.\",\n };\n case 1008:\n return {\n action: \"disable\",\n reason: \"streams-disabled\",\n detail:\n \"The gateway has status WebSockets disabled for this instance. Status reads fall back to HTTP until operators enable them.\",\n };\n case 1009:\n return {\n action: \"disable\",\n reason: \"client-error\",\n detail: \"The gateway rejected a command as too large. This is an SDK bug; status reads fall back to HTTP.\",\n };\n case 1011:\n return {\n action: \"retry\",\n reason: \"unreachable\",\n detail: \"The gateway's stream failed or named a different backend; reconnecting with backoff.\",\n };\n case 1013:\n return {\n action: \"retry\",\n reason: \"capacity\",\n detail:\n \"The gateway is at capacity, has no listener, or dropped a slow consumer; reconnecting with backoff while HTTP covers the gap.\",\n };\n case 4001:\n return {\n action: \"disable\",\n reason: \"unauthorized\",\n detail:\n \"The gateway rejected the stream handshake as unauthenticated. Browser streams are anonymous, so this instance does not allow anonymous streaming.\",\n };\n case 4003:\n return {\n action: \"disable\",\n reason: \"forbidden\",\n detail: \"The caller may not stream this service or instance. Correct the gateway configuration.\",\n };\n case 4004:\n return {\n action: \"disable\",\n reason: \"unknown-instance\",\n detail:\n \"The gateway does not know this protocol instance or service. Check `gasless.protocolInstance` and the stream origin.\",\n };\n case 4008:\n return {\n action: \"retry\",\n reason: \"capacity\",\n detail: \"The gateway's handshake or connection cap was reached; reconnecting with backoff.\",\n };\n case 4013:\n return {\n action: \"retry\",\n reason: \"gateway-not-ready\",\n detail: \"The gateway is not ready yet; reconnecting with backoff.\",\n };\n case 1006:\n return {\n action: \"retry-bounded\",\n reason: \"handshake-rejected\",\n detail:\n \"The connection closed without a code. A browser reports a rejected handshake — a disallowed Origin, for instance — this way, so retries are bounded and status reads continue over HTTP.\",\n };\n default:\n return {\n action: \"retry-bounded\",\n reason: \"unreachable\",\n detail: `The stream closed with an unexpected code (${code ?? \"none\"}); retries are bounded and status reads continue over HTTP.`,\n };\n }\n}\n"],"mappings":";AA+DA,SAAgB,EAAyB,GAAmC;CAC1E,QAAQ,GAAR;EACE,KAAK;EACL,KAAK,MACH,OAAO;GACL,QAAQ;GACR,QAAQ;GACR,QAAQ;EACV;EACF,KAAK,MACH,OAAO;GACL,QAAQ;GACR,QAAQ;GACR,QACE;EACJ;EACF,KAAK,MACH,OAAO;GACL,QAAQ;GACR,QAAQ;GACR,QACE;EACJ;EACF,KAAK,MACH,OAAO;GACL,QAAQ;GACR,QAAQ;GACR,QAAQ;EACV;EACF,KAAK,MACH,OAAO;GACL,QAAQ;GACR,QAAQ;GACR,QAAQ;EACV;EACF,KAAK,MACH,OAAO;GACL,QAAQ;GACR,QAAQ;GACR,QACE;EACJ;EACF,KAAK,MACH,OAAO;GACL,QAAQ;GACR,QAAQ;GACR,QACE;EACJ;EACF,KAAK,MACH,OAAO;GACL,QAAQ;GACR,QAAQ;GACR,QAAQ;EACV;EACF,KAAK,MACH,OAAO;GACL,QAAQ;GACR,QAAQ;GACR,QACE;EACJ;EACF,KAAK,MACH,OAAO;GACL,QAAQ;GACR,QAAQ;GACR,QAAQ;EACV;EACF,KAAK,MACH,OAAO;GACL,QAAQ;GACR,QAAQ;GACR,QAAQ;EACV;EACF,KAAK,MACH,OAAO;GACL,QAAQ;GACR,QAAQ;GACR,QACE;EACJ;EACF,SACE,OAAO;GACL,QAAQ;GACR,QAAQ;GACR,QAAQ,8CAA8C,KAAQ,OAAO;EACvE;CACJ;AACF"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Config } from '../../core/config/index.js';
|
|
2
|
+
import { SymmError } from '../../shared/errors/symm-error.js';
|
|
3
|
+
import { GaslessStreamSelector } from './parse-gasless-stream-message.js';
|
|
4
|
+
import { GaslessStreamEndpoint } from './resolve-gasless-stream-url.js';
|
|
5
|
+
import { GaslessRequestStreamUpdate, GaslessStreamStatus, GaslessStreamStatusDetail } from './types.js';
|
|
6
|
+
/**
|
|
7
|
+
* One watcher of one selector.
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export interface GaslessStreamListener {
|
|
12
|
+
onUpdate: (update: GaslessRequestStreamUpdate) => void;
|
|
13
|
+
onStatusChange?: (status: GaslessStreamStatus, detail: GaslessStreamStatusDetail | null) => void;
|
|
14
|
+
onError?: (error: SymmError) => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Parameters for {@link acquireGaslessStreamSelector}.
|
|
18
|
+
*
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export interface AcquireGaslessStreamSelectorParameters {
|
|
22
|
+
/** The resolved stream endpoint; one hub per URL per config. */
|
|
23
|
+
endpoint: GaslessStreamEndpoint;
|
|
24
|
+
/** What this watcher wants to follow. */
|
|
25
|
+
selector: GaslessStreamSelector;
|
|
26
|
+
/** This watcher's callbacks. */
|
|
27
|
+
listener: GaslessStreamListener;
|
|
28
|
+
/** Randomness for backoff and throttle jitter; injectable for tests. */
|
|
29
|
+
random?: () => number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Join (or open) the shared status stream for an endpoint and subscribe one
|
|
33
|
+
* selector.
|
|
34
|
+
*
|
|
35
|
+
* One socket serves every watcher of a `(config, endpoint)` pair: the hub keeps
|
|
36
|
+
* the desired selector set independent of the connection, replays it after each
|
|
37
|
+
* `ready`, paces commands so they do not eat the caller's request quota, and
|
|
38
|
+
* routes every frame to the watchers of its selector. Watchers are told when the
|
|
39
|
+
* stream is not delivering so they can poll instead — the hub itself never
|
|
40
|
+
* issues HTTP.
|
|
41
|
+
*
|
|
42
|
+
* A subscription outlives its last watcher by a short grace, and a watcher that
|
|
43
|
+
* joins one which has already delivered is handed that record. Together they
|
|
44
|
+
* make the handoff between two waits on the same workflow free: no
|
|
45
|
+
* unsubscribe/subscribe round trip, and nothing to read over HTTP.
|
|
46
|
+
*
|
|
47
|
+
* @returns A release function; the socket closes shortly after the last watcher releases.
|
|
48
|
+
*
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
export declare function acquireGaslessStreamSelector(config: Config, parameters: AcquireGaslessStreamSelectorParameters): () => void;
|
|
52
|
+
/**
|
|
53
|
+
* Mark a selector finished, so a reconnect does not resubscribe it.
|
|
54
|
+
*
|
|
55
|
+
* The caller decides what "finished" means — a terminal workflow status, or a
|
|
56
|
+
* dismissed row — and the hub unsubscribes it from the live socket.
|
|
57
|
+
*
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
export declare function releaseGaslessStreamSelector(config: Config, endpointUrl: string, selector: GaslessStreamSelector): void;
|
|
61
|
+
//# sourceMappingURL=gasless-stream-hub.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gasless-stream-hub.d.ts","sourceRoot":"","sources":["../../../src/websocket/gasless/gasless-stream-hub.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAK3D,OAAO,EAKL,KAAK,qBAAqB,EAC3B,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,KAAK,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAgC1G;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,CAAC,MAAM,EAAE,0BAA0B,KAAK,IAAI,CAAC;IACvD,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,mBAAmB,EAAE,MAAM,EAAE,yBAAyB,GAAG,IAAI,KAAK,IAAI,CAAC;IACjG,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;CACtC;AA0dD;;;;GAIG;AACH,MAAM,WAAW,sCAAsC;IACrD,gEAAgE;IAChE,QAAQ,EAAE,qBAAqB,CAAC;IAChC,yCAAyC;IACzC,QAAQ,EAAE,qBAAqB,CAAC;IAChC,gCAAgC;IAChC,QAAQ,EAAE,qBAAqB,CAAC;IAChC,wEAAwE;IACxE,MAAM,CAAC,EAAE,MAAM,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,sCAAsC,GACjD,MAAM,IAAI,CA4GZ;AAED;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,qBAAqB,GAC9B,IAAI,CAUN"}
|