@symmio/trading-core 4.3.0 → 4.5.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/candles/adapters/tradingview/map-resolution.d.ts.map +1 -1
- package/dist/candles/adapters/tradingview/map-resolution.js +2 -0
- package/dist/candles/adapters/tradingview/map-resolution.js.map +1 -1
- package/dist/candles/adapters/tradingview/to-tradingview-datafeed.d.ts.map +1 -1
- package/dist/candles/adapters/tradingview/to-tradingview-datafeed.js +6 -4
- package/dist/candles/adapters/tradingview/to-tradingview-datafeed.js.map +1 -1
- package/dist/candles/history-query.d.ts +67 -0
- package/dist/candles/history-query.d.ts.map +1 -0
- package/dist/candles/history-query.js +80 -0
- package/dist/candles/history-query.js.map +1 -0
- package/dist/candles/index.d.ts +3 -0
- package/dist/candles/index.d.ts.map +1 -1
- package/dist/candles/merge-candle-pages.d.ts +5 -0
- package/dist/candles/merge-candle-pages.d.ts.map +1 -0
- package/dist/candles/merge-candle-pages.js +13 -0
- package/dist/candles/merge-candle-pages.js.map +1 -0
- package/dist/candles/query.d.ts +5 -1
- package/dist/candles/query.d.ts.map +1 -1
- package/dist/candles/query.js +3 -2
- package/dist/candles/query.js.map +1 -1
- package/dist/candles/refresh-candle-history.d.ts +31 -0
- package/dist/candles/refresh-candle-history.d.ts.map +1 -0
- package/dist/candles/refresh-candle-history.js +91 -0
- package/dist/candles/refresh-candle-history.js.map +1 -0
- package/dist/candles/resolution.d.ts +3 -3
- package/dist/candles/resolution.d.ts.map +1 -1
- package/dist/candles/resolution.js +1 -0
- package/dist/candles/resolution.js.map +1 -1
- package/dist/candles/sources/binance/create-binance-candle-source.d.ts.map +1 -1
- package/dist/candles/sources/binance/create-binance-candle-source.js +3 -1
- package/dist/candles/sources/binance/create-binance-candle-source.js.map +1 -1
- package/dist/candles/sources/lowcap/create-lowcap-candle-source.d.ts +35 -0
- package/dist/candles/sources/lowcap/create-lowcap-candle-source.d.ts.map +1 -0
- package/dist/candles/sources/lowcap/create-lowcap-candle-source.js +104 -0
- package/dist/candles/sources/lowcap/create-lowcap-candle-source.js.map +1 -0
- package/dist/candles/sources/lowcap/create-lowcap-symbol-loader.d.ts +4 -0
- package/dist/candles/sources/lowcap/create-lowcap-symbol-loader.d.ts.map +1 -0
- package/dist/candles/sources/lowcap/create-lowcap-symbol-loader.js +40 -0
- package/dist/candles/sources/lowcap/create-lowcap-symbol-loader.js.map +1 -0
- package/dist/candles/sources/lowcap/get-lowcap-candles.d.ts +12 -0
- package/dist/candles/sources/lowcap/get-lowcap-candles.d.ts.map +1 -0
- package/dist/candles/sources/lowcap/get-lowcap-candles.js +48 -0
- package/dist/candles/sources/lowcap/get-lowcap-candles.js.map +1 -0
- package/dist/candles/sources/lowcap/index.d.ts +2 -0
- package/dist/candles/sources/lowcap/index.d.ts.map +1 -0
- package/dist/candles/sources/lowcap/lowcap-candle-time.d.ts +9 -0
- package/dist/candles/sources/lowcap/lowcap-candle-time.d.ts.map +1 -0
- package/dist/candles/sources/lowcap/lowcap-candle-time.js +24 -0
- package/dist/candles/sources/lowcap/lowcap-candle-time.js.map +1 -0
- package/dist/candles/sources/lowcap/map-resolution.d.ts +16 -0
- package/dist/candles/sources/lowcap/map-resolution.d.ts.map +1 -0
- package/dist/candles/sources/lowcap/map-resolution.js +26 -0
- package/dist/candles/sources/lowcap/map-resolution.js.map +1 -0
- package/dist/candles/sources/lowcap/resolve-lowcap-symbol.d.ts +12 -0
- package/dist/candles/sources/lowcap/resolve-lowcap-symbol.d.ts.map +1 -0
- package/dist/candles/sources/lowcap/resolve-lowcap-symbol.js +8 -0
- package/dist/candles/sources/lowcap/resolve-lowcap-symbol.js.map +1 -0
- package/dist/candles/sources/lowcap/watch-lowcap-candles.d.ts +19 -0
- package/dist/candles/sources/lowcap/watch-lowcap-candles.d.ts.map +1 -0
- package/dist/candles/sources/lowcap/watch-lowcap-candles.js +104 -0
- package/dist/candles/sources/lowcap/watch-lowcap-candles.js.map +1 -0
- package/dist/candles/types.d.ts +32 -16
- package/dist/candles/types.d.ts.map +1 -1
- package/dist/core/chains/registry.d.ts.map +1 -1
- package/dist/core/chains/registry.js +4 -5
- package/dist/core/chains/registry.js.map +1 -1
- package/dist/core/chains/types.d.ts +36 -1
- 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.js +6 -3
- package/dist/core/config/merge-chain-config.js.map +1 -1
- package/dist/gasless/batch/calls.d.ts +21 -7
- package/dist/gasless/batch/calls.d.ts.map +1 -1
- package/dist/gasless/batch/calls.js +17 -16
- package/dist/gasless/batch/calls.js.map +1 -1
- package/dist/gasless/batch/resolve-gasless-batch.d.ts +10 -1
- package/dist/gasless/batch/resolve-gasless-batch.d.ts.map +1 -1
- package/dist/gasless/batch/resolve-gasless-batch.js +17 -15
- package/dist/gasless/batch/resolve-gasless-batch.js.map +1 -1
- package/dist/gasless/classify-gasless-failure.d.ts +3 -1
- package/dist/gasless/classify-gasless-failure.d.ts.map +1 -1
- package/dist/gasless/classify-gasless-failure.js +10 -10
- package/dist/gasless/classify-gasless-failure.js.map +1 -1
- package/dist/gasless/confirm-gasless-request/confirm-gasless-request.js +5 -5
- package/dist/gasless/constants.d.ts +21 -0
- package/dist/gasless/constants.d.ts.map +1 -1
- package/dist/gasless/constants.js +2 -2
- package/dist/gasless/constants.js.map +1 -1
- package/dist/gasless/delegation-preflight.js +10 -10
- package/dist/gasless/deployment-key.d.ts +39 -0
- package/dist/gasless/deployment-key.d.ts.map +1 -0
- package/dist/gasless/deployment-key.js +22 -0
- package/dist/gasless/deployment-key.js.map +1 -0
- package/dist/gasless/dispatch/attempt-start.d.ts +31 -0
- package/dist/gasless/dispatch/attempt-start.d.ts.map +1 -0
- package/dist/gasless/dispatch/attempt-start.js +14 -0
- package/dist/gasless/dispatch/attempt-start.js.map +1 -0
- package/dist/gasless/dispatch/maybe-relay-as-gasless.d.ts +4 -43
- package/dist/gasless/dispatch/maybe-relay-as-gasless.d.ts.map +1 -1
- package/dist/gasless/dispatch/maybe-relay-as-gasless.js +24 -182
- package/dist/gasless/dispatch/maybe-relay-as-gasless.js.map +1 -1
- package/dist/gasless/dispatch/resolve-gasless-write.d.ts +40 -0
- package/dist/gasless/dispatch/resolve-gasless-write.d.ts.map +1 -0
- package/dist/gasless/dispatch/resolve-gasless-write.js +48 -0
- package/dist/gasless/dispatch/resolve-gasless-write.js.map +1 -0
- package/dist/gasless/dispatch/submit-gasless-write.d.ts +11 -0
- package/dist/gasless/dispatch/submit-gasless-write.d.ts.map +1 -0
- package/dist/gasless/dispatch/submit-gasless-write.js +180 -0
- package/dist/gasless/dispatch/submit-gasless-write.js.map +1 -0
- package/dist/gasless/dispatch/types.d.ts +42 -0
- package/dist/gasless/dispatch/types.d.ts.map +1 -0
- package/dist/gasless/effective-instant-selectors.d.ts +11 -0
- package/dist/gasless/effective-instant-selectors.d.ts.map +1 -0
- package/dist/gasless/effective-instant-selectors.js +25 -0
- package/dist/gasless/effective-instant-selectors.js.map +1 -0
- package/dist/gasless/fallback.d.ts +43 -0
- package/dist/gasless/fallback.d.ts.map +1 -1
- package/dist/gasless/fallback.js +27 -17
- package/dist/gasless/fallback.js.map +1 -1
- package/dist/gasless/gasless-wallet-execute/gasless-wallet-execute.d.ts +13 -5
- package/dist/gasless/gasless-wallet-execute/gasless-wallet-execute.d.ts.map +1 -1
- package/dist/gasless/gasless-wallet-execute/gasless-wallet-execute.js +88 -81
- package/dist/gasless/gasless-wallet-execute/gasless-wallet-execute.js.map +1 -1
- package/dist/gasless/get-gasless-batch-funding/batch-fee-approvals.d.ts +20 -0
- package/dist/gasless/get-gasless-batch-funding/batch-fee-approvals.d.ts.map +1 -0
- package/dist/gasless/get-gasless-batch-funding/batch-fee-approvals.js +29 -0
- package/dist/gasless/get-gasless-batch-funding/batch-fee-approvals.js.map +1 -0
- package/dist/gasless/get-gasless-batch-funding/get-gasless-batch-funding.d.ts +43 -0
- package/dist/gasless/get-gasless-batch-funding/get-gasless-batch-funding.d.ts.map +1 -0
- package/dist/gasless/get-gasless-batch-funding/get-gasless-batch-funding.js +96 -0
- package/dist/gasless/get-gasless-batch-funding/get-gasless-batch-funding.js.map +1 -0
- package/dist/gasless/get-gasless-batch-funding/index.d.ts +4 -0
- package/dist/gasless/get-gasless-batch-funding/index.d.ts.map +1 -0
- package/dist/gasless/get-gasless-batch-funding/query.d.ts +31 -0
- package/dist/gasless/get-gasless-batch-funding/query.d.ts.map +1 -0
- package/dist/gasless/get-gasless-batch-funding/query.js +22 -0
- package/dist/gasless/get-gasless-batch-funding/query.js.map +1 -0
- package/dist/gasless/get-gasless-batch-funding/types.d.ts +80 -0
- package/dist/gasless/get-gasless-batch-funding/types.d.ts.map +1 -0
- package/dist/gasless/get-gasless-margin-funding/get-gasless-margin-funding.d.ts +33 -0
- package/dist/gasless/get-gasless-margin-funding/get-gasless-margin-funding.d.ts.map +1 -0
- package/dist/gasless/get-gasless-margin-funding/get-gasless-margin-funding.js +31 -0
- package/dist/gasless/get-gasless-margin-funding/get-gasless-margin-funding.js.map +1 -0
- package/dist/gasless/get-gasless-margin-funding/index.d.ts +4 -0
- package/dist/gasless/get-gasless-margin-funding/index.d.ts.map +1 -0
- package/dist/gasless/get-gasless-margin-funding/query.d.ts +31 -0
- package/dist/gasless/get-gasless-margin-funding/query.d.ts.map +1 -0
- package/dist/gasless/get-gasless-margin-funding/query.js +22 -0
- package/dist/gasless/get-gasless-margin-funding/query.js.map +1 -0
- package/dist/gasless/get-gasless-margin-funding/types.d.ts +27 -0
- package/dist/gasless/get-gasless-margin-funding/types.d.ts.map +1 -0
- package/dist/gasless/get-session-key-selectors.d.ts +18 -4
- package/dist/gasless/get-session-key-selectors.d.ts.map +1 -1
- package/dist/gasless/get-session-key-selectors.js +20 -12
- package/dist/gasless/get-session-key-selectors.js.map +1 -1
- package/dist/gasless/http.d.ts +7 -7
- package/dist/gasless/http.d.ts.map +1 -1
- package/dist/gasless/http.js +70 -72
- package/dist/gasless/http.js.map +1 -1
- package/dist/gasless/idempotency-key.d.ts +33 -0
- package/dist/gasless/idempotency-key.d.ts.map +1 -0
- package/dist/gasless/idempotency-key.js +15 -0
- package/dist/gasless/idempotency-key.js.map +1 -0
- package/dist/gasless/index.d.ts +4 -0
- package/dist/gasless/index.d.ts.map +1 -1
- package/dist/gasless/nonce-lock.d.ts +55 -17
- package/dist/gasless/nonce-lock.d.ts.map +1 -1
- package/dist/gasless/nonce-lock.js +53 -26
- package/dist/gasless/nonce-lock.js.map +1 -1
- package/dist/gasless/relay-gasless-batch/preflight-batch-delegations.d.ts +30 -0
- package/dist/gasless/relay-gasless-batch/preflight-batch-delegations.d.ts.map +1 -0
- package/dist/gasless/relay-gasless-batch/preflight-batch-delegations.js +67 -0
- package/dist/gasless/relay-gasless-batch/preflight-batch-delegations.js.map +1 -0
- package/dist/gasless/relay-gasless-batch/relay-gasless-batch.d.ts +30 -9
- package/dist/gasless/relay-gasless-batch/relay-gasless-batch.d.ts.map +1 -1
- package/dist/gasless/relay-gasless-batch/relay-gasless-batch.js +99 -102
- package/dist/gasless/relay-gasless-batch/relay-gasless-batch.js.map +1 -1
- package/dist/gasless/relay-gasless-batch/resolve-batch-signers.d.ts +18 -0
- package/dist/gasless/relay-gasless-batch/resolve-batch-signers.d.ts.map +1 -0
- package/dist/gasless/relay-gasless-batch/resolve-batch-signers.js +17 -0
- package/dist/gasless/relay-gasless-batch/resolve-batch-signers.js.map +1 -0
- package/dist/gasless/relay-gasless-batch/sign-gasless-batch.d.ts +8 -5
- package/dist/gasless/relay-gasless-batch/sign-gasless-batch.d.ts.map +1 -1
- package/dist/gasless/relay-gasless-batch/sign-gasless-batch.js +22 -16
- package/dist/gasless/relay-gasless-batch/sign-gasless-batch.js.map +1 -1
- package/dist/gasless/relay-grant-delegation/relay-grant-delegation.d.ts +13 -7
- package/dist/gasless/relay-grant-delegation/relay-grant-delegation.d.ts.map +1 -1
- package/dist/gasless/relay-grant-delegation/relay-grant-delegation.js +46 -36
- package/dist/gasless/relay-grant-delegation/relay-grant-delegation.js.map +1 -1
- package/dist/gasless/relay-instant-operations/relay-instant-operations.d.ts +14 -15
- package/dist/gasless/relay-instant-operations/relay-instant-operations.d.ts.map +1 -1
- package/dist/gasless/relay-instant-operations/relay-instant-operations.js +12 -11
- package/dist/gasless/relay-instant-operations/relay-instant-operations.js.map +1 -1
- package/dist/gasless/relayable-writes.d.ts.map +1 -1
- package/dist/gasless/relayable-writes.js +28 -0
- package/dist/gasless/relayable-writes.js.map +1 -1
- package/dist/gasless/request-headers.d.ts +7 -0
- package/dist/gasless/request-headers.d.ts.map +1 -0
- package/dist/gasless/request-headers.js +34 -0
- package/dist/gasless/request-headers.js.map +1 -0
- package/dist/gasless/resolve-wallet-identities.js +4 -4
- package/dist/gasless/resubmit-gasless-request/resubmit-gasless-request.d.ts +11 -4
- package/dist/gasless/resubmit-gasless-request/resubmit-gasless-request.d.ts.map +1 -1
- package/dist/gasless/resubmit-gasless-request/resubmit-gasless-request.js +2 -2
- package/dist/gasless/resubmit-gasless-request/resubmit-gasless-request.js.map +1 -1
- package/dist/gasless/settle-gasless-deposit-existing-account/settle-gasless-deposit-existing-account.d.ts +10 -14
- package/dist/gasless/settle-gasless-deposit-existing-account/settle-gasless-deposit-existing-account.d.ts.map +1 -1
- package/dist/gasless/settle-gasless-deposit-existing-account/settle-gasless-deposit-existing-account.js +3 -2
- package/dist/gasless/settle-gasless-deposit-existing-account/settle-gasless-deposit-existing-account.js.map +1 -1
- package/dist/gasless/settle-gasless-deposit-new-account/settle-gasless-deposit-new-account.d.ts +15 -15
- package/dist/gasless/settle-gasless-deposit-new-account/settle-gasless-deposit-new-account.d.ts.map +1 -1
- package/dist/gasless/settle-gasless-deposit-new-account/settle-gasless-deposit-new-account.js +13 -12
- package/dist/gasless/settle-gasless-deposit-new-account/settle-gasless-deposit-new-account.js.map +1 -1
- package/dist/gasless/unconfirmed-submit.d.ts +12 -8
- package/dist/gasless/unconfirmed-submit.d.ts.map +1 -1
- package/dist/gasless/unconfirmed-submit.js +1 -1
- package/dist/gasless/unconfirmed-submit.js.map +1 -1
- package/dist/index.d.ts +27 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +680 -615
- package/dist/pools/listing-config/to-listing-config.d.ts +10 -3
- package/dist/pools/listing-config/to-listing-config.d.ts.map +1 -1
- package/dist/pools/listing-config/to-listing-config.js +5 -1
- package/dist/pools/listing-config/to-listing-config.js.map +1 -1
- package/dist/pools/types/generated/listing-backend.d.ts +266 -1
- 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 +7 -0
- package/dist/pools/types.d.ts.map +1 -1
- package/dist/pools/types.js.map +1 -1
- package/dist/price-service/enigma/ohlcv/fetch-enigma-ohlcv.d.ts +39 -0
- package/dist/price-service/enigma/ohlcv/fetch-enigma-ohlcv.d.ts.map +1 -0
- package/dist/price-service/enigma/ohlcv/fetch-enigma-ohlcv.js +43 -0
- package/dist/price-service/enigma/ohlcv/fetch-enigma-ohlcv.js.map +1 -0
- package/dist/price-service/enigma/ohlcv/generated/enigma-price-service-ohlcv.d.ts +67 -0
- package/dist/price-service/enigma/ohlcv/generated/enigma-price-service-ohlcv.d.ts.map +1 -0
- package/dist/price-service/enigma/ohlcv/generated/enigma-price-service-ohlcv.js +15 -0
- package/dist/price-service/enigma/ohlcv/generated/enigma-price-service-ohlcv.js.map +1 -0
- package/dist/price-service/enigma/ohlcv/parse-enigma-ohlcv.d.ts +21 -0
- package/dist/price-service/enigma/ohlcv/parse-enigma-ohlcv.d.ts.map +1 -0
- package/dist/price-service/enigma/ohlcv/parse-enigma-ohlcv.js +36 -0
- package/dist/price-service/enigma/ohlcv/parse-enigma-ohlcv.js.map +1 -0
- package/dist/price-service/enigma/symbols-info/get-enigma-price-service-symbols-info.d.ts +2 -0
- package/dist/price-service/enigma/symbols-info/get-enigma-price-service-symbols-info.d.ts.map +1 -1
- package/dist/price-service/enigma/symbols-info/get-enigma-price-service-symbols-info.js +12 -8
- package/dist/price-service/enigma/symbols-info/get-enigma-price-service-symbols-info.js.map +1 -1
- package/dist/shared/errors/symm-error.js +3 -3
- package/dist/shared/types/properties.d.ts +45 -8
- package/dist/shared/types/properties.d.ts.map +1 -1
- package/dist/solvers/capabilities.d.ts.map +1 -1
- package/dist/solvers/capabilities.js +4 -2
- package/dist/solvers/capabilities.js.map +1 -1
- package/dist/solvers/estimated-price/get-estimated-price.js +6 -6
- package/dist/solvers/force-close/force-close-auto.d.ts.map +1 -1
- package/dist/solvers/force-close/force-close-auto.js +70 -69
- package/dist/solvers/force-close/force-close-auto.js.map +1 -1
- package/dist/solvers/get-error-message/get-error-message.js +4 -4
- package/dist/solvers/get-party-a-upnl/get-party-a-upnl.js +4 -4
- package/dist/solvers/get-solver-balance-info/get-solver-balance-info.js +4 -4
- package/dist/solvers/get-solver-info/get-solver-info.d.ts +5 -2
- package/dist/solvers/get-solver-info/get-solver-info.d.ts.map +1 -1
- package/dist/solvers/get-solver-info/get-solver-info.js +14 -12
- package/dist/solvers/get-solver-info/get-solver-info.js.map +1 -1
- package/dist/solvers/get-solver-info/parse-timelock-info.d.ts +5 -0
- package/dist/solvers/get-solver-info/parse-timelock-info.d.ts.map +1 -0
- package/dist/solvers/get-solver-info/parse-timelock-info.js +27 -0
- package/dist/solvers/get-solver-info/parse-timelock-info.js.map +1 -0
- package/dist/solvers/get-solver-open-interest/get-solver-open-interest.js +4 -4
- package/dist/solvers/get-solver-price-range/get-solver-price-range.js +4 -4
- package/dist/solvers/get-solver-readiness/get-solver-readiness.js +4 -4
- package/dist/solvers/instant-open/get-instant-opens/adapters/enigma-instant-opens.js +17 -17
- package/dist/solvers/instant-open/instant-open/adapters/enigma-instant-open.d.ts +8 -7
- package/dist/solvers/instant-open/instant-open/adapters/enigma-instant-open.d.ts.map +1 -1
- package/dist/solvers/instant-open/instant-open/adapters/enigma-instant-open.js +43 -39
- package/dist/solvers/instant-open/instant-open/adapters/enigma-instant-open.js.map +1 -1
- package/dist/solvers/instant-open/instant-open/adapters/enigma-margin-timelock.d.ts +16 -0
- package/dist/solvers/instant-open/instant-open/adapters/enigma-margin-timelock.d.ts.map +1 -0
- package/dist/solvers/instant-open/instant-open/adapters/enigma-margin-timelock.js +92 -0
- package/dist/solvers/instant-open/instant-open/adapters/enigma-margin-timelock.js.map +1 -0
- package/dist/solvers/instant-open/instant-open/adapters/rasa-instant-open.js +1 -1
- package/dist/solvers/instant-open/instant-open/index.d.ts +2 -0
- package/dist/solvers/instant-open/instant-open/index.d.ts.map +1 -1
- package/dist/solvers/instant-open/instant-open/instant-open.d.ts +22 -6
- package/dist/solvers/instant-open/instant-open/instant-open.d.ts.map +1 -1
- package/dist/solvers/instant-open/instant-open/instant-open.js +35 -27
- package/dist/solvers/instant-open/instant-open/instant-open.js.map +1 -1
- package/dist/solvers/instant-open/instant-open/prepared/submit-prepared-instant-open.d.ts +12 -0
- package/dist/solvers/instant-open/instant-open/prepared/submit-prepared-instant-open.d.ts.map +1 -0
- package/dist/solvers/instant-open/instant-open/prepared/submit-prepared-instant-open.js +49 -0
- package/dist/solvers/instant-open/instant-open/prepared/submit-prepared-instant-open.js.map +1 -0
- package/dist/solvers/instant-open/instant-open/prepared/types.d.ts +20 -0
- package/dist/solvers/instant-open/instant-open/prepared/types.d.ts.map +1 -0
- package/dist/solvers/instant-open/instant-open/types.d.ts +5 -4
- package/dist/solvers/instant-open/instant-open/types.d.ts.map +1 -1
- package/dist/solvers/instant-open/shared/hedger-api.d.ts.map +1 -1
- package/dist/solvers/instant-open/shared/hedger-api.js +38 -26
- package/dist/solvers/instant-open/shared/hedger-api.js.map +1 -1
- package/dist/solvers/markets/adapters/enigma-markets.js +34 -34
- package/dist/solvers/notional-cap/get-notional-cap-page.js +4 -4
- package/dist/solvers/revenue/get-solver-revenue.js +10 -10
- package/dist/solvers/revenue-records/get-revenue-records.js +11 -11
- package/dist/solvers/symbols/get-symbols.js +13 -13
- package/dist/solvers/trade-volume/get-trade-volume.js +10 -10
- package/dist/symmio-contracts/abi/v0.8.6/instant-layer.d.ts +46 -0
- 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 +53 -0
- 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 +3 -0
- package/dist/symmio-contracts/account-layer/actions/add-margin.d.ts.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/add-margin.js +41 -27
- 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 +23 -9
- 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 +15 -36
- 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 +3 -0
- 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 +40 -26
- package/dist/symmio-contracts/account-layer/actions/delete-sub-account.js.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/edit-account-name.d.ts +1 -1
- 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 +18 -37
- package/dist/symmio-contracts/account-layer/actions/edit-account-name.js.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/get-active-virtual-account-by-key.d.ts +46 -0
- package/dist/symmio-contracts/account-layer/actions/get-active-virtual-account-by-key.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/actions/get-active-virtual-account-by-key.js +20 -0
- package/dist/symmio-contracts/account-layer/actions/get-active-virtual-account-by-key.js.map +1 -0
- package/dist/symmio-contracts/account-layer/actions/get-virtual-accounts-count-of-sub-account.d.ts +31 -0
- package/dist/symmio-contracts/account-layer/actions/get-virtual-accounts-count-of-sub-account.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/actions/get-virtual-accounts-count-of-sub-account.js +15 -0
- package/dist/symmio-contracts/account-layer/actions/get-virtual-accounts-count-of-sub-account.js.map +1 -0
- package/dist/symmio-contracts/account-layer/actions/get-virtual-accounts-of-sub-account.d.ts +54 -0
- package/dist/symmio-contracts/account-layer/actions/get-virtual-accounts-of-sub-account.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/actions/get-virtual-accounts-of-sub-account.js +26 -0
- package/dist/symmio-contracts/account-layer/actions/get-virtual-accounts-of-sub-account.js.map +1 -0
- package/dist/symmio-contracts/account-layer/actions/remove-margin.d.ts +3 -0
- package/dist/symmio-contracts/account-layer/actions/remove-margin.d.ts.map +1 -1
- package/dist/symmio-contracts/account-layer/actions/remove-margin.js +50 -32
- package/dist/symmio-contracts/account-layer/actions/remove-margin.js.map +1 -1
- package/dist/symmio-contracts/account-layer/cancel-timelock-op/cancel-timelock-op.d.ts +12 -0
- package/dist/symmio-contracts/account-layer/cancel-timelock-op/cancel-timelock-op.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/cancel-timelock-op/cancel-timelock-op.js +10 -0
- package/dist/symmio-contracts/account-layer/cancel-timelock-op/cancel-timelock-op.js.map +1 -0
- package/dist/symmio-contracts/account-layer/cancel-timelock-op/index.d.ts +3 -0
- package/dist/symmio-contracts/account-layer/cancel-timelock-op/index.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/cancel-timelock-op/query.d.ts +9 -0
- package/dist/symmio-contracts/account-layer/cancel-timelock-op/query.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/cancel-timelock-op/query.js +13 -0
- package/dist/symmio-contracts/account-layer/cancel-timelock-op/query.js.map +1 -0
- package/dist/symmio-contracts/account-layer/clear-timelocks/clear-timelocks.d.ts +12 -0
- package/dist/symmio-contracts/account-layer/clear-timelocks/clear-timelocks.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/clear-timelocks/clear-timelocks.js +10 -0
- package/dist/symmio-contracts/account-layer/clear-timelocks/clear-timelocks.js.map +1 -0
- package/dist/symmio-contracts/account-layer/clear-timelocks/index.d.ts +3 -0
- package/dist/symmio-contracts/account-layer/clear-timelocks/index.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/clear-timelocks/query.d.ts +9 -0
- package/dist/symmio-contracts/account-layer/clear-timelocks/query.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/clear-timelocks/query.js +13 -0
- package/dist/symmio-contracts/account-layer/clear-timelocks/query.js.map +1 -0
- package/dist/symmio-contracts/account-layer/execute-timelock-op/execute-timelock-op.d.ts +12 -0
- package/dist/symmio-contracts/account-layer/execute-timelock-op/execute-timelock-op.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/execute-timelock-op/execute-timelock-op.js +9 -0
- package/dist/symmio-contracts/account-layer/execute-timelock-op/execute-timelock-op.js.map +1 -0
- package/dist/symmio-contracts/account-layer/execute-timelock-op/index.d.ts +3 -0
- package/dist/symmio-contracts/account-layer/execute-timelock-op/index.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/execute-timelock-op/query.d.ts +9 -0
- package/dist/symmio-contracts/account-layer/execute-timelock-op/query.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/execute-timelock-op/query.js +13 -0
- package/dist/symmio-contracts/account-layer/execute-timelock-op/query.js.map +1 -0
- package/dist/symmio-contracts/account-layer/get-min-timelock-delay/get-min-timelock-delay.d.ts +12 -0
- package/dist/symmio-contracts/account-layer/get-min-timelock-delay/get-min-timelock-delay.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/get-min-timelock-delay/get-min-timelock-delay.js +16 -0
- package/dist/symmio-contracts/account-layer/get-min-timelock-delay/get-min-timelock-delay.js.map +1 -0
- package/dist/symmio-contracts/account-layer/get-min-timelock-delay/index.d.ts +2 -0
- package/dist/symmio-contracts/account-layer/get-min-timelock-delay/index.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/get-selector-timelock/get-selector-timelock.d.ts +12 -0
- package/dist/symmio-contracts/account-layer/get-selector-timelock/get-selector-timelock.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/get-selector-timelock/get-selector-timelock.js +22 -0
- package/dist/symmio-contracts/account-layer/get-selector-timelock/get-selector-timelock.js.map +1 -0
- package/dist/symmio-contracts/account-layer/get-selector-timelock/index.d.ts +3 -0
- package/dist/symmio-contracts/account-layer/get-selector-timelock/index.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/get-selector-timelock/query.d.ts +22 -0
- package/dist/symmio-contracts/account-layer/get-selector-timelock/query.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/get-selector-timelock/query.js +21 -0
- package/dist/symmio-contracts/account-layer/get-selector-timelock/query.js.map +1 -0
- package/dist/symmio-contracts/account-layer/get-timelock-schedule/get-timelock-schedule.d.ts +12 -0
- package/dist/symmio-contracts/account-layer/get-timelock-schedule/get-timelock-schedule.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/get-timelock-schedule/get-timelock-schedule.js +22 -0
- package/dist/symmio-contracts/account-layer/get-timelock-schedule/get-timelock-schedule.js.map +1 -0
- package/dist/symmio-contracts/account-layer/get-timelock-schedule/index.d.ts +2 -0
- package/dist/symmio-contracts/account-layer/get-timelock-schedule/index.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/get-timelock-schedule-grace-period/get-timelock-schedule-grace-period.d.ts +13 -0
- package/dist/symmio-contracts/account-layer/get-timelock-schedule-grace-period/get-timelock-schedule-grace-period.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/get-timelock-schedule-grace-period/get-timelock-schedule-grace-period.js +17 -0
- package/dist/symmio-contracts/account-layer/get-timelock-schedule-grace-period/get-timelock-schedule-grace-period.js.map +1 -0
- package/dist/symmio-contracts/account-layer/get-timelock-schedule-grace-period/index.d.ts +2 -0
- package/dist/symmio-contracts/account-layer/get-timelock-schedule-grace-period/index.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/get-timelock-schedule-state/get-timelock-schedule-state.d.ts +12 -0
- package/dist/symmio-contracts/account-layer/get-timelock-schedule-state/get-timelock-schedule-state.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/get-timelock-schedule-state/get-timelock-schedule-state.js +67 -0
- package/dist/symmio-contracts/account-layer/get-timelock-schedule-state/get-timelock-schedule-state.js.map +1 -0
- package/dist/symmio-contracts/account-layer/get-timelock-schedule-state/index.d.ts +3 -0
- package/dist/symmio-contracts/account-layer/get-timelock-schedule-state/index.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/get-timelock-schedule-state/query.d.ts +21 -0
- package/dist/symmio-contracts/account-layer/get-timelock-schedule-state/query.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/get-timelock-schedule-state/query.js +21 -0
- package/dist/symmio-contracts/account-layer/get-timelock-schedule-state/query.js.map +1 -0
- package/dist/symmio-contracts/account-layer/hash-timelock-approval/hash-timelock-approval.d.ts +15 -0
- package/dist/symmio-contracts/account-layer/hash-timelock-approval/hash-timelock-approval.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/hash-timelock-approval/hash-timelock-approval.js +17 -0
- package/dist/symmio-contracts/account-layer/hash-timelock-approval/hash-timelock-approval.js.map +1 -0
- package/dist/symmio-contracts/account-layer/hash-timelock-approval/index.d.ts +2 -0
- package/dist/symmio-contracts/account-layer/hash-timelock-approval/index.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/hook-metadata.d.ts +47 -0
- package/dist/symmio-contracts/account-layer/hook-metadata.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/hook-metadata.js +30 -0
- package/dist/symmio-contracts/account-layer/hook-metadata.js.map +1 -0
- package/dist/symmio-contracts/account-layer/index.d.ts +21 -0
- package/dist/symmio-contracts/account-layer/index.d.ts.map +1 -1
- package/dist/symmio-contracts/account-layer/is-timelock-approval-used/index.d.ts +2 -0
- package/dist/symmio-contracts/account-layer/is-timelock-approval-used/index.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/is-timelock-approval-used/is-timelock-approval-used.d.ts +14 -0
- package/dist/symmio-contracts/account-layer/is-timelock-approval-used/is-timelock-approval-used.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/is-timelock-approval-used/is-timelock-approval-used.js +17 -0
- package/dist/symmio-contracts/account-layer/is-timelock-approval-used/is-timelock-approval-used.js.map +1 -0
- package/dist/symmio-contracts/account-layer/query/generate-account-manager-address.js +6 -6
- package/dist/symmio-contracts/account-layer/query/get-account-balance-info.js +6 -6
- package/dist/symmio-contracts/account-layer/query/get-account-balance-of.js +6 -6
- package/dist/symmio-contracts/account-layer/query/get-active-virtual-account-by-key.d.ts +43 -0
- package/dist/symmio-contracts/account-layer/query/get-active-virtual-account-by-key.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/query/get-active-virtual-account-by-key.js +31 -0
- package/dist/symmio-contracts/account-layer/query/get-active-virtual-account-by-key.js.map +1 -0
- package/dist/symmio-contracts/account-layer/query/get-affiliate-state.js +6 -6
- package/dist/symmio-contracts/account-layer/query/get-sub-account-virtual-nonce.js +6 -6
- package/dist/symmio-contracts/account-layer/query/get-sub-accounts-count-of-user.js +6 -6
- package/dist/symmio-contracts/account-layer/query/get-user-sub-accounts-addresses.js +6 -6
- package/dist/symmio-contracts/account-layer/query/get-user-sub-accounts.js +6 -6
- package/dist/symmio-contracts/account-layer/query/get-virtual-accounts-addresses-of-sub-account.js +6 -6
- package/dist/symmio-contracts/account-layer/query/get-virtual-accounts-count-of-sub-account.d.ts +39 -0
- package/dist/symmio-contracts/account-layer/query/get-virtual-accounts-count-of-sub-account.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/query/get-virtual-accounts-count-of-sub-account.js +29 -0
- package/dist/symmio-contracts/account-layer/query/get-virtual-accounts-count-of-sub-account.js.map +1 -0
- package/dist/symmio-contracts/account-layer/query/get-virtual-accounts-of-sub-account.d.ts +39 -0
- package/dist/symmio-contracts/account-layer/query/get-virtual-accounts-of-sub-account.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/query/get-virtual-accounts-of-sub-account.js +31 -0
- package/dist/symmio-contracts/account-layer/query/get-virtual-accounts-of-sub-account.js.map +1 -0
- package/dist/symmio-contracts/account-layer/query/predict-next-virtual-account.js +6 -6
- package/dist/symmio-contracts/account-layer/resolve-timelock-root-account/index.d.ts +2 -0
- package/dist/symmio-contracts/account-layer/resolve-timelock-root-account/index.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/resolve-timelock-root-account/resolve-timelock-root-account.d.ts +19 -0
- package/dist/symmio-contracts/account-layer/resolve-timelock-root-account/resolve-timelock-root-account.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/resolve-timelock-root-account/resolve-timelock-root-account.js +10 -0
- package/dist/symmio-contracts/account-layer/resolve-timelock-root-account/resolve-timelock-root-account.js.map +1 -0
- package/dist/symmio-contracts/account-layer/schedule-timelock-op/index.d.ts +3 -0
- package/dist/symmio-contracts/account-layer/schedule-timelock-op/index.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/schedule-timelock-op/query.d.ts +9 -0
- package/dist/symmio-contracts/account-layer/schedule-timelock-op/query.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/schedule-timelock-op/query.js +13 -0
- package/dist/symmio-contracts/account-layer/schedule-timelock-op/query.js.map +1 -0
- package/dist/symmio-contracts/account-layer/schedule-timelock-op/schedule-timelock-op.d.ts +12 -0
- package/dist/symmio-contracts/account-layer/schedule-timelock-op/schedule-timelock-op.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/schedule-timelock-op/schedule-timelock-op.js +10 -0
- package/dist/symmio-contracts/account-layer/schedule-timelock-op/schedule-timelock-op.js.map +1 -0
- package/dist/symmio-contracts/account-layer/setup-timelocks/index.d.ts +3 -0
- package/dist/symmio-contracts/account-layer/setup-timelocks/index.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/setup-timelocks/query.d.ts +9 -0
- package/dist/symmio-contracts/account-layer/setup-timelocks/query.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/setup-timelocks/query.js +13 -0
- package/dist/symmio-contracts/account-layer/setup-timelocks/query.js.map +1 -0
- package/dist/symmio-contracts/account-layer/setup-timelocks/setup-timelocks.d.ts +13 -0
- package/dist/symmio-contracts/account-layer/setup-timelocks/setup-timelocks.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/setup-timelocks/setup-timelocks.js +18 -0
- package/dist/symmio-contracts/account-layer/setup-timelocks/setup-timelocks.js.map +1 -0
- package/dist/symmio-contracts/account-layer/timelock-selector.d.ts +4 -0
- package/dist/symmio-contracts/account-layer/timelock-selector.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/timelock-selector.js +9 -0
- package/dist/symmio-contracts/account-layer/timelock-selector.js.map +1 -0
- package/dist/symmio-contracts/account-layer/timelock-test.d.ts +7 -0
- package/dist/symmio-contracts/account-layer/timelock-test.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/timelock-types.d.ts +66 -0
- package/dist/symmio-contracts/account-layer/timelock-types.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/types.d.ts +32 -2
- 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/account-layer/write-timelock.d.ts +10 -0
- package/dist/symmio-contracts/account-layer/write-timelock.d.ts.map +1 -0
- package/dist/symmio-contracts/account-layer/write-timelock.js +51 -0
- package/dist/symmio-contracts/account-layer/write-timelock.js.map +1 -0
- package/dist/symmio-contracts/instant-layer/actions/grant-delegation.d.ts +4 -1
- package/dist/symmio-contracts/instant-layer/actions/grant-delegation.d.ts.map +1 -1
- package/dist/symmio-contracts/instant-layer/actions/grant-delegation.js +42 -38
- package/dist/symmio-contracts/instant-layer/actions/grant-delegation.js.map +1 -1
- package/dist/symmio-contracts/instant-layer/actions/grant-delegations.d.ts +75 -0
- package/dist/symmio-contracts/instant-layer/actions/grant-delegations.d.ts.map +1 -0
- package/dist/symmio-contracts/instant-layer/actions/grant-delegations.js +46 -0
- package/dist/symmio-contracts/instant-layer/actions/grant-delegations.js.map +1 -0
- package/dist/symmio-contracts/instant-layer/actions/simulate-grant-delegations.d.ts +32 -0
- package/dist/symmio-contracts/instant-layer/actions/simulate-grant-delegations.d.ts.map +1 -0
- package/dist/symmio-contracts/instant-layer/actions/simulate-grant-delegations.js +18 -0
- package/dist/symmio-contracts/instant-layer/actions/simulate-grant-delegations.js.map +1 -0
- package/dist/symmio-contracts/instant-layer/grant-delegations-input.d.ts +33 -0
- package/dist/symmio-contracts/instant-layer/grant-delegations-input.d.ts.map +1 -0
- package/dist/symmio-contracts/instant-layer/grant-delegations-input.js +18 -0
- package/dist/symmio-contracts/instant-layer/grant-delegations-input.js.map +1 -0
- package/dist/symmio-contracts/instant-layer/index.d.ts +4 -0
- package/dist/symmio-contracts/instant-layer/index.d.ts.map +1 -1
- package/dist/symmio-contracts/instant-layer/query/grant-delegations.d.ts +22 -0
- package/dist/symmio-contracts/instant-layer/query/grant-delegations.d.ts.map +1 -0
- package/dist/symmio-contracts/instant-layer/query/grant-delegations.js +12 -0
- package/dist/symmio-contracts/instant-layer/query/grant-delegations.js.map +1 -0
- package/dist/symmio-contracts/instant-layer/query/simulate-grant-delegations.d.ts +19 -0
- package/dist/symmio-contracts/instant-layer/query/simulate-grant-delegations.d.ts.map +1 -0
- package/dist/symmio-contracts/instant-layer/query/simulate-grant-delegations.js +12 -0
- package/dist/symmio-contracts/instant-layer/query/simulate-grant-delegations.js.map +1 -0
- package/dist/symmio-contracts/symmio/actions/allocate.d.ts +3 -0
- package/dist/symmio-contracts/symmio/actions/allocate.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/actions/allocate.js +22 -16
- package/dist/symmio-contracts/symmio/actions/allocate.js.map +1 -1
- package/dist/symmio-contracts/symmio/actions/approve-operational-fee-allowance.d.ts +74 -0
- package/dist/symmio-contracts/symmio/actions/approve-operational-fee-allowance.d.ts.map +1 -0
- package/dist/symmio-contracts/symmio/actions/approve-operational-fee-allowance.js +36 -0
- package/dist/symmio-contracts/symmio/actions/approve-operational-fee-allowance.js.map +1 -0
- package/dist/symmio-contracts/symmio/actions/approve-operational-fee.d.ts +3 -0
- package/dist/symmio-contracts/symmio/actions/approve-operational-fee.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/actions/approve-operational-fee.js +32 -29
- package/dist/symmio-contracts/symmio/actions/approve-operational-fee.js.map +1 -1
- package/dist/symmio-contracts/symmio/actions/deallocate-and-initiate-withdraw.d.ts +3 -0
- 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 +37 -28
- package/dist/symmio-contracts/symmio/actions/deallocate-and-initiate-withdraw.js.map +1 -1
- package/dist/symmio-contracts/symmio/actions/deallocate.d.ts +3 -0
- package/dist/symmio-contracts/symmio/actions/deallocate.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/actions/deallocate.js +30 -20
- package/dist/symmio-contracts/symmio/actions/deallocate.js.map +1 -1
- package/dist/symmio-contracts/symmio/actions/initiate-withdraw.d.ts +5 -0
- package/dist/symmio-contracts/symmio/actions/initiate-withdraw.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/actions/initiate-withdraw.js +31 -18
- package/dist/symmio-contracts/symmio/actions/initiate-withdraw.js.map +1 -1
- package/dist/symmio-contracts/symmio/actions/withdraw-auto.d.ts +4 -0
- package/dist/symmio-contracts/symmio/actions/withdraw-auto.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/actions/withdraw-auto.js +30 -25
- package/dist/symmio-contracts/symmio/actions/withdraw-auto.js.map +1 -1
- package/dist/symmio-contracts/symmio/actions/withdraw.d.ts +4 -0
- package/dist/symmio-contracts/symmio/actions/withdraw.d.ts.map +1 -1
- package/dist/symmio-contracts/symmio/actions/withdraw.js +12 -8
- package/dist/symmio-contracts/symmio/actions/withdraw.js.map +1 -1
- package/dist/symmio-contracts/symmio/execute-account-calls/execute-account-calls.d.ts +48 -0
- package/dist/symmio-contracts/symmio/execute-account-calls/execute-account-calls.d.ts.map +1 -0
- package/dist/symmio-contracts/symmio/execute-account-calls/execute-account-calls.js +33 -0
- package/dist/symmio-contracts/symmio/execute-account-calls/execute-account-calls.js.map +1 -0
- package/dist/symmio-contracts/symmio/execute-account-calls/index.d.ts +3 -0
- package/dist/symmio-contracts/symmio/execute-account-calls/index.d.ts.map +1 -0
- package/dist/symmio-contracts/symmio/execute-account-calls/query.d.ts +23 -0
- package/dist/symmio-contracts/symmio/execute-account-calls/query.d.ts.map +1 -0
- package/dist/symmio-contracts/symmio/execute-account-calls/query.js +12 -0
- package/dist/symmio-contracts/symmio/execute-account-calls/query.js.map +1 -0
- package/dist/symmio-contracts/symmio/get-deallocate-debounce-time/get-deallocate-debounce-time.d.ts +22 -0
- package/dist/symmio-contracts/symmio/get-deallocate-debounce-time/get-deallocate-debounce-time.d.ts.map +1 -0
- package/dist/symmio-contracts/symmio/get-deallocate-debounce-time/get-deallocate-debounce-time.js +14 -0
- package/dist/symmio-contracts/symmio/get-deallocate-debounce-time/get-deallocate-debounce-time.js.map +1 -0
- package/dist/symmio-contracts/symmio/get-deallocate-debounce-time/index.d.ts +3 -0
- package/dist/symmio-contracts/symmio/get-deallocate-debounce-time/index.d.ts.map +1 -0
- package/dist/symmio-contracts/symmio/get-deallocate-debounce-time/query.d.ts +34 -0
- package/dist/symmio-contracts/symmio/get-deallocate-debounce-time/query.d.ts.map +1 -0
- package/dist/symmio-contracts/symmio/get-deallocate-debounce-time/query.js +21 -0
- package/dist/symmio-contracts/symmio/get-deallocate-debounce-time/query.js.map +1 -0
- package/dist/symmio-contracts/symmio/get-pending-withdraw-requests-batch/get-pending-withdraw-requests-batch.d.ts +34 -0
- package/dist/symmio-contracts/symmio/get-pending-withdraw-requests-batch/get-pending-withdraw-requests-batch.d.ts.map +1 -0
- package/dist/symmio-contracts/symmio/get-pending-withdraw-requests-batch/get-pending-withdraw-requests-batch.js +35 -0
- package/dist/symmio-contracts/symmio/get-pending-withdraw-requests-batch/get-pending-withdraw-requests-batch.js.map +1 -0
- package/dist/symmio-contracts/symmio/get-pending-withdraw-requests-batch/index.d.ts +3 -0
- package/dist/symmio-contracts/symmio/get-pending-withdraw-requests-batch/index.d.ts.map +1 -0
- package/dist/symmio-contracts/symmio/get-pending-withdraw-requests-batch/limit-concurrency.d.ts +15 -0
- package/dist/symmio-contracts/symmio/get-pending-withdraw-requests-batch/limit-concurrency.d.ts.map +1 -0
- package/dist/symmio-contracts/symmio/get-pending-withdraw-requests-batch/limit-concurrency.js +20 -0
- package/dist/symmio-contracts/symmio/get-pending-withdraw-requests-batch/limit-concurrency.js.map +1 -0
- package/dist/symmio-contracts/symmio/get-pending-withdraw-requests-batch/query.d.ts +22 -0
- package/dist/symmio-contracts/symmio/get-pending-withdraw-requests-batch/query.d.ts.map +1 -0
- package/dist/symmio-contracts/symmio/get-pending-withdraw-requests-batch/query.js +30 -0
- package/dist/symmio-contracts/symmio/get-pending-withdraw-requests-batch/query.js.map +1 -0
- package/dist/symmio-contracts/symmio/get-withdraw-cooldown-of/get-withdraw-cooldown-of.d.ts +30 -0
- package/dist/symmio-contracts/symmio/get-withdraw-cooldown-of/get-withdraw-cooldown-of.d.ts.map +1 -0
- package/dist/symmio-contracts/symmio/get-withdraw-cooldown-of/get-withdraw-cooldown-of.js +15 -0
- package/dist/symmio-contracts/symmio/get-withdraw-cooldown-of/get-withdraw-cooldown-of.js.map +1 -0
- package/dist/symmio-contracts/symmio/get-withdraw-cooldown-of/index.d.ts +3 -0
- package/dist/symmio-contracts/symmio/get-withdraw-cooldown-of/index.d.ts.map +1 -0
- package/dist/symmio-contracts/symmio/get-withdraw-cooldown-of/query.d.ts +38 -0
- package/dist/symmio-contracts/symmio/get-withdraw-cooldown-of/query.d.ts.map +1 -0
- package/dist/symmio-contracts/symmio/get-withdraw-cooldown-of/query.js +24 -0
- package/dist/symmio-contracts/symmio/get-withdraw-cooldown-of/query.js.map +1 -0
- package/dist/symmio-contracts/symmio/index.d.ts +6 -0
- package/dist/symmio-contracts/symmio/index.d.ts.map +1 -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 +35 -34
- package/dist/symmio-contracts/symmio/internal/call-as-sub-account.js.map +1 -1
- package/dist/symmio-contracts/symmio/internal/resolve-default-operational-fee-charger.d.ts +18 -0
- package/dist/symmio-contracts/symmio/internal/resolve-default-operational-fee-charger.d.ts.map +1 -0
- package/dist/symmio-contracts/symmio/internal/resolve-default-operational-fee-charger.js +14 -0
- package/dist/symmio-contracts/symmio/internal/resolve-default-operational-fee-charger.js.map +1 -0
- package/dist/symmio-contracts/symmio/query/approve-operational-fee-allowance.d.ts +18 -0
- package/dist/symmio-contracts/symmio/query/approve-operational-fee-allowance.d.ts.map +1 -0
- package/dist/symmio-contracts/symmio/query/approve-operational-fee-allowance.js +12 -0
- package/dist/symmio-contracts/symmio/query/approve-operational-fee-allowance.js.map +1 -0
- package/dist/symmio-subgraph/executeSubgraphRequest.js +3 -3
- package/dist/timelock/approval.d.ts +142 -0
- package/dist/timelock/approval.d.ts.map +1 -0
- package/dist/timelock/approval.js +176 -0
- package/dist/timelock/approval.js.map +1 -0
- package/dist/timelock/attempt-outcome.d.ts +37 -0
- package/dist/timelock/attempt-outcome.d.ts.map +1 -0
- package/dist/timelock/attempt-outcome.js +70 -0
- package/dist/timelock/attempt-outcome.js.map +1 -0
- package/dist/timelock/confirm-write.d.ts +5 -0
- package/dist/timelock/confirm-write.d.ts.map +1 -0
- package/dist/timelock/confirm-write.js +18 -0
- package/dist/timelock/confirm-write.js.map +1 -0
- package/dist/timelock/early-withdraw/early-withdraw.d.ts +60 -0
- package/dist/timelock/early-withdraw/early-withdraw.d.ts.map +1 -0
- package/dist/timelock/early-withdraw/early-withdraw.js +94 -0
- package/dist/timelock/early-withdraw/early-withdraw.js.map +1 -0
- package/dist/timelock/early-withdraw/index.d.ts +2 -0
- package/dist/timelock/early-withdraw/index.d.ts.map +1 -0
- package/dist/timelock/errors.d.ts +23 -0
- package/dist/timelock/errors.d.ts.map +1 -0
- package/dist/timelock/errors.js +29 -0
- package/dist/timelock/errors.js.map +1 -0
- package/dist/timelock/execute-protected-batch.d.ts +31 -0
- package/dist/timelock/execute-protected-batch.d.ts.map +1 -0
- package/dist/timelock/execute-protected-batch.js +148 -0
- package/dist/timelock/execute-protected-batch.js.map +1 -0
- package/dist/timelock/execute-protected-call.d.ts +68 -0
- package/dist/timelock/execute-protected-call.d.ts.map +1 -0
- package/dist/timelock/execute-protected-call.js +146 -0
- package/dist/timelock/execute-protected-call.js.map +1 -0
- package/dist/timelock/execute-protected-function.d.ts +51 -0
- package/dist/timelock/execute-protected-function.d.ts.map +1 -0
- package/dist/timelock/execute-protected-function.js +37 -0
- package/dist/timelock/execute-protected-function.js.map +1 -0
- package/dist/timelock/get-timelock-policy/get-timelock-policy.d.ts +38 -0
- package/dist/timelock/get-timelock-policy/get-timelock-policy.d.ts.map +1 -0
- package/dist/timelock/get-timelock-policy/get-timelock-policy.js +49 -0
- package/dist/timelock/get-timelock-policy/get-timelock-policy.js.map +1 -0
- package/dist/timelock/get-timelock-policy/index.d.ts +3 -0
- package/dist/timelock/get-timelock-policy/index.d.ts.map +1 -0
- package/dist/timelock/get-timelock-policy/query.d.ts +13 -0
- package/dist/timelock/get-timelock-policy/query.d.ts.map +1 -0
- package/dist/timelock/get-timelock-policy/query.js +21 -0
- package/dist/timelock/get-timelock-policy/query.js.map +1 -0
- package/dist/timelock/index.d.ts +14 -0
- package/dist/timelock/index.d.ts.map +1 -0
- package/dist/timelock/normalize-timelock-revert.d.ts +3 -0
- package/dist/timelock/normalize-timelock-revert.d.ts.map +1 -0
- package/dist/timelock/normalize-timelock-revert.js +11 -0
- package/dist/timelock/normalize-timelock-revert.js.map +1 -0
- package/dist/timelock/policy-change.d.ts +72 -0
- package/dist/timelock/policy-change.d.ts.map +1 -0
- package/dist/timelock/policy-change.js +63 -0
- package/dist/timelock/policy-change.js.map +1 -0
- package/dist/timelock/policy.d.ts +19 -0
- package/dist/timelock/policy.d.ts.map +1 -0
- package/dist/timelock/policy.js +59 -0
- package/dist/timelock/policy.js.map +1 -0
- package/dist/timelock/protected-call-preflight.d.ts +10 -0
- package/dist/timelock/protected-call-preflight.d.ts.map +1 -0
- package/dist/timelock/protected-call-preflight.js +17 -0
- package/dist/timelock/protected-call-preflight.js.map +1 -0
- package/dist/timelock/root-account.d.ts +14 -0
- package/dist/timelock/root-account.d.ts.map +1 -0
- package/dist/timelock/root-account.js +9 -0
- package/dist/timelock/root-account.js.map +1 -0
- package/dist/timelock/scheduled-call-match.d.ts +4 -0
- package/dist/timelock/scheduled-call-match.d.ts.map +1 -0
- package/dist/timelock/scheduled-call-match.js +43 -0
- package/dist/timelock/scheduled-call-match.js.map +1 -0
- package/dist/timelock/setup-timelock-policy/index.d.ts +2 -0
- package/dist/timelock/setup-timelock-policy/index.d.ts.map +1 -0
- package/dist/timelock/setup-timelock-policy/setup-timelock-policy.d.ts +46 -0
- package/dist/timelock/setup-timelock-policy/setup-timelock-policy.d.ts.map +1 -0
- package/dist/timelock/setup-timelock-policy/setup-timelock-policy.js +58 -0
- package/dist/timelock/setup-timelock-policy/setup-timelock-policy.js.map +1 -0
- package/dist/timelock/support.d.ts +4 -0
- package/dist/timelock/support.d.ts.map +1 -0
- package/dist/timelock/support.js +9 -0
- package/dist/timelock/support.js.map +1 -0
- package/dist/transactions/execute-contract-write.d.ts +9 -0
- package/dist/transactions/execute-contract-write.d.ts.map +1 -0
- package/dist/transactions/execute-contract-write.js +35 -0
- package/dist/transactions/execute-contract-write.js.map +1 -0
- package/dist/transactions/execute-write.d.ts +32 -0
- package/dist/transactions/execute-write.d.ts.map +1 -0
- package/dist/transactions/execute-write.js +23 -0
- package/dist/transactions/execute-write.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { SymmError as e } from "../../../shared/errors/symm-error.js";
|
|
2
|
+
import { watchEnigmaPrices as t } from "../../../websocket/prices/watch-enigma-prices.js";
|
|
3
|
+
import { floorLowcapCandleTime as n, shiftLowcapCandleTime as r } from "./lowcap-candle-time.js";
|
|
4
|
+
//#region src/candles/sources/lowcap/watch-lowcap-candles.ts
|
|
5
|
+
function i(e, t) {
|
|
6
|
+
return e?.time === t?.time && e?.open === t?.open && e?.high === t?.high && e?.low === t?.low && e?.close === t?.close && e?.volume === t?.volume;
|
|
7
|
+
}
|
|
8
|
+
function a(a, o) {
|
|
9
|
+
let { marketName: s, resolution: c, onCandle: l, onReset: u, onError: d, refreshIntervalMs: f } = o, p = !0, m = !1, h, g, _ = -Infinity, v = -Infinity, y = -Infinity, b = /* @__PURE__ */ new Map(), x, S = !1, C = [], w = [], T, E, D = Date.now();
|
|
10
|
+
function O(t) {
|
|
11
|
+
p && d?.(t instanceof e ? t : new e("api", "LOWCAP_CANDLE_STREAM_ERROR", t instanceof Error ? t.message : String(t)));
|
|
12
|
+
}
|
|
13
|
+
function k(e, t = !1) {
|
|
14
|
+
if (!p || e.time < y || !o.includeFlat && x !== void 0 && e.volume === 0 && [
|
|
15
|
+
e.open,
|
|
16
|
+
e.high,
|
|
17
|
+
e.low,
|
|
18
|
+
e.close
|
|
19
|
+
].every((e) => e === x)) return;
|
|
20
|
+
y = e.time, b.set(e.time, { ...e });
|
|
21
|
+
let n = b.keys().next().value;
|
|
22
|
+
b.size > 2 && n !== void 0 && b.delete(n), l({ ...e }, { closed: t });
|
|
23
|
+
}
|
|
24
|
+
function A(e) {
|
|
25
|
+
if (e.name !== s || e.address && e.address !== h) return;
|
|
26
|
+
let t = Number(e.markPrice), r = e.time;
|
|
27
|
+
if (!Number.isFinite(t) || t <= 0 || r === void 0 || !Number.isSafeInteger(r) || r < _) return;
|
|
28
|
+
let i = n(r, c);
|
|
29
|
+
g && i < g.time || (_ = r, !g || i > g.time ? (g && (k(g, !0), x = g.close), g = {
|
|
30
|
+
time: i,
|
|
31
|
+
open: t,
|
|
32
|
+
high: t,
|
|
33
|
+
low: t,
|
|
34
|
+
close: t,
|
|
35
|
+
volume: 0
|
|
36
|
+
}) : g = {
|
|
37
|
+
...g,
|
|
38
|
+
high: Math.max(g.high, t),
|
|
39
|
+
low: Math.min(g.low, t),
|
|
40
|
+
close: t
|
|
41
|
+
}, k(g));
|
|
42
|
+
}
|
|
43
|
+
async function j() {
|
|
44
|
+
if (!p || T) return;
|
|
45
|
+
let e = new AbortController();
|
|
46
|
+
T = e;
|
|
47
|
+
let t = v;
|
|
48
|
+
C = [];
|
|
49
|
+
try {
|
|
50
|
+
if (h ??= await o.resolveAddress(e.signal), !p || e.signal.aborted) return;
|
|
51
|
+
let a = Date.now(), s = r(n(a, c), c, -1), l = await o.getHistory(h, {
|
|
52
|
+
from: s,
|
|
53
|
+
to: a + 1,
|
|
54
|
+
signal: e.signal
|
|
55
|
+
});
|
|
56
|
+
if (!p || e.signal.aborted) return;
|
|
57
|
+
let d = l.candles, f = w.some((e) => e.time === y && e.time >= s) && !d.some((e) => e.time === y), m = [...new Set([...w, ...d].map((e) => e.time))].filter((e) => e >= s && e < y && !i(b.get(e) ?? w.find((t) => t.time === e), d.find((t) => t.time === e)));
|
|
58
|
+
f && m.push(y), S && a - D >= 36e5 ? (D = a, u?.()) : S && m.length > 0 && u?.({
|
|
59
|
+
from: Math.min(...m),
|
|
60
|
+
to: r(Math.max(...m), c, 1)
|
|
61
|
+
}), w = d;
|
|
62
|
+
for (let e of b.keys()) {
|
|
63
|
+
if (e < s || e >= y) continue;
|
|
64
|
+
let t = d.find((t) => t.time === e);
|
|
65
|
+
t ? b.set(e, t) : b.delete(e);
|
|
66
|
+
}
|
|
67
|
+
f && (g = void 0);
|
|
68
|
+
let T = d.at(-1);
|
|
69
|
+
T && (!g || T.time >= g.time) && (g && T.time > g.time && k(d.find((e) => e.time === g?.time) ?? g, !0), g = { ...T }, x = d.at(-2)?.close, k(g, r(g.time, c, 1) <= v)), S = !0;
|
|
70
|
+
let E = C;
|
|
71
|
+
C = [], _ = Math.max(t, T?.time ?? -Infinity);
|
|
72
|
+
for (let e of E) e.time !== void 0 && e.time >= t && A(e);
|
|
73
|
+
} catch (t) {
|
|
74
|
+
e.signal.aborted || (S && (C = []), O(t));
|
|
75
|
+
} finally {
|
|
76
|
+
T === e && (T = void 0, p && (E = setTimeout(() => {
|
|
77
|
+
j();
|
|
78
|
+
}, f)));
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
let M = t(a, {
|
|
82
|
+
chainId: o.chainId,
|
|
83
|
+
solverId: o.solverId,
|
|
84
|
+
names: [s],
|
|
85
|
+
onPrices(e) {
|
|
86
|
+
if (p) for (let t of e) {
|
|
87
|
+
if (t.name !== s || h && t.address && t.address !== h) continue;
|
|
88
|
+
let e = Number(t.markPrice);
|
|
89
|
+
t.time === void 0 || !Number.isSafeInteger(t.time) || !Number.isFinite(e) || e <= 0 || t.time < v || (v = t.time, (T || !S) && (C.length >= 1e3 && (C = [], S = !1, g = void 0, T?.abort(), T = void 0, clearTimeout(E), u?.(), j()), C.push(t)), S && A(t));
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
onStatusChange(e) {
|
|
93
|
+
p && (o.onStatusChange?.(e), e === "open" && (m && (T?.abort(), T = void 0, clearTimeout(E), C = [], S = !1, g = void 0, w = [], b.clear(), _ = -Infinity, v = -Infinity, u?.(), j()), m = !0));
|
|
94
|
+
},
|
|
95
|
+
onError: O
|
|
96
|
+
});
|
|
97
|
+
return j(), () => {
|
|
98
|
+
p = !1, clearTimeout(E), T?.abort(), C = [], M();
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
//#endregion
|
|
102
|
+
export { a as watchLowcapCandles };
|
|
103
|
+
|
|
104
|
+
//# sourceMappingURL=watch-lowcap-candles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watch-lowcap-candles.js","names":[],"sources":["../../../../src/candles/sources/lowcap/watch-lowcap-candles.ts"],"sourcesContent":["import type { SolverId } from \"../../../core/chains/types\";\nimport type { Config } from \"../../../core/config\";\nimport { SymmError } from \"../../../shared/errors/symm-error\";\nimport type { EnigmaPriceTick } from \"../../../websocket/prices/types\";\nimport { watchEnigmaPrices } from \"../../../websocket/prices/watch-enigma-prices\";\nimport type { Candle, GetCandlesReturnType, WatchCandlesParameters } from \"../../types\";\nimport { floorLowcapCandleTime, shiftLowcapCandleTime } from \"./lowcap-candle-time\";\n\ninterface Parameters extends WatchCandlesParameters {\n chainId?: number;\n solverId?: SolverId;\n includeFlat: boolean;\n refreshIntervalMs: number;\n resolveAddress: (signal: AbortSignal) => Promise<string>;\n getHistory: (\n address: string,\n range: { from: number; to: number; signal: AbortSignal },\n ) => Promise<GetCandlesReturnType>;\n}\n\nfunction equalCandle(a: Candle | undefined, b: Candle | undefined): boolean {\n return (\n a?.time === b?.time &&\n a?.open === b?.open &&\n a?.high === b?.high &&\n a?.low === b?.low &&\n a?.close === b?.close &&\n a?.volume === b?.volume\n );\n}\n\n/** Seed from OHLCV, apply timestamped price ticks, and reconcile without caching final history. @internal */\nexport function watchLowcapCandles(config: Config, parameters: Parameters): () => void {\n const { marketName, resolution, onCandle, onReset, onError, refreshIntervalMs } = parameters;\n let active = true;\n let opened = false;\n let address: string | undefined;\n let current: Candle | undefined;\n let lastTickTime = -Infinity;\n let lastReceivedTickTime = -Infinity;\n let lastEmittedTime = -Infinity;\n const emittedHistory = new Map<number, Candle>();\n let previousClose: number | undefined;\n let seeded = false;\n let pending: EnigmaPriceTick[] = [];\n let previousHistory: Candle[] = [];\n let controller: AbortController | undefined;\n let timer: ReturnType<typeof setTimeout> | undefined;\n let lastReset = Date.now();\n\n function report(error: unknown) {\n if (!active) return;\n onError?.(\n error instanceof SymmError\n ? error\n : new SymmError(\"api\", \"LOWCAP_CANDLE_STREAM_ERROR\", error instanceof Error ? error.message : String(error)),\n );\n }\n\n function emit(candle: Candle, closed = false) {\n if (!active || candle.time < lastEmittedTime) return;\n if (\n !parameters.includeFlat &&\n previousClose !== undefined &&\n candle.volume === 0 &&\n [candle.open, candle.high, candle.low, candle.close].every((price) => price === previousClose)\n )\n return;\n lastEmittedTime = candle.time;\n emittedHistory.set(candle.time, { ...candle });\n const oldest = emittedHistory.keys().next().value;\n if (emittedHistory.size > 2 && oldest !== undefined) emittedHistory.delete(oldest);\n onCandle({ ...candle }, { closed });\n }\n\n function applyTick(tick: EnigmaPriceTick) {\n if (tick.name !== marketName || (tick.address && tick.address !== address)) return;\n const price = Number(tick.markPrice);\n const time = tick.time;\n if (\n !Number.isFinite(price) ||\n price <= 0 ||\n time === undefined ||\n !Number.isSafeInteger(time) ||\n time < lastTickTime\n )\n return;\n const start = floorLowcapCandleTime(time, resolution);\n if (current && start < current.time) return;\n lastTickTime = time;\n if (!current || start > current.time) {\n if (current) {\n emit(current, true);\n previousClose = current.close;\n }\n current = { time: start, open: price, high: price, low: price, close: price, volume: 0 };\n } else {\n current = { ...current, high: Math.max(current.high, price), low: Math.min(current.low, price), close: price };\n }\n emit(current);\n }\n\n async function refresh() {\n if (!active || controller) return;\n const request = new AbortController();\n controller = request;\n const tickTimeAtStart = lastReceivedTickTime;\n pending = [];\n try {\n address ??= await parameters.resolveAddress(request.signal);\n if (!active || request.signal.aborted) return;\n const now = Date.now();\n const from = shiftLowcapCandleTime(floorLowcapCandleTime(now, resolution), resolution, -1);\n const result = await parameters.getHistory(address, { from, to: now + 1, signal: request.signal });\n if (!active || request.signal.aborted) return;\n const history = result.candles;\n const removedCurrent =\n previousHistory.some((bar) => bar.time === lastEmittedTime && bar.time >= from) &&\n !history.some((bar) => bar.time === lastEmittedTime);\n const times = new Set([...previousHistory, ...history].map((candle) => candle.time));\n const corrected = [...times].filter(\n (time) =>\n time >= from &&\n time < lastEmittedTime &&\n !equalCandle(\n emittedHistory.get(time) ?? previousHistory.find((bar) => bar.time === time),\n history.find((bar) => bar.time === time),\n ),\n );\n if (removedCurrent) corrected.push(lastEmittedTime);\n /** Unknown historical backfills still require a full hourly reconciliation. */\n if (seeded && now - lastReset >= 3_600_000) {\n lastReset = now;\n onReset?.();\n } else if (seeded && corrected.length > 0) {\n onReset?.({\n from: Math.min(...corrected),\n to: shiftLowcapCandleTime(Math.max(...corrected), resolution, 1),\n });\n }\n previousHistory = history;\n /** A reset replaces these snapshots; do not report the same correction again. */\n for (const time of emittedHistory.keys()) {\n if (time < from || time >= lastEmittedTime) continue;\n const snapshot = history.find((bar) => bar.time === time);\n if (snapshot) emittedHistory.set(time, snapshot);\n else emittedHistory.delete(time);\n }\n if (removedCurrent) current = undefined;\n const latest = history.at(-1);\n if (latest && (!current || latest.time >= current.time)) {\n if (current && latest.time > current.time) {\n emit(history.find((bar) => bar.time === current?.time) ?? current, true);\n }\n current = { ...latest };\n previousClose = history.at(-2)?.close;\n emit(current, shiftLowcapCandleTime(current.time, resolution, 1) <= lastReceivedTickTime);\n }\n seeded = true;\n const buffered = pending;\n pending = [];\n /** Compare service timestamps with other service timestamps, never the client's clock. */\n lastTickTime = Math.max(tickTimeAtStart, latest?.time ?? -Infinity);\n for (const tick of buffered) {\n if (tick.time !== undefined && tick.time >= tickTimeAtStart) applyTick(tick);\n }\n } catch (error) {\n if (!request.signal.aborted) {\n if (seeded) pending = [];\n report(error);\n }\n } finally {\n if (controller === request) {\n controller = undefined;\n if (active)\n timer = setTimeout(() => {\n void refresh();\n }, refreshIntervalMs);\n }\n }\n }\n\n const unwatch = watchEnigmaPrices(config, {\n chainId: parameters.chainId,\n solverId: parameters.solverId,\n names: [marketName],\n onPrices(ticks) {\n if (!active) return;\n for (const tick of ticks) {\n if (tick.name !== marketName || (address && tick.address && tick.address !== address)) continue;\n const price = Number(tick.markPrice);\n if (\n tick.time === undefined ||\n !Number.isSafeInteger(tick.time) ||\n !Number.isFinite(price) ||\n price <= 0 ||\n tick.time < lastReceivedTickTime\n )\n continue;\n lastReceivedTickTime = tick.time;\n if (controller || !seeded) {\n // Bounded buffering while HTTP is in flight. If it overflows, reseed\n // from HTTP rather than constructing an OHLC bar from incomplete ticks.\n if (pending.length >= 1_000) {\n pending = [];\n seeded = false;\n current = undefined;\n controller?.abort();\n controller = undefined;\n clearTimeout(timer);\n onReset?.();\n void refresh();\n }\n pending.push(tick);\n }\n if (seeded) applyTick(tick);\n }\n },\n onStatusChange(status) {\n if (!active) return;\n parameters.onStatusChange?.(status);\n if (status === \"open\") {\n if (opened) {\n controller?.abort();\n controller = undefined;\n clearTimeout(timer);\n pending = [];\n seeded = false;\n current = undefined;\n previousHistory = [];\n emittedHistory.clear();\n lastTickTime = -Infinity;\n lastReceivedTickTime = -Infinity;\n onReset?.();\n void refresh();\n }\n opened = true;\n }\n },\n onError: report,\n });\n void refresh();\n\n return () => {\n active = false;\n clearTimeout(timer);\n controller?.abort();\n pending = [];\n unwatch();\n };\n}\n"],"mappings":";;;;AAoBA,SAAS,EAAY,GAAuB,GAAgC;CAC1E,OACE,GAAG,SAAS,GAAG,QACf,GAAG,SAAS,GAAG,QACf,GAAG,SAAS,GAAG,QACf,GAAG,QAAQ,GAAG,OACd,GAAG,UAAU,GAAG,SAChB,GAAG,WAAW,GAAG;AAErB;AAGA,SAAgB,EAAmB,GAAgB,GAAoC;CACrF,IAAM,EAAE,eAAY,eAAY,aAAU,YAAS,YAAS,yBAAsB,GAC9E,IAAS,IACT,IAAS,IACT,GACA,GACA,IAAe,WACf,IAAuB,WACvB,IAAkB,WAChB,oBAAiB,IAAI,IAAoB,GAC3C,GACA,IAAS,IACT,IAA6B,CAAC,GAC9B,IAA4B,CAAC,GAC7B,GACA,GACA,IAAY,KAAK,IAAI;CAEzB,SAAS,EAAO,GAAgB;EACzB,KACL,IACE,aAAiB,IACb,IACA,IAAI,EAAU,OAAO,8BAA8B,aAAiB,QAAQ,EAAM,UAAU,OAAO,CAAK,CAAC,CA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GACX,IAAS,IACT,IAAU,KAAA,GACV,GAAY,MAAM,GAClB,IAAa,KAAA,GACb,aAAa,CAAK,GAClB,IAAU,GACV,EAAa,IAEf,EAAQ,KAAK,CAAI,IAEf,KAAQ,EAAU,CAAI;GAC5B;EACF;EACA,eAAe,GAAQ;GAChB,MACL,EAAW,iBAAiB,CAAM,GAC9B,MAAW,WACT,MACF,GAAY,MAAM,GAClB,IAAa,KAAA,GACb,aAAa,CAAK,GAClB,IAAU,CAAC,GACX,IAAS,IACT,IAAU,KAAA,GACV,IAAkB,CAAC,GACnB,EAAe,MAAM,GACrB,IAAe,WACf,IAAuB,WACvB,IAAU,GACV,EAAa,IAEf,IAAS;EAEb;EACA,SAAS;CACX,CAAC;CAGD,OAFA,EAAa,SAEA;EAKX,AAJA,IAAS,IACT,aAAa,CAAK,GAClB,GAAY,MAAM,GAClB,IAAU,CAAC,GACX,EAAQ;CACV;AACF"}
|
package/dist/candles/types.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { SocketStatus } from '../websocket/socket/index.js';
|
|
|
9
9
|
* the subset it can actually serve via {@link CandleSource.supportedResolutions}
|
|
10
10
|
* — no venue supports all of them.
|
|
11
11
|
*/
|
|
12
|
-
export type CandleResolution = "1s" | "10s" | "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "1d" | "3d" | "1w" | "1M";
|
|
12
|
+
export type CandleResolution = "1s" | "10s" | "1m" | "3m" | "5m" | "10m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "1d" | "3d" | "1w" | "1M";
|
|
13
13
|
/**
|
|
14
14
|
* What the prices in a candle series actually represent.
|
|
15
15
|
*
|
|
@@ -20,8 +20,9 @@ export type CandleResolution = "1s" | "10s" | "1m" | "3m" | "5m" | "15m" | "30m"
|
|
|
20
20
|
* - `reference-exchange` — mark price of a third-party perp venue (e.g. Binance USD-M).
|
|
21
21
|
* - `dex-pool` — spot price of an on-chain liquidity pool, USD-denominated.
|
|
22
22
|
* - `solver-mark` — the SYMMIO solver's own mark price, the basis execution settles against.
|
|
23
|
+
* - `price-service` — the configured price service's OHLCV series and provisional live prices.
|
|
23
24
|
*/
|
|
24
|
-
export type CandlePriceBasis = "reference-exchange" | "dex-pool" | "solver-mark";
|
|
25
|
+
export type CandlePriceBasis = "reference-exchange" | "dex-pool" | "solver-mark" | "price-service";
|
|
25
26
|
/**
|
|
26
27
|
* A single OHLCV bar.
|
|
27
28
|
*
|
|
@@ -42,8 +43,10 @@ export interface Candle {
|
|
|
42
43
|
/** Closing price — the latest price while the bar is still in progress. */
|
|
43
44
|
close: number;
|
|
44
45
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
46
|
+
* Volume over the bar, in the unit reported by {@link CandleSymbol.volumeUnit}
|
|
47
|
+
* and {@link CandleSymbol.volumeCurrency}. Sources may report base-asset or
|
|
48
|
+
* quote-currency volume (for example USD). `0` can mean no traded volume or
|
|
49
|
+
* no volume data; it does not identify the unit.
|
|
47
50
|
*/
|
|
48
51
|
volume: number;
|
|
49
52
|
}
|
|
@@ -62,6 +65,10 @@ export interface CandleSymbol {
|
|
|
62
65
|
pricePrecision: number;
|
|
63
66
|
/** Decimal places volume should be rendered at. */
|
|
64
67
|
volumePrecision: number;
|
|
68
|
+
/** Whether volume measures the base asset or quote currency. Absent means unspecified. */
|
|
69
|
+
volumeUnit?: "base" | "quote";
|
|
70
|
+
/** Currency of the volume values (e.g. `"BTC"` or `"USD"`), when known. */
|
|
71
|
+
volumeCurrency?: string;
|
|
65
72
|
}
|
|
66
73
|
/**
|
|
67
74
|
* Parameters for {@link CandleSource.getCandles}.
|
|
@@ -90,9 +97,11 @@ export interface GetCandlesReturnType {
|
|
|
90
97
|
/** Bars in ascending time order, de-duplicated and clipped to the requested range. */
|
|
91
98
|
candles: Candle[];
|
|
92
99
|
/**
|
|
93
|
-
* `true` when the source
|
|
94
|
-
*
|
|
95
|
-
*
|
|
100
|
+
* `true` when the source confirms there is no earlier history to page into.
|
|
101
|
+
* A chart paging backwards should stop when it sees this. The result can
|
|
102
|
+
* still contain candles, including the instrument's earliest available bar.
|
|
103
|
+
* `false` also covers unknown exhaustion when a provider supplies no boundary
|
|
104
|
+
* metadata. An empty window alone is not proof that older history is absent.
|
|
96
105
|
*/
|
|
97
106
|
noMoreData: boolean;
|
|
98
107
|
}
|
|
@@ -101,11 +110,18 @@ export interface GetCandlesReturnType {
|
|
|
101
110
|
*/
|
|
102
111
|
export interface CandleUpdateMeta {
|
|
103
112
|
/**
|
|
104
|
-
* `true` when
|
|
105
|
-
*
|
|
113
|
+
* `true` when the bar's interval has ended; `false` while it is forming.
|
|
114
|
+
* A provider may still correct a completed bar later.
|
|
106
115
|
*/
|
|
107
116
|
closed: boolean;
|
|
108
117
|
}
|
|
118
|
+
/** A candle-start range in Unix milliseconds, inclusive at `from` and exclusive at `to`. */
|
|
119
|
+
export interface CandleHistoryRange {
|
|
120
|
+
/** Inclusive start of the requested or corrected window. */
|
|
121
|
+
from: number;
|
|
122
|
+
/** Exclusive end of the requested or corrected window. */
|
|
123
|
+
to: number;
|
|
124
|
+
}
|
|
109
125
|
/**
|
|
110
126
|
* Parameters for {@link CandleSource.watchCandles}.
|
|
111
127
|
*/
|
|
@@ -120,11 +136,12 @@ export interface WatchCandlesParameters {
|
|
|
120
136
|
*/
|
|
121
137
|
onCandle: (candle: Candle, meta: CandleUpdateMeta) => void;
|
|
122
138
|
/**
|
|
123
|
-
* Called after a reconnect
|
|
124
|
-
*
|
|
125
|
-
*
|
|
139
|
+
* Called after a reconnect or historical correction. When supplied, `range`
|
|
140
|
+
* identifies corrected candle starts; refresh loaded windows intersecting it.
|
|
141
|
+
* Without a range, refresh all retained history. Handlers may ignore the range
|
|
142
|
+
* and perform a full reset, including adapters that cannot refresh a subset.
|
|
126
143
|
*/
|
|
127
|
-
onReset?: () => void;
|
|
144
|
+
onReset?: (range?: CandleHistoryRange) => void;
|
|
128
145
|
/** Called whenever the underlying connection status changes. */
|
|
129
146
|
onStatusChange?: (status: SocketStatus) => void;
|
|
130
147
|
/** Called on a transport or parse error; does not stop the subscription. */
|
|
@@ -139,9 +156,8 @@ export interface WatchCandlesParameters {
|
|
|
139
156
|
* (`toTradingViewDatafeed`) and framework hooks (`useCandles`) are written
|
|
140
157
|
* against this interface, never against a specific venue.
|
|
141
158
|
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
* is the consumer's choice. Construct one and pass it in explicitly.
|
|
159
|
+
* Construct a source explicitly. Reference exchanges have their own endpoints;
|
|
160
|
+
* deployment-specific sources can resolve their endpoints from {@link Config}.
|
|
145
161
|
*
|
|
146
162
|
* @example
|
|
147
163
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/candles/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gDAAgD,CAAC;AAC9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GACxB,IAAI,GACJ,KAAK,GACL,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,KAAK,GACL,KAAK,GACL,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,KAAK,GACL,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,CAAC;AAET
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/candles/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gDAAgD,CAAC;AAC9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD;;;;;;;GAO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BAAgB,EAAE,CAAC;IAC3D;;;;OAIG;IACH,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC;;;;;OAKG;IACH,SAAS,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAAC;IACjE;;;;OAIG;IACH,UAAU,CAAC,UAAU,EAAE,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC5E;;;;;;OAMG;IACH,YAAY,CAAC,CAAC,UAAU,EAAE,sBAAsB,GAAG,OAAO,CAAC;CAC5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/core/chains/registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/core/chains/registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAiK3D,CAAC"}
|
|
@@ -4,6 +4,7 @@ var t = {
|
|
|
4
4
|
[e.BASE]: {
|
|
5
5
|
chainId: e.BASE,
|
|
6
6
|
contractsVersion: "0.8.5",
|
|
7
|
+
timelockSupported: !1,
|
|
7
8
|
addresses: {
|
|
8
9
|
symmioAddress: "0x91Cf2D8Ed503EC52768999aA6D8DBeA6e52dbe43",
|
|
9
10
|
instantLayerAddress: "0x0825435285ac0E5c02c7a7c443F631f3e07fE375",
|
|
@@ -35,8 +36,7 @@ var t = {
|
|
|
35
36
|
muon: { urls: [
|
|
36
37
|
"https://muon-oracle1.rasa.capital/v1/",
|
|
37
38
|
"https://muon-oracle2.rasa.capital/v1/",
|
|
38
|
-
"https://muon-oracle3.rasa.capital/v1/"
|
|
39
|
-
"https://muon-oracle4.rasa.capital/v1/"
|
|
39
|
+
"https://muon-oracle3.rasa.capital/v1/"
|
|
40
40
|
] }
|
|
41
41
|
},
|
|
42
42
|
[e.ARBITRUM]: {
|
|
@@ -74,7 +74,7 @@ var t = {
|
|
|
74
74
|
url: "wss://notification.rasa.capital/ws/v1/subscribe",
|
|
75
75
|
channel: "Arbitrum_Solver-Low-Cap_Production",
|
|
76
76
|
protocol: "enigma",
|
|
77
|
-
searchUrl: "https://notification.rasa.capital
|
|
77
|
+
searchUrl: "https://notification.rasa.capital"
|
|
78
78
|
},
|
|
79
79
|
capabilities: {
|
|
80
80
|
groupClose: !0,
|
|
@@ -90,8 +90,7 @@ var t = {
|
|
|
90
90
|
muon: { urls: [
|
|
91
91
|
"https://muon-oracle1.rasa.capital/v1/",
|
|
92
92
|
"https://muon-oracle2.rasa.capital/v1/",
|
|
93
|
-
"https://muon-oracle3.rasa.capital/v1/"
|
|
94
|
-
"https://muon-oracle4.rasa.capital/v1/"
|
|
93
|
+
"https://muon-oracle3.rasa.capital/v1/"
|
|
95
94
|
] },
|
|
96
95
|
listing: { url: "https://listing85.enigma.bz" },
|
|
97
96
|
inventory: { url: "https://inventory85.enigma.bz" }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","names":[],"sources":["../../../src/core/chains/registry.ts"],"sourcesContent":["import { SymmioSupportedChainId } from \"./supported-chains\";\nimport type { SymmioChainConfig } from \"./types\";\n\n/**\n * Built-in SYMMIO deployment configs keyed by chain ID.\n *\n * @internal\n */\nexport const CHAIN_CONFIGS: Record<number, SymmioChainConfig> = {\n [SymmioSupportedChainId.BASE]: {\n chainId: SymmioSupportedChainId.BASE,\n contractsVersion: \"0.8.5\",\n addresses: {\n symmioAddress: \"0x91Cf2D8Ed503EC52768999aA6D8DBeA6e52dbe43\",\n instantLayerAddress: \"0x0825435285ac0E5c02c7a7c443F631f3e07fE375\",\n accountLayerAddress: \"0x56caf00c6C5cB5478570Bb23807B9d1D697863DC\",\n affiliatesAddress: \"0x45Eecd7B4f442388ACD90467E423A5CAAC3a9C3f\",\n collateralAddress: \"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913\", // USDC on Base\n collateralDecimals: 6,\n },\n // Rasa — Base's real solver. Rasa's API shares Enigma's paths for the\n // shared reads (contract-symbols, funding, locked params, error codes,\n // notional_cap/{id}, instant lists), so those work today; the diverging\n // endpoints (`/instant_trade/open|close` execution, `/estimated-price`,\n // `/notional_cap` list) return 404 until per-kind dispatch is wired into\n // the solver actions.\n // No `tpsl` block: Base COH deployment not confirmed yet — absence marks\n // conditional orders unsupported (add the block when the vendor provides it).\n solvers: {\n rasa: {\n name: \"Rasa\",\n address: \"0x81631953E0C093e72935C1CAA4C7D519B2A0E407\",\n // Staging URL — swap to the production solver URL when published.\n url: \"https://stage-archon.rasa.capital\",\n // Rasa's own position-state stream — real Base data. No `searchUrl`: the\n // rasa protocol serves notification history from the solver's own\n // position-state endpoint (via `searchNotifications`), not a REST service.\n notifications: {\n url: \"wss://stage-archon.rasa.capital/ws/position-state-ws3\",\n protocol: \"rasa\",\n },\n // Majors support LIMIT orders (pending open at a user-set price).\n capabilities: { limitOrder: true },\n },\n },\n defaultSolverId: \"rasa\",\n // Base's own analytics and events subgraphs (Goldsky) — real, production endpoints.\n subgraphs: {\n analytics:\n \"https://api.goldsky.com/api/public/project_cm1hfr4527p0f01u85mz499u8/subgraphs/base_analytics/latest/gn\",\n events: \"https://api.goldsky.com/api/public/project_cm1hfr4527p0f01u85mz499u8/subgraphs/base_events/latest/gn\",\n },\n // Rasa serves majors and has no mark-price feed of its own — no REST mark\n // price, no mark-price WebSocket, no index price. Binance USD-M Futures is\n // the price source, matching how the reference UI configures this solver.\n //\n // Both URLs are public constants but stay in config on purpose: they are the\n // escape hatch for Binance's regional restrictions, so an integrator whose\n // users are blocked repoints them at their own proxy with no SDK change.\n priceService: {\n type: \"binance\",\n /** USD-M Futures REST root. The client appends `/fapi/v1/…`. */\n url: \"https://fapi.binance.com\",\n /**\n * All-symbols mark-price broadcast, 1 push/sec.\n *\n * The `/market/ws/` prefix is deliberate and was verified against the live\n * endpoint: Binance's *documented* `/ws/<stream>` form (and\n * `/stream?streams=`) connect and then never push a frame, which would ship\n * a feed that reports `open` and silently never ticks.\n */\n wsUrl: \"wss://fstream.binance.com/market/ws/!markPrice@arr@1s\",\n },\n // Muon is deployment-agnostic: one `symmio` app on one shared gateway set\n // serves every SYMMIO deployment, and the per-deployment input is the\n // `symmio` request param (this chain's diamond, from `addresses` above).\n // So these are Base's real gateways, not another chain's stand-in.\n muon: {\n urls: [\n \"https://muon-oracle1.rasa.capital/v1/\",\n \"https://muon-oracle2.rasa.capital/v1/\",\n \"https://muon-oracle3.rasa.capital/v1/\",\n
|
|
1
|
+
{"version":3,"file":"registry.js","names":[],"sources":["../../../src/core/chains/registry.ts"],"sourcesContent":["import { SymmioSupportedChainId } from \"./supported-chains\";\nimport type { SymmioChainConfig } from \"./types\";\n\n/**\n * Built-in SYMMIO deployment configs keyed by chain ID.\n *\n * @internal\n */\nexport const CHAIN_CONFIGS: Record<number, SymmioChainConfig> = {\n [SymmioSupportedChainId.BASE]: {\n chainId: SymmioSupportedChainId.BASE,\n contractsVersion: \"0.8.5\",\n // Base AccountLayer has no scheduleTimelockOp facet at block 53214315.\n timelockSupported: false,\n addresses: {\n symmioAddress: \"0x91Cf2D8Ed503EC52768999aA6D8DBeA6e52dbe43\",\n instantLayerAddress: \"0x0825435285ac0E5c02c7a7c443F631f3e07fE375\",\n accountLayerAddress: \"0x56caf00c6C5cB5478570Bb23807B9d1D697863DC\",\n affiliatesAddress: \"0x45Eecd7B4f442388ACD90467E423A5CAAC3a9C3f\",\n collateralAddress: \"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913\", // USDC on Base\n collateralDecimals: 6,\n },\n // Rasa — Base's real solver. Rasa's API shares Enigma's paths for the\n // shared reads (contract-symbols, funding, locked params, error codes,\n // notional_cap/{id}, instant lists), so those work today; the diverging\n // endpoints (`/instant_trade/open|close` execution, `/estimated-price`,\n // `/notional_cap` list) return 404 until per-kind dispatch is wired into\n // the solver actions.\n // No `tpsl` block: Base COH deployment not confirmed yet — absence marks\n // conditional orders unsupported (add the block when the vendor provides it).\n solvers: {\n rasa: {\n name: \"Rasa\",\n address: \"0x81631953E0C093e72935C1CAA4C7D519B2A0E407\",\n // Staging URL — swap to the production solver URL when published.\n url: \"https://stage-archon.rasa.capital\",\n // Rasa's own position-state stream — real Base data. No `searchUrl`: the\n // rasa protocol serves notification history from the solver's own\n // position-state endpoint (via `searchNotifications`), not a REST service.\n notifications: {\n url: \"wss://stage-archon.rasa.capital/ws/position-state-ws3\",\n protocol: \"rasa\",\n },\n // Majors support LIMIT orders (pending open at a user-set price).\n capabilities: { limitOrder: true },\n },\n },\n defaultSolverId: \"rasa\",\n // Base's own analytics and events subgraphs (Goldsky) — real, production endpoints.\n subgraphs: {\n analytics:\n \"https://api.goldsky.com/api/public/project_cm1hfr4527p0f01u85mz499u8/subgraphs/base_analytics/latest/gn\",\n events: \"https://api.goldsky.com/api/public/project_cm1hfr4527p0f01u85mz499u8/subgraphs/base_events/latest/gn\",\n },\n // Rasa serves majors and has no mark-price feed of its own — no REST mark\n // price, no mark-price WebSocket, no index price. Binance USD-M Futures is\n // the price source, matching how the reference UI configures this solver.\n //\n // Both URLs are public constants but stay in config on purpose: they are the\n // escape hatch for Binance's regional restrictions, so an integrator whose\n // users are blocked repoints them at their own proxy with no SDK change.\n priceService: {\n type: \"binance\",\n /** USD-M Futures REST root. The client appends `/fapi/v1/…`. */\n url: \"https://fapi.binance.com\",\n /**\n * All-symbols mark-price broadcast, 1 push/sec.\n *\n * The `/market/ws/` prefix is deliberate and was verified against the live\n * endpoint: Binance's *documented* `/ws/<stream>` form (and\n * `/stream?streams=`) connect and then never push a frame, which would ship\n * a feed that reports `open` and silently never ticks.\n */\n wsUrl: \"wss://fstream.binance.com/market/ws/!markPrice@arr@1s\",\n },\n // Muon is deployment-agnostic: one `symmio` app on one shared gateway set\n // serves every SYMMIO deployment, and the per-deployment input is the\n // `symmio` request param (this chain's diamond, from `addresses` above).\n // So these are Base's real gateways, not another chain's stand-in.\n muon: {\n urls: [\n \"https://muon-oracle1.rasa.capital/v1/\",\n \"https://muon-oracle2.rasa.capital/v1/\",\n \"https://muon-oracle3.rasa.capital/v1/\",\n ],\n },\n },\n\n [SymmioSupportedChainId.ARBITRUM]: {\n chainId: SymmioSupportedChainId.ARBITRUM,\n contractsVersion: \"0.8.6\",\n /**\n * The production GaslessQ deployment, paired with the InstantLayer below\n * (the GaslessLayer's `instantLayer()` returns it). There is deliberately\n * no `execution` block: writes keep using the connected wallet until a call\n * passes `gasless` or the consumer sets `execution.mode`.\n */\n gasless: {\n url: \"https://gaslessq.symmio.foundation\",\n /** Vendor-assigned instance key. Keep it verbatim: the gateway routes on it. */\n protocolInstance: \"arbitrum-42161-vibe\",\n gaslessLayerAddress: \"0x8347953D80037b8d82827246f37EC7442AD188B4\",\n /**\n * Declared ahead of the gateway's WebSocket rollout. Until the gateway\n * accepts the handshake, a status wait stops dialing after a few failed\n * attempts and polls over HTTP, so streaming starts without an SDK change\n * once operators enable it.\n */\n statusStream: { enabled: true },\n },\n addresses: {\n symmioAddress: \"0x57331027091994FCb9c5Aec48ea92cEf0a93CF6A\",\n instantLayerAddress: \"0xf4e8b150fdc756aca578f5a05811c1998c65c829\",\n accountLayerAddress: \"0x573310d1D6ec18cB21E1aB949414470D9bf5c24E\",\n affiliatesAddress: \"0x58bB5Bdc279321507DfB7AB54B9e7EF3DdA6E24D\",\n collateralAddress: \"0xaf88d065e77c8cC2239327C5EDb3A432268e5831\",\n collateralDecimals: 6,\n },\n subgraphs: {\n analytics:\n \"https://api.goldsky.com/api/public/project_cm1hfr4527p0f01u85mz499u8/subgraphs/arbitrum-vibe-mainnet-analytics/latest/gn\",\n events:\n \"https://api.goldsky.com/api/public/project_cm1hfr4527p0f01u85mz499u8/subgraphs/arbitrum-vibe-mainnet-events/stage/gn\",\n },\n solvers: {\n enigma: {\n name: \"Enigma\",\n address: \"0x0420b24359d2DCccA53904042aa36A641162445c\",\n url: \"https://solver.enigma.bz/api\",\n tpsl: {\n url: \"https://tpsl.enigma.bz\",\n wsUrl: \"wss://notification.rasa.capital/ws/v1/subscribe\",\n appName: \"Arbitrum_COH_Production\",\n cohWalletAddress: \"0xFC3a98d30AdAA220Ae4150fcaC06Bd200b6E146B\",\n },\n notifications: {\n url: \"wss://notification.rasa.capital/ws/v1/subscribe\",\n channel: \"Arbitrum_Solver-Low-Cap_Production\",\n protocol: \"enigma\",\n /**\n * The host root, not the service's documented `/notification` prefix:\n * Cloudflare answers programmatic requests to that prefix with a 403\n * block page, while the host root serves the same API with CORS headers.\n */\n searchUrl: \"https://notification.rasa.capital\",\n },\n capabilities: { groupClose: true, listingService: true },\n },\n },\n defaultSolverId: \"enigma\",\n priceService: {\n type: \"enigma\",\n url: \"https://lowcap-price.enigma.bz\",\n wsUrl: \"wss://lowcap-price.enigma.bz/ws\",\n },\n muon: {\n urls: [\n \"https://muon-oracle1.rasa.capital/v1/\",\n \"https://muon-oracle2.rasa.capital/v1/\",\n \"https://muon-oracle3.rasa.capital/v1/\",\n ],\n },\n listing: {\n url: \"https://listing85.enigma.bz\",\n },\n inventory: {\n url: \"https://inventory85.enigma.bz\",\n },\n },\n};\n"],"mappings":";;AAQA,IAAa,IAAmD;EAC7D,EAAuB,OAAO;EAC7B,SAAS,EAAuB;EAChC,kBAAkB;EAElB,mBAAmB;EACnB,WAAW;GACT,eAAe;GACf,qBAAqB;GACrB,qBAAqB;GACrB,mBAAmB;GACnB,mBAAmB;GACnB,oBAAoB;EACtB;EASA,SAAS,EACP,MAAM;GACJ,MAAM;GACN,SAAS;GAET,KAAK;GAIL,eAAe;IACb,KAAK;IACL,UAAU;GACZ;GAEA,cAAc,EAAE,YAAY,GAAK;EACnC,EACF;EACA,iBAAiB;EAEjB,WAAW;GACT,WACE;GACF,QAAQ;EACV;EAQA,cAAc;GACZ,MAAM;GAEN,KAAK;GASL,OAAO;EACT;EAKA,MAAM,EACJ,MAAM;GACJ;GACA;GACA;EACF,EACF;CACF;EAEC,EAAuB,WAAW;EACjC,SAAS,EAAuB;EAChC,kBAAkB;EAOlB,SAAS;GACP,KAAK;GAEL,kBAAkB;GAClB,qBAAqB;GAOrB,cAAc,EAAE,SAAS,GAAK;EAChC;EACA,WAAW;GACT,eAAe;GACf,qBAAqB;GACrB,qBAAqB;GACrB,mBAAmB;GACnB,mBAAmB;GACnB,oBAAoB;EACtB;EACA,WAAW;GACT,WACE;GACF,QACE;EACJ;EACA,SAAS,EACP,QAAQ;GACN,MAAM;GACN,SAAS;GACT,KAAK;GACL,MAAM;IACJ,KAAK;IACL,OAAO;IACP,SAAS;IACT,kBAAkB;GACpB;GACA,eAAe;IACb,KAAK;IACL,SAAS;IACT,UAAU;IAMV,WAAW;GACb;GACA,cAAc;IAAE,YAAY;IAAM,gBAAgB;GAAK;EACzD,EACF;EACA,iBAAiB;EACjB,cAAc;GACZ,MAAM;GACN,KAAK;GACL,OAAO;EACT;EACA,MAAM,EACJ,MAAM;GACJ;GACA;GACA;EACF,EACF;EACA,SAAS,EACP,KAAK,8BACP;EACA,WAAW,EACT,KAAK,gCACP;CACF;AACF"}
|
|
@@ -78,6 +78,8 @@ export type SymmioSolverKind = (typeof SUPPORTED_SOLVER_KINDS)[number];
|
|
|
78
78
|
* to `false` — a solver must **declare** a capability to enable it.
|
|
79
79
|
*/
|
|
80
80
|
export interface SolverCapabilitiesConfig {
|
|
81
|
+
/** Whether this solver deployment offers timelock approval. Unset means unspecified; consumers may discover support. */
|
|
82
|
+
timelockApproval?: boolean;
|
|
81
83
|
/**
|
|
82
84
|
* Whether the solver supports closing a whole market + side group of quotes in
|
|
83
85
|
* one flow. Enigma (Virtual-Account isolation, one VA per market + side)
|
|
@@ -224,7 +226,7 @@ interface SymmioNotificationsConfigBase {
|
|
|
224
226
|
url: string;
|
|
225
227
|
/**
|
|
226
228
|
* Base URL of the notification REST service that backs `searchNotifications`
|
|
227
|
-
* (`POST /api/v1/search`), e.g. `https://notification.rasa.capital
|
|
229
|
+
* (`POST /api/v1/search`), e.g. `https://notification.rasa.capital`.
|
|
228
230
|
* Optional — when unset, `searchNotifications` requires a per-call `baseUrl`.
|
|
229
231
|
*/
|
|
230
232
|
searchUrl?: string;
|
|
@@ -427,6 +429,19 @@ export interface SymmioGaslessStatusStreamConfig {
|
|
|
427
429
|
*/
|
|
428
430
|
origin?: string;
|
|
429
431
|
}
|
|
432
|
+
/**
|
|
433
|
+
* Context supplied to {@link SymmioGaslessConfig.getRequestHeaders} for each HTTP attempt.
|
|
434
|
+
* Applications must also bind their own deployment and authentication identity;
|
|
435
|
+
* a chain id alone does not distinguish deployments sharing a chain.
|
|
436
|
+
*/
|
|
437
|
+
export interface GaslessRequestContext {
|
|
438
|
+
/** Chain selected for the request. */
|
|
439
|
+
chainId: number;
|
|
440
|
+
/** Gasless sub-service addressed by the request. */
|
|
441
|
+
service: "operations" | "deposits";
|
|
442
|
+
/** HTTP method of this attempt. */
|
|
443
|
+
method: "GET" | "POST";
|
|
444
|
+
}
|
|
430
445
|
/**
|
|
431
446
|
* Chain-level configuration for the GaslessQ relayer service.
|
|
432
447
|
*
|
|
@@ -442,6 +457,24 @@ export interface SymmioGaslessStatusStreamConfig {
|
|
|
442
457
|
* and has not disabled anonymous access.
|
|
443
458
|
*/
|
|
444
459
|
export interface SymmioGaslessConfig {
|
|
460
|
+
/**
|
|
461
|
+
* Resolve application-owned HTTP headers immediately before each GET or POST
|
|
462
|
+
* attempt, including retries and exact resubmissions. Useful for an
|
|
463
|
+
* authenticated application proxy. Values override `apiKey` case-insensitively;
|
|
464
|
+
* the SDK retains its JSON Accept and Content-Type headers.
|
|
465
|
+
*
|
|
466
|
+
* Rejection aborts that attempt with `GASLESS_REQUEST_HEADERS_FAILED` without
|
|
467
|
+
* exposing the callback's error or credentials. An earlier uncertain submit
|
|
468
|
+
* remains uncertain. Headers never enter submission snapshots or WebSockets.
|
|
469
|
+
*
|
|
470
|
+
* @param context - Chain, service and HTTP method for this attempt.
|
|
471
|
+
* @returns Fresh headers, synchronously or asynchronously.
|
|
472
|
+
* @example
|
|
473
|
+
* ```ts
|
|
474
|
+
* getRequestHeaders: async () => ({ Authorization: `Bearer ${await getToken()}` })
|
|
475
|
+
* ```
|
|
476
|
+
*/
|
|
477
|
+
getRequestHeaders?: (context: GaslessRequestContext) => Readonly<Record<string, string>> | Promise<Readonly<Record<string, string>>>;
|
|
445
478
|
/**
|
|
446
479
|
* Where the SDK reaches the GaslessQ gateway. One of:
|
|
447
480
|
*
|
|
@@ -531,6 +564,8 @@ export interface SymmioChainConfig {
|
|
|
531
564
|
chainId: number;
|
|
532
565
|
/** Contracts generation deployed on this chain. See {@link SymmioContractsVersion}. */
|
|
533
566
|
contractsVersion: SymmioContractsVersion;
|
|
567
|
+
/** Explicit deployment capability. `false` disables timelock calls; omitted means unknown. */
|
|
568
|
+
timelockSupported?: boolean;
|
|
534
569
|
/** Contract addresses */
|
|
535
570
|
addresses: SymmioContractAddresses;
|
|
536
571
|
/** Subgraph endpoints */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/chains/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,mCAAmC;IACnC,aAAa,EAAE,OAAO,CAAC;IACvB,gDAAgD;IAChD,mBAAmB,EAAE,OAAO,CAAC;IAC7B,sDAAsD;IACtD,mBAAmB,EAAE,OAAO,CAAC;IAC7B,mCAAmC;IACnC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,2CAA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AC;IAC5B,yBAAyB;IACzB,SAAS,EAAE,uBAAuB,CAAC;IACnC,yBAAyB;IACzB,SAAS,EAAE,kBAAkB,CAAC;IAC9B;;;;;OAKG;IACH,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAC,CAAC;IACvD,mFAAmF;IACnF,eAAe,EAAE,QAAQ,CAAC;IAC1B,kCAAkC;IAClC,YAAY,EAAE,wBAAwB,CAAC;IACvC,gCAAgC;IAChC,IAAI,EAAE,gBAAgB,CAAC;IACvB;;;;OAIG;IACH,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B;;;;OAIG;IACH,SAAS,CAAC,EAAE,qBAAqB,CAAC;IAClC;;;;OAIG;IACH,OAAO,CAAC,EAAE,mBAAmB,CAAC;CAC/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../src/core/chains/types.ts"],"sourcesContent":["import type { Address } from \"viem\";\nimport type { GaslessRelayEvent } from \"../../gasless/types\";\n\n/**\n * Contract addresses for a SYMMIO chain deployment.\n */\nexport interface SymmioContractAddresses {\n /** Main SYMMIO diamond contract */\n symmioAddress: Address;\n /** InstantLayer contract for instant actions */\n instantLayerAddress: Address;\n /** AccountLayer contract for subaccount management */\n accountLayerAddress: Address;\n /** Affiliates registry contract */\n affiliatesAddress: Address;\n /** Collateral token address (e.g. USDC) */\n collateralAddress: Address;\n /** Decimals of the collateral token */\n collateralDecimals: number;\n}\n\n/**\n * Subgraph endpoints for a SYMMIO chain deployment.\n */\nexport interface SymmioSubgraphUrls {\n /** Analytics subgraph for aggregated data (balance changes, quotes, history). */\n analytics: string;\n /** Events subgraph for raw on-chain events (e.g. `internalTransfers`). */\n events: string;\n}\n\n/**\n * Name of a configured subgraph endpoint (a key of {@link SymmioSubgraphUrls}).\n *\n * Used to pick which subgraph an action queries (`\"analytics\"` | `\"events\"`); the\n * union grows automatically as endpoints are added.\n */\nexport type SymmioSubgraphName = keyof SymmioSubgraphUrls;\n\n/**\n * A solver's id within a chain config — its registry key. Equal to its\n * {@link SymmioSolverKind}: each chain registers at most one solver per kind, so\n * the id *is* the kind (`\"enigma\" | \"rasa\"`). Closed for that reason.\n */\nexport type SolverId = SymmioSolverKind;\n\n/**\n * The solver kinds the SDK can actually serve — one generated client and\n * behavior set per entry. Single source of truth: {@link SymmioSolverKind} is\n * derived from this list, and `createConfig` validates every configured solver\n * against it (`assertSupportedSolver` in `solver-support.ts`). To add a kind,\n * append it here and ship its generated client + dispatch in the same change.\n *\n * @internal\n */\nexport const SUPPORTED_SOLVER_KINDS = [\"enigma\", \"rasa\"] as const;\n\n/**\n * Schema family a solver's REST API speaks — the discriminant used to select a\n * generated client. Closed (derived from {@link SUPPORTED_SOLVER_KINDS}): the\n * SDK ships one client per kind, so dispatch must be exhaustive.\n *\n * There is deliberately no version axis: each SDK release supports exactly one\n * API generation per kind. When a solver ships a new API generation, the SDK\n * regenerates that kind's client in a new release — consumers pick the\n * generation by pinning the SDK version, not through config.\n */\nexport type SymmioSolverKind = (typeof SUPPORTED_SOLVER_KINDS)[number];\n\n/**\n * Solver / hedger configuration for a SYMMIO chain deployment.\n *\n * In this SDK a \"solver\" is the same actor that fronts the lowcap hedger REST\n * API (`/instant_trade/instant_open`, `/contract-symbols`, …) and acts as\n * `partyB` on-chain. Its `url` is the API base URL, its `address` is partyB.\n *\n * Solvers live under {@link SymmioChainConfig.solvers}, keyed by\n * {@link SolverId} — the key is the solver's id, which is also its kind, so the\n * kind is not repeated here. `config.getSolver({ chainId, solverId })` returns a\n * {@link SymmioResolvedSolver} (this config plus its resolved `id`).\n */\n/**\n * Per-solver capability flags. Gate SDK flows and UI on these so a solver that\n * lacks a feature degrades gracefully instead of erroring. Unset flags default\n * to `false` — a solver must **declare** a capability to enable it.\n */\nexport interface SolverCapabilitiesConfig {\n /**\n * Whether the solver supports closing a whole market + side group of quotes in\n * one flow. Enigma (Virtual-Account isolation, one VA per market + side)\n * supports it; rasa (cross-margin) does not. Default `false`.\n */\n groupClose?: boolean;\n /**\n * Whether the solver supports LIMIT orders — placing a pending open at a\n * user-set price. Majors (rasa) support it; enigma (lowcap) does not. Default\n * `false`.\n */\n limitOrder?: boolean;\n /**\n * Whether this solver's markets are the lowcap **Pools** (listing service).\n * Purely declarative: the SDK's listing functions resolve the listing backend\n * **at chain level** ({@link SymmioChainConfig.listing}) and do **not** gate on\n * this flag. It exists so config can express which solvers do listing, readable\n * via `getSolverCapabilities`. Enigma (lowcap) declares it; rasa does not.\n * Default `false`.\n */\n listingService?: boolean;\n}\n\nexport interface SymmioSolverConfig {\n /** Human-readable solver name */\n name: string;\n /** Solver's on-chain address (used as `partyB` in `sendQuote`) */\n address: Address;\n /** Solver / hedger API base URL */\n url: string;\n /** Optional TP/SL handler — solver supports conditional orders only when set. */\n tpsl?: SymmioTpSlConfig;\n /**\n * Price source for **this solver's** markets. Falls back to the chain's\n * {@link SymmioChainConfig.priceService} when omitted, so set it only where a\n * solver diverges from the chain default — do not duplicate the default.\n *\n * Needed because a chain may register several solvers that price differently:\n * a lowcap solver reads its own price service while a majors solver reads\n * Binance. A single chain-level value cannot be right for both.\n */\n priceService?: SymmioPriceServiceConfig;\n /**\n * Notifications endpoint for **this solver's** position/quote state stream and\n * history search. Required per solver: notifications are inherently\n * solver-specific — the enigma `channel` and the rasa position-state URL are\n * the solver's own — so there is no chain-level default to inherit.\n */\n notifications: SymmioNotificationsConfig;\n /**\n * Optional per-solver capability flags. Gate SDK flows and UI on these\n * ({@link SolverCapabilitiesConfig}); unset flags default to `false`.\n */\n capabilities?: SolverCapabilitiesConfig;\n}\n\n/**\n * A {@link SymmioSolverConfig} resolved from the registry, with its `id`\n * attached. The `id` is the solver's kind (`\"enigma\" | \"rasa\"`) and drives\n * per-kind dispatch inside solver actions. Returned by `config.getSolver`.\n */\nexport interface SymmioResolvedSolver extends SymmioSolverConfig {\n /** The resolved solver id — equal to its kind. */\n id: SolverId;\n}\n\n/**\n * TP/SL (Conditional Order Handler) configuration for a solver.\n *\n * The handler is an off-chain service that signs and executes\n * `requestToClosePosition` calls when the user's TP/SL trigger fires. To\n * authorize it, every user must grant a delegation to {@link cohWalletAddress}\n * for the standard instant-trade selectors.\n */\nexport interface SymmioTpSlConfig {\n /** Handler REST root URL (no `/api/v5/` suffix — orval-generated paths add it). */\n url: string;\n /** Handler WebSocket URL — enigma-protocol notifications scoped by `appName`. */\n wsUrl: string;\n /** `App-Name` header value, e.g. `Arbitrum_COH_Production`. */\n appName: string;\n /** COH wallet address that must be granted delegation to execute TP/SL orders. */\n cohWalletAddress: Address;\n}\n\n/**\n * The price providers the SDK ships a client for. Closed: it drives exhaustive\n * dispatch in `getMarkPrices` / `watchPrices`, and `createConfig` validates every\n * configured price service against it (`assertSupportedPriceServiceType` in\n * `price-service-support.ts`). To add a provider, append it here and ship its\n * adapter + dispatch in the same change.\n *\n * @internal\n */\nexport const SUPPORTED_PRICE_SERVICE_TYPES = [\"enigma\", \"binance\"] as const;\n\n/**\n * Supported price-service providers.\n *\n * A **second, independent axis** from {@link SymmioSolverKind}: a Rasa solver is\n * priced off Binance today, and nothing in the type system ties the two\n * together. The provider is *derived* from `{ chainId, solverId }` via\n * `solver.priceService ?? chain.priceService` — never selected per call.\n */\nexport type SymmioPriceServiceType = (typeof SUPPORTED_PRICE_SERVICE_TYPES)[number];\n\n/**\n * Price-service configuration for a SYMMIO chain deployment.\n *\n * Both URLs stay **required, including for Binance**. Binance's endpoints are\n * public constants, but keeping them in config is the geo-restriction escape\n * hatch: an integrator whose users are in a blocked region repoints both at\n * their own proxy with no SDK change.\n */\nexport interface SymmioPriceServiceConfig {\n /** Price-service provider type. Selects which client the SDK uses. */\n type: SymmioPriceServiceType;\n /**\n * REST host root, no trailing slash — the client appends the provider's path.\n * `enigma`: `https://lowcap-price.enigma.bz` (+ `/api/v1/prices/names`).\n * `binance`: `https://fapi.binance.com` (+ `/fapi/v1/premiumIndex`).\n */\n url: string;\n /**\n * **Full** WebSocket endpoint — the exact URL the SDK dials, identically for\n * every provider, so nothing downstream needs to know which provider it holds.\n * `enigma`: `wss://lowcap-price.enigma.bz/ws`.\n * `binance`: `wss://fstream.binance.com/market/ws/!markPrice@arr@1s`.\n */\n wsUrl: string;\n}\n\n/**\n * Wire protocol a notifications endpoint speaks. Closed: it drives exhaustive\n * dispatch in `watchNotifications` / `parseNotificationFrame`; to add a\n * protocol, append it here and ship its subscribe + parse path in the same\n * change.\n *\n * - `enigma` — the lowcap solver endpoint (`…/ws/v1/subscribe`). Subscribes\n * with a `channel_patterns` frame and wraps each push as `{ data, address }`.\n * - `rasa` — the Rasa position-state endpoint (`…/ws/position-state-ws3`).\n * Subscribes with an `{ address: [...] }` frame (one socket can carry many\n * SubAccounts) and pushes bare notification frames, no envelope.\n */\nexport type SymmioNotificationsProtocol = \"enigma\" | \"rasa\";\n\n/**\n * Fields every notifications endpoint shares, regardless of wire protocol.\n */\ninterface SymmioNotificationsConfigBase {\n /** Notifications WebSocket URL (`wss://…`). */\n url: string;\n /**\n * Base URL of the notification REST service that backs `searchNotifications`\n * (`POST /api/v1/search`), e.g. `https://notification.rasa.capital/notification`.\n * Optional — when unset, `searchNotifications` requires a per-call `baseUrl`.\n */\n searchUrl?: string;\n}\n\n/**\n * Notifications endpoint speaking the `enigma` protocol (the lowcap\n * solver's channel-scoped stream).\n */\nexport interface SymmioEnigmaNotificationsConfig extends SymmioNotificationsConfigBase {\n /** Wire protocol the endpoint speaks. */\n protocol: \"enigma\";\n /** Channel / `app_name` the subscribe frame targets on this endpoint. */\n channel: string;\n}\n\n/**\n * Notifications endpoint speaking the `rasa` position-state protocol. No\n * channel — the subscribe frame is just the watched SubAccount addresses.\n */\nexport interface SymmioRasaNotificationsConfig extends SymmioNotificationsConfigBase {\n /** Wire protocol the endpoint speaks. */\n protocol: \"rasa\";\n}\n\n/**\n * Notifications WebSocket configuration for a SYMMIO chain deployment.\n *\n * The notifications endpoint streams position/quote state transitions (instant\n * open/close confirmations, fills, cancels, liquidations) for a SubAccount. It\n * is a push channel, not a REST endpoint — `url` is a `ws://`/`wss://` URL.\n * Discriminated on `protocol`; narrow to reach protocol-specific fields\n * (e.g. the enigma `channel`).\n */\nexport type SymmioNotificationsConfig = SymmioEnigmaNotificationsConfig | SymmioRasaNotificationsConfig;\n\n/**\n * Muon oracle configuration for a SYMMIO chain deployment.\n *\n * The Muon network signs off-chain values (e.g. a party's unrealized PnL) that\n * the contracts verify on-chain — `removeMargin` requires such a signature. The\n * gateway is a query-param REST endpoint with no OpenAPI spec; `urls` are tried\n * in order until one returns a successful attestation.\n *\n * @see {@link https://docs.symm.io/api-endpoints-and-deployments/muon-api}\n */\nexport interface SymmioMuonConfig {\n /** Muon oracle gateway base URLs, tried in order (fallback on failure). */\n urls: readonly string[];\n}\n\n/**\n * Pools **listing backend** configuration for a SYMMIO chain deployment.\n *\n * The listing backend is an auth'd REST service that owns the lowcap Pools flow\n * — the pool catalogue, per-pool stats, a user's stake/rewards, and the\n * create/deposit/withdraw/claim actions. It is chain-level: one listing backend\n * is served per chain (a chain has at most one), with no solver or capability\n * involved. Present only where Pools is available (Enigma on Arbitrum); omitted\n * elsewhere.\n *\n * One deployment serves listings whose collateral was deposited on **several**\n * chains — a catalogue row's `chainId` is the token's deposit chain, which is\n * not the chain the resulting market trades on.\n */\nexport interface SymmioListingConfig {\n /**\n * Listing backend **host root** — no version segment and no trailing slash\n * (e.g. `https://listing85.enigma.bz`, staging\n * `https://listing-staging.enigma.bz`).\n *\n * The generated client's own paths already begin with `/v2`, so a versioned\n * base URL here would request `/v2/v2/market/search` and 404. Point this at\n * staging with a `createConfig` override — there is no separate environment\n * axis.\n */\n url: string;\n}\n\n/**\n * Inventory-service configuration for a SYMMIO chain deployment.\n *\n * The inventory service is the custody backend behind the lowcap Pools: it holds\n * the per-market token and collateral inventory that backs trading, and reports\n * the system-wide TVL those balances add up to. It is a **separate vendor** from\n * both the solver and the {@link SymmioListingConfig} listing backend, with its\n * own deployment and its own OpenAPI spec.\n *\n * Chain-level and optional, like `listing`: present where lowcap Pools are\n * available, omitted elsewhere.\n */\nexport interface SymmioInventoryConfig {\n /**\n * Inventory service **host root** — no path segment and no trailing slash\n * (e.g. `https://inventory85.enigma.bz`, staging\n * `https://inventory-staging.enigma.bz`).\n *\n * The generated client's own paths already begin with `/api/v1`, so appending\n * `/api` here would request `/api/api/v1/...` and 404.\n */\n url: string;\n}\n\n/**\n * Failure policy for the transparent gasless execution mode, applied when the\n * relay definitively rejects a request **before** it is accepted (a 4xx, or a\n * pre-broadcast `rejected`).\n *\n * - `\"error\"` (default): surface a typed error; the consumer decides what to do.\n * - `\"wallet\"`: silently fall back to the normal gas-paid wallet path.\n *\n * After the service accepts a request (HTTP 202) no fallback ever happens — the\n * relayed transaction may still execute, and a wallet retry would duplicate it.\n */\nexport type GaslessFallback = \"error\" | \"wallet\";\n\n/**\n * Defaults governing how existing contract writes dispatch when the transparent\n * gasless execution mode is active. Every field can be overridden per call via\n * the `gasless` write parameter.\n */\nexport interface GaslessExecutionConfig {\n /**\n * `\"wallet\"` (default): writes go through the connected wallet as always.\n * `\"gasless\"`: relayable writes are signed as InstantLayer operations and\n * relayed through GaslessQ; non-relayable writes keep the wallet path.\n */\n mode?: \"wallet\" | \"gasless\";\n /** Pre-acceptance failure policy. Default `\"error\"`. */\n fallback?: GaslessFallback;\n /**\n * Quote the batch on-chain (the GaslessLayer's `previewFeeQuote`) before\n * prompting the user for a signature, and fail fast when the quote refuses\n * it: `GASLESS_FREE_QUOTA_EXHAUSTED` when the daily free quota is spent (the\n * one case `fallback: \"wallet\"` recovers from), `GASLESS_FEE_QUOTE_REVERTED`\n * when the contract rejects the batch, and `GASLESS_LAYER_INTERFACE_UNSUPPORTED`\n * when the GaslessLayer predates the multi-wallet interface. A quote that\n * fails for transport reasons does not block, and the quote never checks\n * affordability — the relayer's simulation is authoritative. Default `true`.\n */\n preflightFee?: boolean;\n /**\n * Verify on-chain (`isDelegationActive`) that the signing key is authorized\n * for every selector a relayed write carries before prompting the user for a\n * signature, and fail fast when a session key is missing a delegation.\n * Skipped for the sub-account's own owner, who needs no delegation.\n * Default `true`.\n */\n preflightDelegation?: boolean;\n /** Max wait for the relayer to broadcast before timing out. Default `120_000` ms. */\n broadcastTimeoutMs?: number;\n /** Status poll cadence while the request is `queued`. Default `1_500` ms. */\n queuedPollMs?: number;\n /** Status poll cadence after the request is `submitted`. Default `3_000` ms. */\n submittedPollMs?: number;\n /**\n * How long a status wait lets the gateway's stream settle before falling back\n * to its first HTTP read. It ends early the moment the stream delivers, or\n * reports that it will not (unreachable, not-found, at its subscription cap,\n * disabled). Ignored where the stream is off. Default `1_000` ms.\n */\n streamSettleMs?: number;\n /**\n * How long a delivering stream may report nothing about a workflow before the\n * wait takes one HTTP read anyway and re-arms. Heartbeats do not count — only\n * records for the request do. Default `15_000` ms.\n */\n streamStaleMs?: number;\n /**\n * HTTP timeout for each gasless submit, in ms: every relay and\n * deposit-settlement POST, from the explicit actions as well as the\n * transparent mode. A submit that times out is ambiguous (the gateway may\n * already have accepted it) and fails like a network error, with status `0`.\n * Status reads are not bounded by it. Default `30_000`.\n */\n submitTimeoutMs?: number;\n /**\n * Lifecycle observer for relayed writes — fires at `accepted`, `broadcast`,\n * and `terminal`. Persist request ids in the `accepted` event so in-flight\n * workflows survive reloads.\n */\n onEvent?: (event: GaslessRelayEvent) => void;\n}\n\n/**\n * Status-stream availability for one GaslessQ deployment. It is a deployment\n * fact, like the URL. Status WebSockets are optional and disabled by default at\n * the gateway, and each environment enables them separately, so a stream is\n * declared per chain rather than assumed.\n *\n * Where it is enabled, the stream is the primary transport for status waits and\n * HTTP reads become the fallback: a wait subscribes, gives the stream\n * `execution.streamSettleMs` to deliver, and polls only while the stream is not\n * delivering. HTTP status reads stay available whether or not a stream is\n * declared.\n */\nexport interface SymmioGaslessStatusStreamConfig {\n /**\n * Whether this deployment serves the status WebSocket. Set it to `true` only\n * once the operators confirm streams for this environment and protocol\n * instance. A staging confirmation does not cover production.\n */\n enabled: boolean;\n /**\n * The gateway's `https://` origin, used to locate the stream when `url` is a\n * proxy root, because a proxy that forwards HTTP cannot be assumed to forward\n * WebSockets. Omit it for the gateway `url` forms, whose stream endpoint\n * derives from `url` itself.\n */\n origin?: string;\n}\n\n/**\n * Chain-level configuration for the GaslessQ relayer service.\n *\n * GaslessQ relays user-signed InstantLayer operations so account actions need\n * no native gas: the relayer broadcasts and pays, and the **GaslessLayer**\n * contract charges an operational fee from the user's SYMMIO collateral in the\n * same atomic transaction. Optional and chain-level, like `listing`: present\n * only on perps-core (`\"0.8.6\"`) chains with a GaslessLayer deployment.\n * Resolve it with `resolveGaslessService` / gate on `supportsGaslessService`.\n *\n * The gateway serves anonymous clients by default, so a browser app can call it\n * directly with no `apiKey`, as long as the deployment allows the app's Origin\n * and has not disabled anonymous access.\n */\nexport interface SymmioGaslessConfig {\n /**\n * Where the SDK reaches the GaslessQ gateway. One of:\n *\n * - the gateway **origin** (`https://host`, no path) with `protocolInstance`,\n * the recommended form. The SDK derives\n * `/v1/instances/{protocolInstance}/{operations|deposits}`.\n * - an **instance root** (`…/v1/instances/<protocol-instance>`). The SDK\n * appends `/{service}`.\n * - an **instance-pinned service base**\n * (`…/v1/instances/<protocol-instance>/operations` or `…/deposits`), used\n * as-is and for that one service only.\n * - any other path, absolute or relative, is a **proxy root** (for example a\n * server-side proxy at `/api/gasless`). The SDK appends `/{service}`.\n *\n * The instance-less `/v1/operations` and `/v1/deposits` compatibility routes\n * are rejected with `GASLESS_URL_LEGACY_ROUTE`: the gateway is retiring them,\n * and they pin no instance to verify responses against. A query string, a\n * fragment, credentials (`user:password@`) or a non-HTTP(S) scheme is\n * rejected with `GASLESS_URL_INVALID`.\n */\n url: string;\n /**\n * Protocol-instance key selecting the deployment at the gateway\n * (`\"<protocol-instance>\"`, from the deployment handoff). Staging and\n * production can share a chain id, so the key, not the chain, picks the\n * contracts.\n *\n * Required with an origin `url` (`GASLESS_PROTOCOL_INSTANCE_REQUIRED`). With\n * an instance root or service base it may be omitted, but when given it must\n * equal the instance the path pins (`GASLESS_PROTOCOL_INSTANCE_CONFLICT`).\n * With a proxy root it is the instance successful responses are checked\n * against, whenever the proxy forwards the `X-GasLessQ-Protocol-Instance`\n * header.\n */\n protocolInstance?: string;\n /**\n * The GaslessLayer proxy address — the operational-fee charger and the\n * source of every gasless read (wallet addresses, deposit policy, fee\n * quotes, nonces). A deployment fact with **no runtime discovery**: update it\n * on every gateway redeploy. It must run the multi-wallet GaslessLayer\n * interface (`walletId`-scoped reads, `previewFeeQuote`); a proxy that has not\n * been upgraded to it is unsupported, and its fee quote throws\n * `GASLESS_LAYER_INTERFACE_UNSUPPORTED`.\n */\n gaslessLayerAddress: Address;\n /**\n * Optional partner key, sent as `Authorization: Bearer <key>`. Omit it to use\n * the gateway's anonymous profile, which is on by default: 10 requests per\n * second per caller IP and protocol instance, shared across operations and\n * deposits, with no `Authorization` header sent at all. Where anonymous access\n * is on, a key only raises the gateway limits. A deployment can turn it off,\n * and then answers keyless requests with `401`, so a key is required there. A\n * key must be authorized for the protocol instance and service it calls, and\n * it changes neither fees, wallet selection nor signatures.\n *\n * Meant for servers and backend-for-frontend proxies. **Never ship a key in a\n * browser bundle**, where anyone can read it. An invalid, disabled or\n * unauthorized key is rejected (`401` / `403`) and never falls back to\n * anonymous access. Errors the SDK throws never carry the key.\n */\n apiKey?: string;\n /**\n * Status-stream availability for this deployment. Omitted, the deployment is\n * treated as serving no stream.\n */\n statusStream?: SymmioGaslessStatusStreamConfig;\n /** Transparent execution-mode defaults for existing contract writes. */\n execution?: GaslessExecutionConfig;\n}\n\n/**\n * The perps-core contracts generation a chain's deployment runs.\n *\n * A **deployment fact, declared per chain** — it is not probed at runtime (the\n * diamond exposes no version view). It drives the version-sensitive seams the\n * SDK carries for serving mixed-generation chains from one release: which\n * quote-send call the instant-open flow signs (`sendQuote` with solver-fee caps\n * on `\"0.8.6\"`, the legacy `sendQuoteWithAffiliateAndData` on `\"0.8.5\"`), which\n * selector the session-key delegation set includes, and which output shape the\n * withdraw-request reads decode.\n */\nexport type SymmioContractsVersion = \"0.8.5\" | \"0.8.6\";\n\n/**\n * Complete resolved configuration for a SYMMIO chain deployment.\n */\nexport interface SymmioChainConfig {\n /** Chain ID */\n chainId: number;\n /** Contracts generation deployed on this chain. See {@link SymmioContractsVersion}. */\n contractsVersion: SymmioContractsVersion;\n /** Contract addresses */\n addresses: SymmioContractAddresses;\n /** Subgraph endpoints */\n subgraphs: SymmioSubgraphUrls;\n /**\n * Solvers available on this chain, keyed by {@link SolverId} (which is the\n * solver's kind). A chain registers a subset of the kinds, so this is partial.\n * Resolve one with `config.getSolver({ chainId, solverId })`, which defaults to\n * {@link defaultSolverId} when `solverId` is omitted.\n */\n solvers: Partial<Record<SolverId, SymmioSolverConfig>>;\n /** Id of the solver an action targets on this chain when `solverId` is omitted. */\n defaultSolverId: SolverId;\n /** Price-service configuration */\n priceService: SymmioPriceServiceConfig;\n /** Muon oracle configuration */\n muon: SymmioMuonConfig;\n /**\n * Optional Pools listing backend, served per chain. Set on chains where the\n * lowcap Pools flow is available (Enigma on Arbitrum); omitted elsewhere.\n * Resolve it with `resolveListingService` / gate on `supportsListingService`.\n */\n listing?: SymmioListingConfig;\n /**\n * Optional inventory service — the custody backend behind lowcap Pools, and\n * the source of system-wide TVL. Set alongside {@link SymmioChainConfig.listing};\n * resolve it with `resolveInventoryService`.\n */\n inventory?: SymmioInventoryConfig;\n /**\n * Optional GaslessQ relayer service. Set on perps-core (`\"0.8.6\"`) chains\n * with a GaslessLayer deployment; omitted elsewhere. Resolve it with\n * `resolveGaslessService` / gate on `supportsGaslessService`.\n */\n gasless?: SymmioGaslessConfig;\n}\n"],"mappings":";AAuDA,IAAa,IAAyB,CAAC,UAAU,MAAM,GA8H1C,IAAgC,CAAC,UAAU,SAAS"}
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../src/core/chains/types.ts"],"sourcesContent":["import type { Address } from \"viem\";\nimport type { GaslessRelayEvent } from \"../../gasless/types\";\n\n/**\n * Contract addresses for a SYMMIO chain deployment.\n */\nexport interface SymmioContractAddresses {\n /** Main SYMMIO diamond contract */\n symmioAddress: Address;\n /** InstantLayer contract for instant actions */\n instantLayerAddress: Address;\n /** AccountLayer contract for subaccount management */\n accountLayerAddress: Address;\n /** Affiliates registry contract */\n affiliatesAddress: Address;\n /** Collateral token address (e.g. USDC) */\n collateralAddress: Address;\n /** Decimals of the collateral token */\n collateralDecimals: number;\n}\n\n/**\n * Subgraph endpoints for a SYMMIO chain deployment.\n */\nexport interface SymmioSubgraphUrls {\n /** Analytics subgraph for aggregated data (balance changes, quotes, history). */\n analytics: string;\n /** Events subgraph for raw on-chain events (e.g. `internalTransfers`). */\n events: string;\n}\n\n/**\n * Name of a configured subgraph endpoint (a key of {@link SymmioSubgraphUrls}).\n *\n * Used to pick which subgraph an action queries (`\"analytics\"` | `\"events\"`); the\n * union grows automatically as endpoints are added.\n */\nexport type SymmioSubgraphName = keyof SymmioSubgraphUrls;\n\n/**\n * A solver's id within a chain config — its registry key. Equal to its\n * {@link SymmioSolverKind}: each chain registers at most one solver per kind, so\n * the id *is* the kind (`\"enigma\" | \"rasa\"`). Closed for that reason.\n */\nexport type SolverId = SymmioSolverKind;\n\n/**\n * The solver kinds the SDK can actually serve — one generated client and\n * behavior set per entry. Single source of truth: {@link SymmioSolverKind} is\n * derived from this list, and `createConfig` validates every configured solver\n * against it (`assertSupportedSolver` in `solver-support.ts`). To add a kind,\n * append it here and ship its generated client + dispatch in the same change.\n *\n * @internal\n */\nexport const SUPPORTED_SOLVER_KINDS = [\"enigma\", \"rasa\"] as const;\n\n/**\n * Schema family a solver's REST API speaks — the discriminant used to select a\n * generated client. Closed (derived from {@link SUPPORTED_SOLVER_KINDS}): the\n * SDK ships one client per kind, so dispatch must be exhaustive.\n *\n * There is deliberately no version axis: each SDK release supports exactly one\n * API generation per kind. When a solver ships a new API generation, the SDK\n * regenerates that kind's client in a new release — consumers pick the\n * generation by pinning the SDK version, not through config.\n */\nexport type SymmioSolverKind = (typeof SUPPORTED_SOLVER_KINDS)[number];\n\n/**\n * Solver / hedger configuration for a SYMMIO chain deployment.\n *\n * In this SDK a \"solver\" is the same actor that fronts the lowcap hedger REST\n * API (`/instant_trade/instant_open`, `/contract-symbols`, …) and acts as\n * `partyB` on-chain. Its `url` is the API base URL, its `address` is partyB.\n *\n * Solvers live under {@link SymmioChainConfig.solvers}, keyed by\n * {@link SolverId} — the key is the solver's id, which is also its kind, so the\n * kind is not repeated here. `config.getSolver({ chainId, solverId })` returns a\n * {@link SymmioResolvedSolver} (this config plus its resolved `id`).\n */\n/**\n * Per-solver capability flags. Gate SDK flows and UI on these so a solver that\n * lacks a feature degrades gracefully instead of erroring. Unset flags default\n * to `false` — a solver must **declare** a capability to enable it.\n */\nexport interface SolverCapabilitiesConfig {\n /** Whether this solver deployment offers timelock approval. Unset means unspecified; consumers may discover support. */\n timelockApproval?: boolean;\n /**\n * Whether the solver supports closing a whole market + side group of quotes in\n * one flow. Enigma (Virtual-Account isolation, one VA per market + side)\n * supports it; rasa (cross-margin) does not. Default `false`.\n */\n groupClose?: boolean;\n /**\n * Whether the solver supports LIMIT orders — placing a pending open at a\n * user-set price. Majors (rasa) support it; enigma (lowcap) does not. Default\n * `false`.\n */\n limitOrder?: boolean;\n /**\n * Whether this solver's markets are the lowcap **Pools** (listing service).\n * Purely declarative: the SDK's listing functions resolve the listing backend\n * **at chain level** ({@link SymmioChainConfig.listing}) and do **not** gate on\n * this flag. It exists so config can express which solvers do listing, readable\n * via `getSolverCapabilities`. Enigma (lowcap) declares it; rasa does not.\n * Default `false`.\n */\n listingService?: boolean;\n}\n\nexport interface SymmioSolverConfig {\n /** Human-readable solver name */\n name: string;\n /** Solver's on-chain address (used as `partyB` in `sendQuote`) */\n address: Address;\n /** Solver / hedger API base URL */\n url: string;\n /** Optional TP/SL handler — solver supports conditional orders only when set. */\n tpsl?: SymmioTpSlConfig;\n /**\n * Price source for **this solver's** markets. Falls back to the chain's\n * {@link SymmioChainConfig.priceService} when omitted, so set it only where a\n * solver diverges from the chain default — do not duplicate the default.\n *\n * Needed because a chain may register several solvers that price differently:\n * a lowcap solver reads its own price service while a majors solver reads\n * Binance. A single chain-level value cannot be right for both.\n */\n priceService?: SymmioPriceServiceConfig;\n /**\n * Notifications endpoint for **this solver's** position/quote state stream and\n * history search. Required per solver: notifications are inherently\n * solver-specific — the enigma `channel` and the rasa position-state URL are\n * the solver's own — so there is no chain-level default to inherit.\n */\n notifications: SymmioNotificationsConfig;\n /**\n * Optional per-solver capability flags. Gate SDK flows and UI on these\n * ({@link SolverCapabilitiesConfig}); unset flags default to `false`.\n */\n capabilities?: SolverCapabilitiesConfig;\n}\n\n/**\n * A {@link SymmioSolverConfig} resolved from the registry, with its `id`\n * attached. The `id` is the solver's kind (`\"enigma\" | \"rasa\"`) and drives\n * per-kind dispatch inside solver actions. Returned by `config.getSolver`.\n */\nexport interface SymmioResolvedSolver extends SymmioSolverConfig {\n /** The resolved solver id — equal to its kind. */\n id: SolverId;\n}\n\n/**\n * TP/SL (Conditional Order Handler) configuration for a solver.\n *\n * The handler is an off-chain service that signs and executes\n * `requestToClosePosition` calls when the user's TP/SL trigger fires. To\n * authorize it, every user must grant a delegation to {@link cohWalletAddress}\n * for the standard instant-trade selectors.\n */\nexport interface SymmioTpSlConfig {\n /** Handler REST root URL (no `/api/v5/` suffix — orval-generated paths add it). */\n url: string;\n /** Handler WebSocket URL — enigma-protocol notifications scoped by `appName`. */\n wsUrl: string;\n /** `App-Name` header value, e.g. `Arbitrum_COH_Production`. */\n appName: string;\n /** COH wallet address that must be granted delegation to execute TP/SL orders. */\n cohWalletAddress: Address;\n}\n\n/**\n * The price providers the SDK ships a client for. Closed: it drives exhaustive\n * dispatch in `getMarkPrices` / `watchPrices`, and `createConfig` validates every\n * configured price service against it (`assertSupportedPriceServiceType` in\n * `price-service-support.ts`). To add a provider, append it here and ship its\n * adapter + dispatch in the same change.\n *\n * @internal\n */\nexport const SUPPORTED_PRICE_SERVICE_TYPES = [\"enigma\", \"binance\"] as const;\n\n/**\n * Supported price-service providers.\n *\n * A **second, independent axis** from {@link SymmioSolverKind}: a Rasa solver is\n * priced off Binance today, and nothing in the type system ties the two\n * together. The provider is *derived* from `{ chainId, solverId }` via\n * `solver.priceService ?? chain.priceService` — never selected per call.\n */\nexport type SymmioPriceServiceType = (typeof SUPPORTED_PRICE_SERVICE_TYPES)[number];\n\n/**\n * Price-service configuration for a SYMMIO chain deployment.\n *\n * Both URLs stay **required, including for Binance**. Binance's endpoints are\n * public constants, but keeping them in config is the geo-restriction escape\n * hatch: an integrator whose users are in a blocked region repoints both at\n * their own proxy with no SDK change.\n */\nexport interface SymmioPriceServiceConfig {\n /** Price-service provider type. Selects which client the SDK uses. */\n type: SymmioPriceServiceType;\n /**\n * REST host root, no trailing slash — the client appends the provider's path.\n * `enigma`: `https://lowcap-price.enigma.bz` (+ `/api/v1/prices/names`).\n * `binance`: `https://fapi.binance.com` (+ `/fapi/v1/premiumIndex`).\n */\n url: string;\n /**\n * **Full** WebSocket endpoint — the exact URL the SDK dials, identically for\n * every provider, so nothing downstream needs to know which provider it holds.\n * `enigma`: `wss://lowcap-price.enigma.bz/ws`.\n * `binance`: `wss://fstream.binance.com/market/ws/!markPrice@arr@1s`.\n */\n wsUrl: string;\n}\n\n/**\n * Wire protocol a notifications endpoint speaks. Closed: it drives exhaustive\n * dispatch in `watchNotifications` / `parseNotificationFrame`; to add a\n * protocol, append it here and ship its subscribe + parse path in the same\n * change.\n *\n * - `enigma` — the lowcap solver endpoint (`…/ws/v1/subscribe`). Subscribes\n * with a `channel_patterns` frame and wraps each push as `{ data, address }`.\n * - `rasa` — the Rasa position-state endpoint (`…/ws/position-state-ws3`).\n * Subscribes with an `{ address: [...] }` frame (one socket can carry many\n * SubAccounts) and pushes bare notification frames, no envelope.\n */\nexport type SymmioNotificationsProtocol = \"enigma\" | \"rasa\";\n\n/**\n * Fields every notifications endpoint shares, regardless of wire protocol.\n */\ninterface SymmioNotificationsConfigBase {\n /** Notifications WebSocket URL (`wss://…`). */\n url: string;\n /**\n * Base URL of the notification REST service that backs `searchNotifications`\n * (`POST /api/v1/search`), e.g. `https://notification.rasa.capital`.\n * Optional — when unset, `searchNotifications` requires a per-call `baseUrl`.\n */\n searchUrl?: string;\n}\n\n/**\n * Notifications endpoint speaking the `enigma` protocol (the lowcap\n * solver's channel-scoped stream).\n */\nexport interface SymmioEnigmaNotificationsConfig extends SymmioNotificationsConfigBase {\n /** Wire protocol the endpoint speaks. */\n protocol: \"enigma\";\n /** Channel / `app_name` the subscribe frame targets on this endpoint. */\n channel: string;\n}\n\n/**\n * Notifications endpoint speaking the `rasa` position-state protocol. No\n * channel — the subscribe frame is just the watched SubAccount addresses.\n */\nexport interface SymmioRasaNotificationsConfig extends SymmioNotificationsConfigBase {\n /** Wire protocol the endpoint speaks. */\n protocol: \"rasa\";\n}\n\n/**\n * Notifications WebSocket configuration for a SYMMIO chain deployment.\n *\n * The notifications endpoint streams position/quote state transitions (instant\n * open/close confirmations, fills, cancels, liquidations) for a SubAccount. It\n * is a push channel, not a REST endpoint — `url` is a `ws://`/`wss://` URL.\n * Discriminated on `protocol`; narrow to reach protocol-specific fields\n * (e.g. the enigma `channel`).\n */\nexport type SymmioNotificationsConfig = SymmioEnigmaNotificationsConfig | SymmioRasaNotificationsConfig;\n\n/**\n * Muon oracle configuration for a SYMMIO chain deployment.\n *\n * The Muon network signs off-chain values (e.g. a party's unrealized PnL) that\n * the contracts verify on-chain — `removeMargin` requires such a signature. The\n * gateway is a query-param REST endpoint with no OpenAPI spec; `urls` are tried\n * in order until one returns a successful attestation.\n *\n * @see {@link https://docs.symm.io/api-endpoints-and-deployments/muon-api}\n */\nexport interface SymmioMuonConfig {\n /** Muon oracle gateway base URLs, tried in order (fallback on failure). */\n urls: readonly string[];\n}\n\n/**\n * Pools **listing backend** configuration for a SYMMIO chain deployment.\n *\n * The listing backend is an auth'd REST service that owns the lowcap Pools flow\n * — the pool catalogue, per-pool stats, a user's stake/rewards, and the\n * create/deposit/withdraw/claim actions. It is chain-level: one listing backend\n * is served per chain (a chain has at most one), with no solver or capability\n * involved. Present only where Pools is available (Enigma on Arbitrum); omitted\n * elsewhere.\n *\n * One deployment serves listings whose collateral was deposited on **several**\n * chains — a catalogue row's `chainId` is the token's deposit chain, which is\n * not the chain the resulting market trades on.\n */\nexport interface SymmioListingConfig {\n /**\n * Listing backend **host root** — no version segment and no trailing slash\n * (e.g. `https://listing85.enigma.bz`, staging\n * `https://listing-staging.enigma.bz`).\n *\n * The generated client's own paths already begin with `/v2`, so a versioned\n * base URL here would request `/v2/v2/market/search` and 404. Point this at\n * staging with a `createConfig` override — there is no separate environment\n * axis.\n */\n url: string;\n}\n\n/**\n * Inventory-service configuration for a SYMMIO chain deployment.\n *\n * The inventory service is the custody backend behind the lowcap Pools: it holds\n * the per-market token and collateral inventory that backs trading, and reports\n * the system-wide TVL those balances add up to. It is a **separate vendor** from\n * both the solver and the {@link SymmioListingConfig} listing backend, with its\n * own deployment and its own OpenAPI spec.\n *\n * Chain-level and optional, like `listing`: present where lowcap Pools are\n * available, omitted elsewhere.\n */\nexport interface SymmioInventoryConfig {\n /**\n * Inventory service **host root** — no path segment and no trailing slash\n * (e.g. `https://inventory85.enigma.bz`, staging\n * `https://inventory-staging.enigma.bz`).\n *\n * The generated client's own paths already begin with `/api/v1`, so appending\n * `/api` here would request `/api/api/v1/...` and 404.\n */\n url: string;\n}\n\n/**\n * Failure policy for the transparent gasless execution mode, applied when the\n * relay definitively rejects a request **before** it is accepted (a 4xx, or a\n * pre-broadcast `rejected`).\n *\n * - `\"error\"` (default): surface a typed error; the consumer decides what to do.\n * - `\"wallet\"`: silently fall back to the normal gas-paid wallet path.\n *\n * After the service accepts a request (HTTP 202) no fallback ever happens — the\n * relayed transaction may still execute, and a wallet retry would duplicate it.\n */\nexport type GaslessFallback = \"error\" | \"wallet\";\n\n/**\n * Defaults governing how existing contract writes dispatch when the transparent\n * gasless execution mode is active. Every field can be overridden per call via\n * the `gasless` write parameter.\n */\nexport interface GaslessExecutionConfig {\n /**\n * `\"wallet\"` (default): writes go through the connected wallet as always.\n * `\"gasless\"`: relayable writes are signed as InstantLayer operations and\n * relayed through GaslessQ; non-relayable writes keep the wallet path.\n */\n mode?: \"wallet\" | \"gasless\";\n /** Pre-acceptance failure policy. Default `\"error\"`. */\n fallback?: GaslessFallback;\n /**\n * Quote the batch on-chain (the GaslessLayer's `previewFeeQuote`) before\n * prompting the user for a signature, and fail fast when the quote refuses\n * it: `GASLESS_FREE_QUOTA_EXHAUSTED` when the daily free quota is spent (the\n * one case `fallback: \"wallet\"` recovers from), `GASLESS_FEE_QUOTE_REVERTED`\n * when the contract rejects the batch, and `GASLESS_LAYER_INTERFACE_UNSUPPORTED`\n * when the GaslessLayer predates the multi-wallet interface. A quote that\n * fails for transport reasons does not block, and the quote never checks\n * affordability — the relayer's simulation is authoritative. Default `true`.\n */\n preflightFee?: boolean;\n /**\n * Verify on-chain (`isDelegationActive`) that the signing key is authorized\n * for every selector a relayed write carries before prompting the user for a\n * signature, and fail fast when a session key is missing a delegation.\n * Skipped for the sub-account's own owner, who needs no delegation.\n * Default `true`.\n */\n preflightDelegation?: boolean;\n /** Max wait for the relayer to broadcast before timing out. Default `120_000` ms. */\n broadcastTimeoutMs?: number;\n /** Status poll cadence while the request is `queued`. Default `1_500` ms. */\n queuedPollMs?: number;\n /** Status poll cadence after the request is `submitted`. Default `3_000` ms. */\n submittedPollMs?: number;\n /**\n * How long a status wait lets the gateway's stream settle before falling back\n * to its first HTTP read. It ends early the moment the stream delivers, or\n * reports that it will not (unreachable, not-found, at its subscription cap,\n * disabled). Ignored where the stream is off. Default `1_000` ms.\n */\n streamSettleMs?: number;\n /**\n * How long a delivering stream may report nothing about a workflow before the\n * wait takes one HTTP read anyway and re-arms. Heartbeats do not count — only\n * records for the request do. Default `15_000` ms.\n */\n streamStaleMs?: number;\n /**\n * HTTP timeout for each gasless submit, in ms: every relay and\n * deposit-settlement POST, from the explicit actions as well as the\n * transparent mode. A submit that times out is ambiguous (the gateway may\n * already have accepted it) and fails like a network error, with status `0`.\n * Status reads are not bounded by it. Default `30_000`.\n */\n submitTimeoutMs?: number;\n /**\n * Lifecycle observer for relayed writes — fires at `accepted`, `broadcast`,\n * and `terminal`. Persist request ids in the `accepted` event so in-flight\n * workflows survive reloads.\n */\n onEvent?: (event: GaslessRelayEvent) => void;\n}\n\n/**\n * Status-stream availability for one GaslessQ deployment. It is a deployment\n * fact, like the URL. Status WebSockets are optional and disabled by default at\n * the gateway, and each environment enables them separately, so a stream is\n * declared per chain rather than assumed.\n *\n * Where it is enabled, the stream is the primary transport for status waits and\n * HTTP reads become the fallback: a wait subscribes, gives the stream\n * `execution.streamSettleMs` to deliver, and polls only while the stream is not\n * delivering. HTTP status reads stay available whether or not a stream is\n * declared.\n */\nexport interface SymmioGaslessStatusStreamConfig {\n /**\n * Whether this deployment serves the status WebSocket. Set it to `true` only\n * once the operators confirm streams for this environment and protocol\n * instance. A staging confirmation does not cover production.\n */\n enabled: boolean;\n /**\n * The gateway's `https://` origin, used to locate the stream when `url` is a\n * proxy root, because a proxy that forwards HTTP cannot be assumed to forward\n * WebSockets. Omit it for the gateway `url` forms, whose stream endpoint\n * derives from `url` itself.\n */\n origin?: string;\n}\n\n/**\n * Context supplied to {@link SymmioGaslessConfig.getRequestHeaders} for each HTTP attempt.\n * Applications must also bind their own deployment and authentication identity;\n * a chain id alone does not distinguish deployments sharing a chain.\n */\nexport interface GaslessRequestContext {\n /** Chain selected for the request. */\n chainId: number;\n /** Gasless sub-service addressed by the request. */\n service: \"operations\" | \"deposits\";\n /** HTTP method of this attempt. */\n method: \"GET\" | \"POST\";\n}\n\n/**\n * Chain-level configuration for the GaslessQ relayer service.\n *\n * GaslessQ relays user-signed InstantLayer operations so account actions need\n * no native gas: the relayer broadcasts and pays, and the **GaslessLayer**\n * contract charges an operational fee from the user's SYMMIO collateral in the\n * same atomic transaction. Optional and chain-level, like `listing`: present\n * only on perps-core (`\"0.8.6\"`) chains with a GaslessLayer deployment.\n * Resolve it with `resolveGaslessService` / gate on `supportsGaslessService`.\n *\n * The gateway serves anonymous clients by default, so a browser app can call it\n * directly with no `apiKey`, as long as the deployment allows the app's Origin\n * and has not disabled anonymous access.\n */\nexport interface SymmioGaslessConfig {\n /**\n * Resolve application-owned HTTP headers immediately before each GET or POST\n * attempt, including retries and exact resubmissions. Useful for an\n * authenticated application proxy. Values override `apiKey` case-insensitively;\n * the SDK retains its JSON Accept and Content-Type headers.\n *\n * Rejection aborts that attempt with `GASLESS_REQUEST_HEADERS_FAILED` without\n * exposing the callback's error or credentials. An earlier uncertain submit\n * remains uncertain. Headers never enter submission snapshots or WebSockets.\n *\n * @param context - Chain, service and HTTP method for this attempt.\n * @returns Fresh headers, synchronously or asynchronously.\n * @example\n * ```ts\n * getRequestHeaders: async () => ({ Authorization: `Bearer ${await getToken()}` })\n * ```\n */\n getRequestHeaders?: (\n context: GaslessRequestContext,\n ) => Readonly<Record<string, string>> | Promise<Readonly<Record<string, string>>>;\n /**\n * Where the SDK reaches the GaslessQ gateway. One of:\n *\n * - the gateway **origin** (`https://host`, no path) with `protocolInstance`,\n * the recommended form. The SDK derives\n * `/v1/instances/{protocolInstance}/{operations|deposits}`.\n * - an **instance root** (`…/v1/instances/<protocol-instance>`). The SDK\n * appends `/{service}`.\n * - an **instance-pinned service base**\n * (`…/v1/instances/<protocol-instance>/operations` or `…/deposits`), used\n * as-is and for that one service only.\n * - any other path, absolute or relative, is a **proxy root** (for example a\n * server-side proxy at `/api/gasless`). The SDK appends `/{service}`.\n *\n * The instance-less `/v1/operations` and `/v1/deposits` compatibility routes\n * are rejected with `GASLESS_URL_LEGACY_ROUTE`: the gateway is retiring them,\n * and they pin no instance to verify responses against. A query string, a\n * fragment, credentials (`user:password@`) or a non-HTTP(S) scheme is\n * rejected with `GASLESS_URL_INVALID`.\n */\n url: string;\n /**\n * Protocol-instance key selecting the deployment at the gateway\n * (`\"<protocol-instance>\"`, from the deployment handoff). Staging and\n * production can share a chain id, so the key, not the chain, picks the\n * contracts.\n *\n * Required with an origin `url` (`GASLESS_PROTOCOL_INSTANCE_REQUIRED`). With\n * an instance root or service base it may be omitted, but when given it must\n * equal the instance the path pins (`GASLESS_PROTOCOL_INSTANCE_CONFLICT`).\n * With a proxy root it is the instance successful responses are checked\n * against, whenever the proxy forwards the `X-GasLessQ-Protocol-Instance`\n * header.\n */\n protocolInstance?: string;\n /**\n * The GaslessLayer proxy address — the operational-fee charger and the\n * source of every gasless read (wallet addresses, deposit policy, fee\n * quotes, nonces). A deployment fact with **no runtime discovery**: update it\n * on every gateway redeploy. It must run the multi-wallet GaslessLayer\n * interface (`walletId`-scoped reads, `previewFeeQuote`); a proxy that has not\n * been upgraded to it is unsupported, and its fee quote throws\n * `GASLESS_LAYER_INTERFACE_UNSUPPORTED`.\n */\n gaslessLayerAddress: Address;\n /**\n * Optional partner key, sent as `Authorization: Bearer <key>`. Omit it to use\n * the gateway's anonymous profile, which is on by default: 10 requests per\n * second per caller IP and protocol instance, shared across operations and\n * deposits, with no `Authorization` header sent at all. Where anonymous access\n * is on, a key only raises the gateway limits. A deployment can turn it off,\n * and then answers keyless requests with `401`, so a key is required there. A\n * key must be authorized for the protocol instance and service it calls, and\n * it changes neither fees, wallet selection nor signatures.\n *\n * Meant for servers and backend-for-frontend proxies. **Never ship a key in a\n * browser bundle**, where anyone can read it. An invalid, disabled or\n * unauthorized key is rejected (`401` / `403`) and never falls back to\n * anonymous access. Errors the SDK throws never carry the key.\n */\n apiKey?: string;\n /**\n * Status-stream availability for this deployment. Omitted, the deployment is\n * treated as serving no stream.\n */\n statusStream?: SymmioGaslessStatusStreamConfig;\n /** Transparent execution-mode defaults for existing contract writes. */\n execution?: GaslessExecutionConfig;\n}\n\n/**\n * The perps-core contracts generation a chain's deployment runs.\n *\n * A **deployment fact, declared per chain** — it is not probed at runtime (the\n * diamond exposes no version view). It drives the version-sensitive seams the\n * SDK carries for serving mixed-generation chains from one release: which\n * quote-send call the instant-open flow signs (`sendQuote` with solver-fee caps\n * on `\"0.8.6\"`, the legacy `sendQuoteWithAffiliateAndData` on `\"0.8.5\"`), which\n * selector the session-key delegation set includes, and which output shape the\n * withdraw-request reads decode.\n */\nexport type SymmioContractsVersion = \"0.8.5\" | \"0.8.6\";\n\n/**\n * Complete resolved configuration for a SYMMIO chain deployment.\n */\nexport interface SymmioChainConfig {\n /** Chain ID */\n chainId: number;\n /** Contracts generation deployed on this chain. See {@link SymmioContractsVersion}. */\n contractsVersion: SymmioContractsVersion;\n /** Explicit deployment capability. `false` disables timelock calls; omitted means unknown. */\n timelockSupported?: boolean;\n /** Contract addresses */\n addresses: SymmioContractAddresses;\n /** Subgraph endpoints */\n subgraphs: SymmioSubgraphUrls;\n /**\n * Solvers available on this chain, keyed by {@link SolverId} (which is the\n * solver's kind). A chain registers a subset of the kinds, so this is partial.\n * Resolve one with `config.getSolver({ chainId, solverId })`, which defaults to\n * {@link defaultSolverId} when `solverId` is omitted.\n */\n solvers: Partial<Record<SolverId, SymmioSolverConfig>>;\n /** Id of the solver an action targets on this chain when `solverId` is omitted. */\n defaultSolverId: SolverId;\n /** Price-service configuration */\n priceService: SymmioPriceServiceConfig;\n /** Muon oracle configuration */\n muon: SymmioMuonConfig;\n /**\n * Optional Pools listing backend, served per chain. Set on chains where the\n * lowcap Pools flow is available (Enigma on Arbitrum); omitted elsewhere.\n * Resolve it with `resolveListingService` / gate on `supportsListingService`.\n */\n listing?: SymmioListingConfig;\n /**\n * Optional inventory service — the custody backend behind lowcap Pools, and\n * the source of system-wide TVL. Set alongside {@link SymmioChainConfig.listing};\n * resolve it with `resolveInventoryService`.\n */\n inventory?: SymmioInventoryConfig;\n /**\n * Optional GaslessQ relayer service. Set on perps-core (`\"0.8.6\"`) chains\n * with a GaslessLayer deployment; omitted elsewhere. Resolve it with\n * `resolveGaslessService` / gate on `supportsGaslessService`.\n */\n gasless?: SymmioGaslessConfig;\n}\n"],"mappings":";AAuDA,IAAa,IAAyB,CAAC,UAAU,MAAM,GAgI1C,IAAgC,CAAC,UAAU,SAAS"}
|
|
@@ -11,10 +11,12 @@ function r(e) {
|
|
|
11
11
|
return r;
|
|
12
12
|
}
|
|
13
13
|
function i(e, t) {
|
|
14
|
+
let n = t.addresses?.accountLayerAddress !== void 0 && t.addresses.accountLayerAddress.toLowerCase() !== e.addresses.accountLayerAddress.toLowerCase(), { timelockSupported: r, ...i } = e, o = t.timelockSupported ?? (n ? void 0 : r);
|
|
14
15
|
return {
|
|
15
|
-
...
|
|
16
|
+
...i,
|
|
16
17
|
...t.chainId === void 0 ? {} : { chainId: t.chainId },
|
|
17
18
|
contractsVersion: t.contractsVersion ?? e.contractsVersion,
|
|
19
|
+
...o === void 0 ? {} : { timelockSupported: o },
|
|
18
20
|
addresses: {
|
|
19
21
|
...e.addresses,
|
|
20
22
|
...t.addresses
|
|
@@ -40,13 +42,14 @@ function a(t, n, r) {
|
|
|
40
42
|
let s = r.execution || n?.execution ? {
|
|
41
43
|
...n?.execution ?? {},
|
|
42
44
|
...r.execution ?? {}
|
|
43
|
-
} : void 0, c = r.protocolInstance ?? n?.protocolInstance, l = r.apiKey ?? n?.apiKey, u = o(t, n?.statusStream, r.statusStream);
|
|
45
|
+
} : void 0, c = r.protocolInstance ?? n?.protocolInstance, l = r.apiKey ?? n?.apiKey, u = r.getRequestHeaders ?? n?.getRequestHeaders, d = o(t, n?.statusStream, r.statusStream);
|
|
44
46
|
return { gasless: {
|
|
45
47
|
url: i,
|
|
46
48
|
gaslessLayerAddress: a,
|
|
47
49
|
...c === void 0 ? {} : { protocolInstance: c },
|
|
48
50
|
...l === void 0 ? {} : { apiKey: l },
|
|
49
|
-
...u ? {
|
|
51
|
+
...u === void 0 ? {} : { getRequestHeaders: u },
|
|
52
|
+
...d ? { statusStream: d } : {},
|
|
50
53
|
...s ? { execution: s } : {}
|
|
51
54
|
} };
|
|
52
55
|
}
|