dexbot 1.3.2 → 1.4.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/analysis/chart_utils.d.ts +11 -9
- package/dist/analysis/chart_utils.d.ts.map +1 -1
- package/dist/analysis/chart_utils.js +21 -16
- package/dist/analysis/chart_utils.js.map +1 -1
- package/dist/analysis/math_utils.d.ts +4 -13
- package/dist/analysis/math_utils.d.ts.map +1 -1
- package/dist/analysis/math_utils.js +16 -18
- package/dist/analysis/math_utils.js.map +1 -1
- package/dist/analysis/tradingview/tradingview_uplot_chart_generator.d.ts +3 -7
- package/dist/analysis/tradingview/tradingview_uplot_chart_generator.d.ts.map +1 -1
- package/dist/analysis/tradingview/tradingview_uplot_chart_generator.js +38 -34
- package/dist/analysis/tradingview/tradingview_uplot_chart_generator.js.map +1 -1
- package/dist/analysis/trend_detection/hurst_analyzer.d.ts +1 -4
- package/dist/analysis/trend_detection/hurst_analyzer.d.ts.map +1 -1
- package/dist/analysis/trend_detection/hurst_analyzer.js +10 -7
- package/dist/analysis/trend_detection/hurst_analyzer.js.map +1 -1
- package/dist/analysis/trend_detection/kalman_trend_analyzer.d.ts +6 -6
- package/dist/analysis/trend_detection/kalman_trend_analyzer.d.ts.map +1 -1
- package/dist/analysis/trend_detection/kalman_trend_analyzer.js +23 -15
- package/dist/analysis/trend_detection/kalman_trend_analyzer.js.map +1 -1
- package/dist/analysis/trend_detection/kalman_velocity_smoothing.d.ts +12 -13
- package/dist/analysis/trend_detection/kalman_velocity_smoothing.d.ts.map +1 -1
- package/dist/analysis/trend_detection/kalman_velocity_smoothing.js +16 -16
- package/dist/analysis/trend_detection/kalman_velocity_smoothing.js.map +1 -1
- package/dist/analysis/trend_detection/permutation_entropy_analyzer.d.ts +1 -4
- package/dist/analysis/trend_detection/permutation_entropy_analyzer.d.ts.map +1 -1
- package/dist/analysis/trend_detection/permutation_entropy_analyzer.js +10 -7
- package/dist/analysis/trend_detection/permutation_entropy_analyzer.js.map +1 -1
- package/dist/bot.d.ts.map +1 -1
- package/dist/bot.js +6 -13
- package/dist/bot.js.map +1 -1
- package/dist/credential-daemon.d.ts.map +1 -1
- package/dist/credential-daemon.js +74 -35
- package/dist/credential-daemon.js.map +1 -1
- package/dist/dexbot.d.ts.map +1 -1
- package/dist/dexbot.js +16 -15
- package/dist/dexbot.js.map +1 -1
- package/dist/market_adapter/ama_signal_runner.d.ts +1 -1
- package/dist/market_adapter/ama_signal_runner.d.ts.map +1 -1
- package/dist/market_adapter/ama_signal_runner.js +8 -20
- package/dist/market_adapter/ama_signal_runner.js.map +1 -1
- package/dist/market_adapter/candle_utils.d.ts +2 -10
- package/dist/market_adapter/candle_utils.d.ts.map +1 -1
- package/dist/market_adapter/candle_utils.js +7 -8
- package/dist/market_adapter/candle_utils.js.map +1 -1
- package/dist/market_adapter/core/asymmetric_bounds.d.ts +12 -7
- package/dist/market_adapter/core/asymmetric_bounds.d.ts.map +1 -1
- package/dist/market_adapter/core/asymmetric_bounds.js +4 -5
- package/dist/market_adapter/core/asymmetric_bounds.js.map +1 -1
- package/dist/market_adapter/core/config_normalizers.d.ts +4 -9
- package/dist/market_adapter/core/config_normalizers.d.ts.map +1 -1
- package/dist/market_adapter/core/config_normalizers.js +9 -9
- package/dist/market_adapter/core/config_normalizers.js.map +1 -1
- package/dist/market_adapter/core/kibana_candles.d.ts +16 -20
- package/dist/market_adapter/core/kibana_candles.d.ts.map +1 -1
- package/dist/market_adapter/core/kibana_candles.js +16 -15
- package/dist/market_adapter/core/kibana_candles.js.map +1 -1
- package/dist/market_adapter/core/kibana_client.d.ts +8 -11
- package/dist/market_adapter/core/kibana_client.d.ts.map +1 -1
- package/dist/market_adapter/core/kibana_client.js +13 -11
- package/dist/market_adapter/core/kibana_client.js.map +1 -1
- package/dist/market_adapter/core/kibana_market_candles.d.ts +5 -12
- package/dist/market_adapter/core/kibana_market_candles.d.ts.map +1 -1
- package/dist/market_adapter/core/kibana_market_candles.js +12 -21
- package/dist/market_adapter/core/kibana_market_candles.js.map +1 -1
- package/dist/market_adapter/core/market_adapter_service.d.ts +75 -53
- package/dist/market_adapter/core/market_adapter_service.d.ts.map +1 -1
- package/dist/market_adapter/core/market_adapter_service.js +102 -98
- package/dist/market_adapter/core/market_adapter_service.js.map +1 -1
- package/dist/market_adapter/core/strategies/ama.d.ts +21 -1
- package/dist/market_adapter/core/strategies/ama.d.ts.map +1 -1
- package/dist/market_adapter/core/strategies/ama.js +10 -10
- package/dist/market_adapter/core/strategies/ama.js.map +1 -1
- package/dist/market_adapter/core/strategies/ama_slope_model.d.ts +7 -11
- package/dist/market_adapter/core/strategies/ama_slope_model.d.ts.map +1 -1
- package/dist/market_adapter/core/strategies/ama_slope_model.js +23 -30
- package/dist/market_adapter/core/strategies/ama_slope_model.js.map +1 -1
- package/dist/market_adapter/core/strategies/atr/calculator.d.ts +5 -4
- package/dist/market_adapter/core/strategies/atr/calculator.d.ts.map +1 -1
- package/dist/market_adapter/core/strategies/atr/calculator.js +5 -3
- package/dist/market_adapter/core/strategies/atr/calculator.js.map +1 -1
- package/dist/market_adapter/core/strategies/collateral_manager.d.ts +4 -7
- package/dist/market_adapter/core/strategies/collateral_manager.d.ts.map +1 -1
- package/dist/market_adapter/core/strategies/collateral_manager.js +5 -4
- package/dist/market_adapter/core/strategies/collateral_manager.js.map +1 -1
- package/dist/market_adapter/core/strategies/regime_gate.d.ts +11 -19
- package/dist/market_adapter/core/strategies/regime_gate.d.ts.map +1 -1
- package/dist/market_adapter/core/strategies/regime_gate.js +22 -22
- package/dist/market_adapter/core/strategies/regime_gate.js.map +1 -1
- package/dist/market_adapter/index.d.ts +24 -2
- package/dist/market_adapter/index.d.ts.map +1 -1
- package/dist/market_adapter/index.js +82 -56
- package/dist/market_adapter/index.js.map +1 -1
- package/dist/market_adapter/inputs/fetch_cex_synthetic_data.js +26 -37
- package/dist/market_adapter/inputs/fetch_cex_synthetic_data.js.map +1 -1
- package/dist/market_adapter/inputs/fetch_lp_data.d.ts +4 -12
- package/dist/market_adapter/inputs/fetch_lp_data.d.ts.map +1 -1
- package/dist/market_adapter/inputs/fetch_lp_data.js +100 -66
- package/dist/market_adapter/inputs/fetch_lp_data.js.map +1 -1
- package/dist/market_adapter/inputs/kibana_source.d.ts +4 -9
- package/dist/market_adapter/inputs/kibana_source.d.ts.map +1 -1
- package/dist/market_adapter/inputs/kibana_source.js +17 -18
- package/dist/market_adapter/inputs/kibana_source.js.map +1 -1
- package/dist/market_adapter/interval_utils.d.ts +1 -4
- package/dist/market_adapter/interval_utils.d.ts.map +1 -1
- package/dist/market_adapter/interval_utils.js +2 -3
- package/dist/market_adapter/interval_utils.js.map +1 -1
- package/dist/market_adapter/log_format.d.ts +1 -9
- package/dist/market_adapter/log_format.d.ts.map +1 -1
- package/dist/market_adapter/log_format.js +7 -8
- package/dist/market_adapter/log_format.js.map +1 -1
- package/dist/market_adapter/lp_chart_core.d.ts +1 -4
- package/dist/market_adapter/lp_chart_core.d.ts.map +1 -1
- package/dist/market_adapter/lp_chart_core.js +22 -20
- package/dist/market_adapter/lp_chart_core.js.map +1 -1
- package/dist/market_adapter/lp_chart_runner.d.ts +13 -24
- package/dist/market_adapter/lp_chart_runner.d.ts.map +1 -1
- package/dist/market_adapter/lp_chart_runner.js +58 -56
- package/dist/market_adapter/lp_chart_runner.js.map +1 -1
- package/dist/market_adapter/lp_chart_strategy_loader.d.ts +4 -17
- package/dist/market_adapter/lp_chart_strategy_loader.d.ts.map +1 -1
- package/dist/market_adapter/lp_chart_strategy_loader.js +36 -36
- package/dist/market_adapter/lp_chart_strategy_loader.js.map +1 -1
- package/dist/market_adapter/market_adapter.d.ts +51 -72
- package/dist/market_adapter/market_adapter.d.ts.map +1 -1
- package/dist/market_adapter/market_adapter.js +227 -192
- package/dist/market_adapter/market_adapter.js.map +1 -1
- package/dist/market_adapter/merge_lp_data.js +17 -16
- package/dist/market_adapter/merge_lp_data.js.map +1 -1
- package/dist/market_adapter/test_helpers.d.ts +9 -13
- package/dist/market_adapter/test_helpers.d.ts.map +1 -1
- package/dist/market_adapter/test_helpers.js +14 -14
- package/dist/market_adapter/test_helpers.js.map +1 -1
- package/dist/market_adapter/utils/adapter_client.d.ts +6 -14
- package/dist/market_adapter/utils/adapter_client.d.ts.map +1 -1
- package/dist/market_adapter/utils/adapter_client.js +16 -15
- package/dist/market_adapter/utils/adapter_client.js.map +1 -1
- package/dist/market_adapter/utils/atomic_write.d.ts +2 -5
- package/dist/market_adapter/utils/atomic_write.d.ts.map +1 -1
- package/dist/market_adapter/utils/atomic_write.js +5 -5
- package/dist/market_adapter/utils/atomic_write.js.map +1 -1
- package/dist/market_adapter/utils/chain.d.ts +19 -21
- package/dist/market_adapter/utils/chain.d.ts.map +1 -1
- package/dist/market_adapter/utils/chain.js +15 -16
- package/dist/market_adapter/utils/chain.js.map +1 -1
- package/dist/market_adapter/utils/data_discovery.d.ts +1 -4
- package/dist/market_adapter/utils/data_discovery.d.ts.map +1 -1
- package/dist/market_adapter/utils/data_discovery.js +10 -10
- package/dist/market_adapter/utils/data_discovery.js.map +1 -1
- package/dist/market_adapter/utils/dynamic_grid_snapshot.d.ts +1 -6
- package/dist/market_adapter/utils/dynamic_grid_snapshot.d.ts.map +1 -1
- package/dist/market_adapter/utils/dynamic_grid_snapshot.js +14 -14
- package/dist/market_adapter/utils/dynamic_grid_snapshot.js.map +1 -1
- package/dist/market_adapter/utils/file_lock.d.ts +1 -7
- package/dist/market_adapter/utils/file_lock.d.ts.map +1 -1
- package/dist/market_adapter/utils/file_lock.js +21 -25
- package/dist/market_adapter/utils/file_lock.js.map +1 -1
- package/dist/market_adapter/utils/native_history.d.ts +12 -12
- package/dist/market_adapter/utils/native_history.d.ts.map +1 -1
- package/dist/market_adapter/utils/native_history.js +15 -15
- package/dist/market_adapter/utils/native_history.js.map +1 -1
- package/dist/market_adapter/utils/paths.d.ts +2 -4
- package/dist/market_adapter/utils/paths.d.ts.map +1 -1
- package/dist/market_adapter/utils/paths.js +6 -5
- package/dist/market_adapter/utils/paths.js.map +1 -1
- package/dist/modules/account_bots.d.ts +7 -8
- package/dist/modules/account_bots.d.ts.map +1 -1
- package/dist/modules/account_bots.js +92 -114
- package/dist/modules/account_bots.js.map +1 -1
- package/dist/modules/account_orders.d.ts +5 -9
- package/dist/modules/account_orders.d.ts.map +1 -1
- package/dist/modules/account_orders.js +69 -32
- package/dist/modules/account_orders.js.map +1 -1
- package/dist/modules/authority_resolver.d.ts +32 -1
- package/dist/modules/authority_resolver.d.ts.map +1 -1
- package/dist/modules/authority_resolver.js +18 -12
- package/dist/modules/authority_resolver.js.map +1 -1
- package/dist/modules/bitshares-native/chain_client.d.ts +3 -8
- package/dist/modules/bitshares-native/chain_client.d.ts.map +1 -1
- package/dist/modules/bitshares-native/chain_client.js +21 -16
- package/dist/modules/bitshares-native/chain_client.js.map +1 -1
- package/dist/modules/bitshares-native/crypto/ecc.browser.d.ts +21 -29
- package/dist/modules/bitshares-native/crypto/ecc.browser.d.ts.map +1 -1
- package/dist/modules/bitshares-native/crypto/ecc.browser.js +72 -38
- package/dist/modules/bitshares-native/crypto/ecc.browser.js.map +1 -1
- package/dist/modules/bitshares-native/crypto/ecc.d.ts +9 -36
- package/dist/modules/bitshares-native/crypto/ecc.d.ts.map +1 -1
- package/dist/modules/bitshares-native/crypto/ecc.js +40 -83
- package/dist/modules/bitshares-native/crypto/ecc.js.map +1 -1
- package/dist/modules/bitshares-native/crypto/ecc_selector.d.ts +14 -1
- package/dist/modules/bitshares-native/crypto/ecc_selector.d.ts.map +1 -1
- package/dist/modules/bitshares-native/crypto/ecc_selector.js +5 -3
- package/dist/modules/bitshares-native/crypto/ecc_selector.js.map +1 -1
- package/dist/modules/bitshares-native/index.d.ts +10 -2
- package/dist/modules/bitshares-native/index.d.ts.map +1 -1
- package/dist/modules/bitshares-native/index.js +68 -31
- package/dist/modules/bitshares-native/index.js.map +1 -1
- package/dist/modules/bitshares-native/lru_cache.d.ts +1 -4
- package/dist/modules/bitshares-native/lru_cache.d.ts.map +1 -1
- package/dist/modules/bitshares-native/lru_cache.js +6 -3
- package/dist/modules/bitshares-native/lru_cache.js.map +1 -1
- package/dist/modules/bitshares-native/resolvers.d.ts +3 -6
- package/dist/modules/bitshares-native/resolvers.d.ts.map +1 -1
- package/dist/modules/bitshares-native/resolvers.js +11 -9
- package/dist/modules/bitshares-native/resolvers.js.map +1 -1
- package/dist/modules/bitshares-native/serial/chain_constants.d.ts +53 -55
- package/dist/modules/bitshares-native/serial/chain_constants.d.ts.map +1 -1
- package/dist/modules/bitshares-native/serial/chain_constants.js +28 -27
- package/dist/modules/bitshares-native/serial/chain_constants.js.map +1 -1
- package/dist/modules/bitshares-native/serial/index.d.ts +5 -9
- package/dist/modules/bitshares-native/serial/index.d.ts.map +1 -1
- package/dist/modules/bitshares-native/serial/index.js +46 -12
- package/dist/modules/bitshares-native/serial/index.js.map +1 -1
- package/dist/modules/bitshares-native/serial/operations.d.ts +102 -100
- package/dist/modules/bitshares-native/serial/operations.d.ts.map +1 -1
- package/dist/modules/bitshares-native/serial/operations.js +473 -471
- package/dist/modules/bitshares-native/serial/operations.js.map +1 -1
- package/dist/modules/bitshares-native/serial/serializer.d.ts +2 -7
- package/dist/modules/bitshares-native/serial/serializer.d.ts.map +1 -1
- package/dist/modules/bitshares-native/serial/serializer.js +8 -3
- package/dist/modules/bitshares-native/serial/serializer.js.map +1 -1
- package/dist/modules/bitshares-native/serial/types.d.ts +26 -41
- package/dist/modules/bitshares-native/serial/types.d.ts.map +1 -1
- package/dist/modules/bitshares-native/serial/types.js +76 -42
- package/dist/modules/bitshares-native/serial/types.js.map +1 -1
- package/dist/modules/bitshares-native/signing_client.d.ts +1 -5
- package/dist/modules/bitshares-native/signing_client.d.ts.map +1 -1
- package/dist/modules/bitshares-native/signing_client.js +49 -11
- package/dist/modules/bitshares-native/signing_client.js.map +1 -1
- package/dist/modules/bitshares-native/subscriptions.d.ts +1 -4
- package/dist/modules/bitshares-native/subscriptions.d.ts.map +1 -1
- package/dist/modules/bitshares-native/subscriptions.js +47 -84
- package/dist/modules/bitshares-native/subscriptions.js.map +1 -1
- package/dist/modules/bitshares-native/transport.d.ts +1 -8
- package/dist/modules/bitshares-native/transport.d.ts.map +1 -1
- package/dist/modules/bitshares-native/transport.js +22 -15
- package/dist/modules/bitshares-native/transport.js.map +1 -1
- package/dist/modules/bitshares-native/tx/builder.d.ts +3 -8
- package/dist/modules/bitshares-native/tx/builder.d.ts.map +1 -1
- package/dist/modules/bitshares-native/tx/builder.js +61 -23
- package/dist/modules/bitshares-native/tx/builder.js.map +1 -1
- package/dist/modules/bitshares-native/tx/tx_cache.d.ts +1 -8
- package/dist/modules/bitshares-native/tx/tx_cache.d.ts.map +1 -1
- package/dist/modules/bitshares-native/tx/tx_cache.js +21 -17
- package/dist/modules/bitshares-native/tx/tx_cache.js.map +1 -1
- package/dist/modules/bitshares_client.d.ts +12 -23
- package/dist/modules/bitshares_client.d.ts.map +1 -1
- package/dist/modules/bitshares_client.js +109 -56
- package/dist/modules/bitshares_client.js.map +1 -1
- package/dist/modules/bot_settings.d.ts +1 -13
- package/dist/modules/bot_settings.d.ts.map +1 -1
- package/dist/modules/bot_settings.js +34 -34
- package/dist/modules/bot_settings.js.map +1 -1
- package/dist/modules/bots_file_lock.d.ts +3 -9
- package/dist/modules/bots_file_lock.d.ts.map +1 -1
- package/dist/modules/bots_file_lock.js +8 -9
- package/dist/modules/bots_file_lock.js.map +1 -1
- package/dist/modules/chain_keys.d.ts +7 -39
- package/dist/modules/chain_keys.d.ts.map +1 -1
- package/dist/modules/chain_keys.js +126 -90
- package/dist/modules/chain_keys.js.map +1 -1
- package/dist/modules/chain_orders.d.ts +46 -52
- package/dist/modules/chain_orders.d.ts.map +1 -1
- package/dist/modules/chain_orders.js +152 -104
- package/dist/modules/chain_orders.js.map +1 -1
- package/dist/modules/config.d.ts +50 -57
- package/dist/modules/config.d.ts.map +1 -1
- package/dist/modules/config.js +28 -24
- package/dist/modules/config.js.map +1 -1
- package/dist/modules/constants.d.ts +492 -492
- package/dist/modules/constants.d.ts.map +1 -1
- package/dist/modules/constants.js +79 -39
- package/dist/modules/constants.js.map +1 -1
- package/dist/modules/cr_planner.d.ts +1 -13
- package/dist/modules/cr_planner.d.ts.map +1 -1
- package/dist/modules/cr_planner.js +28 -28
- package/dist/modules/cr_planner.js.map +1 -1
- package/dist/modules/credential_policy.d.ts +18 -33
- package/dist/modules/credential_policy.d.ts.map +1 -1
- package/dist/modules/credential_policy.js +114 -87
- package/dist/modules/credential_policy.js.map +1 -1
- package/dist/modules/credential_runtime.d.ts +11 -21
- package/dist/modules/credential_runtime.d.ts.map +1 -1
- package/dist/modules/credential_runtime.js +40 -40
- package/dist/modules/credential_runtime.js.map +1 -1
- package/dist/modules/credential_session_cache.d.ts +8 -8
- package/dist/modules/credential_session_cache.d.ts.map +1 -1
- package/dist/modules/credential_session_cache.js +41 -8
- package/dist/modules/credential_session_cache.js.map +1 -1
- package/dist/modules/credit_runtime.d.ts +51 -316
- package/dist/modules/credit_runtime.d.ts.map +1 -1
- package/dist/modules/credit_runtime.js +257 -183
- package/dist/modules/credit_runtime.js.map +1 -1
- package/dist/modules/crypto/browser_provider.js +6 -6
- package/dist/modules/crypto/browser_provider.js.map +1 -1
- package/dist/modules/crypto/index.d.ts.map +1 -1
- package/dist/modules/crypto/index.js +2 -0
- package/dist/modules/crypto/index.js.map +1 -1
- package/dist/modules/crypto/sync.js +3 -3
- package/dist/modules/crypto/sync.js.map +1 -1
- package/dist/modules/dexbot_class.d.ts +124 -73
- package/dist/modules/dexbot_class.d.ts.map +1 -1
- package/dist/modules/dexbot_class.js +198 -3577
- package/dist/modules/dexbot_class.js.map +1 -1
- package/dist/modules/dexbot_cow_runtime.d.ts +322 -0
- package/dist/modules/dexbot_cow_runtime.d.ts.map +1 -0
- package/dist/modules/dexbot_cow_runtime.js +1836 -0
- package/dist/modules/dexbot_cow_runtime.js.map +1 -0
- package/dist/modules/dexbot_credential_client.d.ts +5 -11
- package/dist/modules/dexbot_credential_client.d.ts.map +1 -1
- package/dist/modules/dexbot_credential_client.js +32 -30
- package/dist/modules/dexbot_credential_client.js.map +1 -1
- package/dist/modules/dexbot_fill_runtime.d.ts +47 -15
- package/dist/modules/dexbot_fill_runtime.d.ts.map +1 -1
- package/dist/modules/dexbot_fill_runtime.js +565 -22
- package/dist/modules/dexbot_fill_runtime.js.map +1 -1
- package/dist/modules/dexbot_maintenance_runtime.d.ts +79 -10
- package/dist/modules/dexbot_maintenance_runtime.d.ts.map +1 -1
- package/dist/modules/dexbot_maintenance_runtime.js +294 -55
- package/dist/modules/dexbot_maintenance_runtime.js.map +1 -1
- package/dist/modules/dexbot_startup_runtime.d.ts +26 -0
- package/dist/modules/dexbot_startup_runtime.d.ts.map +1 -0
- package/dist/modules/dexbot_startup_runtime.js +575 -0
- package/dist/modules/dexbot_startup_runtime.js.map +1 -0
- package/dist/modules/dexbot_state_recovery.d.ts +115 -0
- package/dist/modules/dexbot_state_recovery.d.ts.map +1 -0
- package/dist/modules/dexbot_state_recovery.js +431 -0
- package/dist/modules/dexbot_state_recovery.js.map +1 -0
- package/dist/modules/fund_registry.d.ts +1 -13
- package/dist/modules/fund_registry.d.ts.map +1 -1
- package/dist/modules/fund_registry.js +23 -22
- package/dist/modules/fund_registry.js.map +1 -1
- package/dist/modules/general_settings.d.ts +3 -7
- package/dist/modules/general_settings.d.ts.map +1 -1
- package/dist/modules/general_settings.js +15 -15
- package/dist/modules/general_settings.js.map +1 -1
- package/dist/modules/graceful_shutdown.d.ts +1 -6
- package/dist/modules/graceful_shutdown.d.ts.map +1 -1
- package/dist/modules/graceful_shutdown.js +19 -16
- package/dist/modules/graceful_shutdown.js.map +1 -1
- package/dist/modules/key_store.d.ts.map +1 -1
- package/dist/modules/key_store.js +53 -20
- package/dist/modules/key_store.js.map +1 -1
- package/dist/modules/launcher/bot_supervisor.d.ts +23 -66
- package/dist/modules/launcher/bot_supervisor.d.ts.map +1 -1
- package/dist/modules/launcher/bot_supervisor.js +115 -107
- package/dist/modules/launcher/bot_supervisor.js.map +1 -1
- package/dist/modules/launcher/child_env.d.ts +2 -5
- package/dist/modules/launcher/child_env.d.ts.map +1 -1
- package/dist/modules/launcher/child_env.js +4 -4
- package/dist/modules/launcher/child_env.js.map +1 -1
- package/dist/modules/launcher/credential_bootstrap.d.ts +4 -8
- package/dist/modules/launcher/credential_bootstrap.d.ts.map +1 -1
- package/dist/modules/launcher/credential_bootstrap.js +30 -26
- package/dist/modules/launcher/credential_bootstrap.js.map +1 -1
- package/dist/modules/launcher/credential_daemon.d.ts +8 -15
- package/dist/modules/launcher/credential_daemon.d.ts.map +1 -1
- package/dist/modules/launcher/credential_daemon.js +72 -41
- package/dist/modules/launcher/credential_daemon.js.map +1 -1
- package/dist/modules/launcher/credential_secret.d.ts +1 -4
- package/dist/modules/launcher/credential_secret.d.ts.map +1 -1
- package/dist/modules/launcher/credential_secret.js +36 -4
- package/dist/modules/launcher/credential_secret.js.map +1 -1
- package/dist/modules/launcher/foreign_cred_daemon.d.ts +32 -1
- package/dist/modules/launcher/foreign_cred_daemon.d.ts.map +1 -1
- package/dist/modules/launcher/foreign_cred_daemon.js +25 -28
- package/dist/modules/launcher/foreign_cred_daemon.js.map +1 -1
- package/dist/modules/launcher/headless_password.d.ts +1 -4
- package/dist/modules/launcher/headless_password.d.ts.map +1 -1
- package/dist/modules/launcher/headless_password.js +11 -11
- package/dist/modules/launcher/headless_password.js.map +1 -1
- package/dist/modules/launcher/launch_modes.d.ts +15 -14
- package/dist/modules/launcher/launch_modes.d.ts.map +1 -1
- package/dist/modules/launcher/launch_modes.js +8 -8
- package/dist/modules/launcher/launch_modes.js.map +1 -1
- package/dist/modules/launcher/market_adapter_runtime.d.ts +10 -19
- package/dist/modules/launcher/market_adapter_runtime.d.ts.map +1 -1
- package/dist/modules/launcher/market_adapter_runtime.js +33 -34
- package/dist/modules/launcher/market_adapter_runtime.js.map +1 -1
- package/dist/modules/launcher/market_adapter_watchdog.d.ts +10 -17
- package/dist/modules/launcher/market_adapter_watchdog.d.ts.map +1 -1
- package/dist/modules/launcher/market_adapter_watchdog.js +42 -39
- package/dist/modules/launcher/market_adapter_watchdog.js.map +1 -1
- package/dist/modules/launcher/monolithic_runtime.d.ts +28 -57
- package/dist/modules/launcher/monolithic_runtime.d.ts.map +1 -1
- package/dist/modules/launcher/monolithic_runtime.js +135 -108
- package/dist/modules/launcher/monolithic_runtime.js.map +1 -1
- package/dist/modules/launcher/runtime_entry.d.ts +5 -10
- package/dist/modules/launcher/runtime_entry.d.ts.map +1 -1
- package/dist/modules/launcher/runtime_entry.js +14 -14
- package/dist/modules/launcher/runtime_entry.js.map +1 -1
- package/dist/modules/launcher/status_reporting.d.ts +17 -37
- package/dist/modules/launcher/status_reporting.d.ts.map +1 -1
- package/dist/modules/launcher/status_reporting.js +35 -34
- package/dist/modules/launcher/status_reporting.js.map +1 -1
- package/dist/modules/launcher/supervisor_control.d.ts +1 -4
- package/dist/modules/launcher/supervisor_control.d.ts.map +1 -1
- package/dist/modules/launcher/supervisor_control.js +9 -4
- package/dist/modules/launcher/supervisor_control.js.map +1 -1
- package/dist/modules/logger.d.ts +3 -1
- package/dist/modules/logger.d.ts.map +1 -1
- package/dist/modules/logger.js +38 -28
- package/dist/modules/logger.js.map +1 -1
- package/dist/modules/market_adapter_whitelist.d.ts +2 -10
- package/dist/modules/market_adapter_whitelist.d.ts.map +1 -1
- package/dist/modules/market_adapter_whitelist.js +18 -16
- package/dist/modules/market_adapter_whitelist.js.map +1 -1
- package/dist/modules/node_health_cache.d.ts +2 -12
- package/dist/modules/node_health_cache.d.ts.map +1 -1
- package/dist/modules/node_health_cache.js +24 -24
- package/dist/modules/node_health_cache.js.map +1 -1
- package/dist/modules/node_manager.d.ts +1 -1
- package/dist/modules/node_manager.d.ts.map +1 -1
- package/dist/modules/node_manager.js +44 -38
- package/dist/modules/node_manager.js.map +1 -1
- package/dist/modules/order/accounting.d.ts +12 -12
- package/dist/modules/order/accounting.d.ts.map +1 -1
- package/dist/modules/order/accounting.js +111 -76
- package/dist/modules/order/accounting.js.map +1 -1
- package/dist/modules/order/async_lock.d.ts +1 -2
- package/dist/modules/order/async_lock.d.ts.map +1 -1
- package/dist/modules/order/async_lock.js +4 -4
- package/dist/modules/order/async_lock.js.map +1 -1
- package/dist/modules/order/export.d.ts +8 -14
- package/dist/modules/order/export.d.ts.map +1 -1
- package/dist/modules/order/export.js +77 -42
- package/dist/modules/order/export.js.map +1 -1
- package/dist/modules/order/format.d.ts +17 -22
- package/dist/modules/order/format.d.ts.map +1 -1
- package/dist/modules/order/format.js +25 -31
- package/dist/modules/order/format.js.map +1 -1
- package/dist/modules/order/grid.d.ts +18 -104
- package/dist/modules/order/grid.d.ts.map +1 -1
- package/dist/modules/order/grid.js +246 -188
- package/dist/modules/order/grid.js.map +1 -1
- package/dist/modules/order/grid_reconcile.d.ts +8 -8
- package/dist/modules/order/grid_reconcile.d.ts.map +1 -1
- package/dist/modules/order/grid_reconcile.js +24 -24
- package/dist/modules/order/grid_reconcile.js.map +1 -1
- package/dist/modules/order/grid_reconcile_internal.d.ts +224 -1
- package/dist/modules/order/grid_reconcile_internal.d.ts.map +1 -1
- package/dist/modules/order/grid_reconcile_internal.js +145 -72
- package/dist/modules/order/grid_reconcile_internal.js.map +1 -1
- package/dist/modules/order/index.d.ts +1 -1
- package/dist/modules/order/index.d.ts.map +1 -1
- package/dist/modules/order/index.js +42 -7
- package/dist/modules/order/index.js.map +1 -1
- package/dist/modules/order/logger.d.ts +6 -16
- package/dist/modules/order/logger.d.ts.map +1 -1
- package/dist/modules/order/logger.js +76 -53
- package/dist/modules/order/logger.js.map +1 -1
- package/dist/modules/order/logger_state.d.ts +4 -4
- package/dist/modules/order/logger_state.d.ts.map +1 -1
- package/dist/modules/order/logger_state.js +3 -1
- package/dist/modules/order/logger_state.js.map +1 -1
- package/dist/modules/order/manager.d.ts +160 -37
- package/dist/modules/order/manager.d.ts.map +1 -1
- package/dist/modules/order/manager.js +166 -128
- package/dist/modules/order/manager.js.map +1 -1
- package/dist/modules/order/processed_fill_store.d.ts +6 -10
- package/dist/modules/order/processed_fill_store.d.ts.map +1 -1
- package/dist/modules/order/processed_fill_store.js +10 -9
- package/dist/modules/order/processed_fill_store.js.map +1 -1
- package/dist/modules/order/strategy.d.ts +3 -3
- package/dist/modules/order/strategy.d.ts.map +1 -1
- package/dist/modules/order/strategy.js +29 -27
- package/dist/modules/order/strategy.js.map +1 -1
- package/dist/modules/order/sync_engine.d.ts +9 -19
- package/dist/modules/order/sync_engine.d.ts.map +1 -1
- package/dist/modules/order/sync_engine.js +176 -126
- package/dist/modules/order/sync_engine.js.map +1 -1
- package/dist/modules/order/utils/math.d.ts +55 -85
- package/dist/modules/order/utils/math.d.ts.map +1 -1
- package/dist/modules/order/utils/math.js +155 -88
- package/dist/modules/order/utils/math.js.map +1 -1
- package/dist/modules/order/utils/order.d.ts +27 -72
- package/dist/modules/order/utils/order.d.ts.map +1 -1
- package/dist/modules/order/utils/order.js +144 -105
- package/dist/modules/order/utils/order.js.map +1 -1
- package/dist/modules/order/utils/system.d.ts +74 -44
- package/dist/modules/order/utils/system.d.ts.map +1 -1
- package/dist/modules/order/utils/system.js +188 -149
- package/dist/modules/order/utils/system.js.map +1 -1
- package/dist/modules/order/utils/validate.d.ts +21 -43
- package/dist/modules/order/utils/validate.d.ts.map +1 -1
- package/dist/modules/order/utils/validate.js +140 -110
- package/dist/modules/order/utils/validate.js.map +1 -1
- package/dist/modules/order/working_grid.d.ts +1 -4
- package/dist/modules/order/working_grid.d.ts.map +1 -1
- package/dist/modules/order/working_grid.js +9 -7
- package/dist/modules/order/working_grid.js.map +1 -1
- package/dist/modules/path_api.js +2 -2
- package/dist/modules/path_api.js.map +1 -1
- package/dist/modules/paths.d.ts +51 -55
- package/dist/modules/paths.d.ts.map +1 -1
- package/dist/modules/paths.js +72 -52
- package/dist/modules/paths.js.map +1 -1
- package/dist/modules/process_discovery.d.ts +1 -1
- package/dist/modules/process_discovery.d.ts.map +1 -1
- package/dist/modules/process_discovery.js +7 -7
- package/dist/modules/process_discovery.js.map +1 -1
- package/dist/modules/runtime.d.ts +1 -1
- package/dist/modules/runtime.d.ts.map +1 -1
- package/dist/modules/runtime.js +4 -4
- package/dist/modules/runtime.js.map +1 -1
- package/dist/modules/runtime_settings.d.ts +1 -0
- package/dist/modules/runtime_settings.d.ts.map +1 -1
- package/dist/modules/runtime_settings.js +15 -10
- package/dist/modules/runtime_settings.js.map +1 -1
- package/dist/modules/settings_merge.d.ts +1 -4
- package/dist/modules/settings_merge.d.ts.map +1 -1
- package/dist/modules/settings_merge.js +2 -1
- package/dist/modules/settings_merge.js.map +1 -1
- package/dist/modules/storage/browser_adapter.d.ts +7 -3
- package/dist/modules/storage/browser_adapter.d.ts.map +1 -1
- package/dist/modules/storage/browser_adapter.js +2 -0
- package/dist/modules/storage/browser_adapter.js.map +1 -1
- package/dist/modules/storage/index.d.ts +2 -2
- package/dist/modules/storage/index.d.ts.map +1 -1
- package/dist/modules/storage/index.js +2 -5
- package/dist/modules/storage/index.js.map +1 -1
- package/dist/modules/storage/node_adapter.d.ts +3 -3
- package/dist/modules/storage/node_adapter.d.ts.map +1 -1
- package/dist/modules/storage/node_adapter.js +9 -7
- package/dist/modules/storage/node_adapter.js.map +1 -1
- package/dist/modules/storage/types.d.ts +13 -10
- package/dist/modules/storage/types.d.ts.map +1 -1
- package/dist/modules/types.d.ts +0 -2
- package/dist/modules/types.d.ts.map +1 -1
- package/dist/modules/utils/base58check.d.ts +1 -9
- package/dist/modules/utils/base58check.d.ts.map +1 -1
- package/dist/modules/utils/base58check.js +14 -16
- package/dist/modules/utils/base58check.js.map +1 -1
- package/dist/modules/utils/build_dir.d.ts +2 -5
- package/dist/modules/utils/build_dir.d.ts.map +1 -1
- package/dist/modules/utils/build_dir.js +6 -3
- package/dist/modules/utils/build_dir.js.map +1 -1
- package/dist/modules/utils/errors.d.ts +2 -0
- package/dist/modules/utils/errors.d.ts.map +1 -0
- package/dist/modules/utils/errors.js +12 -0
- package/dist/modules/utils/errors.js.map +1 -0
- package/dist/modules/utils/fs_utils.d.ts +1 -8
- package/dist/modules/utils/fs_utils.d.ts.map +1 -1
- package/dist/modules/utils/fs_utils.js +8 -3
- package/dist/modules/utils/fs_utils.js.map +1 -1
- package/dist/modules/utils/math_utils.d.ts +2 -6
- package/dist/modules/utils/math_utils.d.ts.map +1 -1
- package/dist/modules/utils/math_utils.js +6 -2
- package/dist/modules/utils/math_utils.js.map +1 -1
- package/dist/modules/validate_profiles.d.ts +1 -11
- package/dist/modules/validate_profiles.d.ts.map +1 -1
- package/dist/modules/validate_profiles.js +25 -27
- package/dist/modules/validate_profiles.js.map +1 -1
- package/dist/pm2.d.ts +7 -6
- package/dist/pm2.d.ts.map +1 -1
- package/dist/pm2.js +132 -106
- package/dist/pm2.js.map +1 -1
- package/dist/scripts/analyze-git.d.ts.map +1 -1
- package/dist/scripts/analyze-git.js +15 -11
- package/dist/scripts/analyze-git.js.map +1 -1
- package/dist/scripts/analyze-orders.d.ts +146 -1
- package/dist/scripts/analyze-orders.d.ts.map +1 -1
- package/dist/scripts/analyze-orders.js +81 -105
- package/dist/scripts/analyze-orders.js.map +1 -1
- package/dist/scripts/diagnose-pool-history.d.ts.map +1 -1
- package/dist/scripts/diagnose-pool-history.js +9 -8
- package/dist/scripts/diagnose-pool-history.js.map +1 -1
- package/dist/scripts/divergence-calc.d.ts.map +1 -1
- package/dist/scripts/divergence-calc.js +11 -8
- package/dist/scripts/divergence-calc.js.map +1 -1
- package/dist/scripts/fix-err-message.d.ts +3 -0
- package/dist/scripts/fix-err-message.d.ts.map +1 -0
- package/dist/scripts/fix-err-message.js +198 -0
- package/dist/scripts/fix-err-message.js.map +1 -0
- package/dist/scripts/generate_lp_chart.d.ts +2 -9
- package/dist/scripts/generate_lp_chart.d.ts.map +1 -1
- package/dist/scripts/generate_lp_chart.js +14 -10
- package/dist/scripts/generate_lp_chart.js.map +1 -1
- package/dist/scripts/generate_mainnet_corpus_report.js +4 -4
- package/dist/scripts/generate_mainnet_corpus_report.js.map +1 -1
- package/dist/scripts/generate_market_adapter_whitelist.d.ts +17 -1
- package/dist/scripts/generate_market_adapter_whitelist.d.ts.map +1 -1
- package/dist/scripts/generate_market_adapter_whitelist.js +23 -20
- package/dist/scripts/generate_market_adapter_whitelist.js.map +1 -1
- package/dist/scripts/migrate_bot_keys.d.ts +1 -4
- package/dist/scripts/migrate_bot_keys.d.ts.map +1 -1
- package/dist/scripts/migrate_bot_keys.js +48 -124
- package/dist/scripts/migrate_bot_keys.js.map +1 -1
- package/dist/scripts/native_release_gates.d.ts.map +1 -1
- package/dist/scripts/native_release_gates.js +18 -14
- package/dist/scripts/native_release_gates.js.map +1 -1
- package/dist/scripts/print_grid.js +1 -1
- package/dist/scripts/print_grid.js.map +1 -1
- package/dist/scripts/run-tests.js +1 -0
- package/dist/scripts/run-tests.js.map +1 -1
- package/dist/scripts/runner.d.ts +1 -11
- package/dist/scripts/runner.d.ts.map +1 -1
- package/dist/scripts/runner.js +21 -19
- package/dist/scripts/runner.js.map +1 -1
- package/dist/scripts/test-credit-renewal.d.ts.map +1 -1
- package/dist/scripts/test-credit-renewal.js +2 -1
- package/dist/scripts/test-credit-renewal.js.map +1 -1
- package/dist/scripts/update.d.ts.map +1 -1
- package/dist/scripts/update.js +85 -79
- package/dist/scripts/update.js.map +1 -1
- package/dist/scripts/validate_bots.js +2 -2
- package/dist/scripts/validate_bots.js.map +1 -1
- package/dist/scripts/verify-browser-bundle.js +25 -1
- package/dist/scripts/verify-browser-bundle.js.map +1 -1
- package/dist/unlock.d.ts +4 -17
- package/dist/unlock.d.ts.map +1 -1
- package/dist/unlock.js +141 -108
- package/dist/unlock.js.map +1 -1
- package/package.json +7 -2
- package/dist/analysis/ama_fitting/analyze_ama_price_changes.d.ts +0 -3
- package/dist/analysis/ama_fitting/analyze_ama_price_changes.d.ts.map +0 -1
- package/dist/analysis/ama_fitting/analyze_ama_price_changes.js +0 -149
- package/dist/analysis/ama_fitting/analyze_ama_price_changes.js.map +0 -1
- package/dist/analysis/ama_fitting/analyze_lambda_vs_slow.d.ts +0 -3
- package/dist/analysis/ama_fitting/analyze_lambda_vs_slow.d.ts.map +0 -1
- package/dist/analysis/ama_fitting/analyze_lambda_vs_slow.js +0 -387
- package/dist/analysis/ama_fitting/analyze_lambda_vs_slow.js.map +0 -1
- package/dist/analysis/ama_fitting/calibrate_convergence_er.d.ts +0 -3
- package/dist/analysis/ama_fitting/calibrate_convergence_er.d.ts.map +0 -1
- package/dist/analysis/ama_fitting/calibrate_convergence_er.js +0 -200
- package/dist/analysis/ama_fitting/calibrate_convergence_er.js.map +0 -1
- package/dist/analysis/ama_fitting/fetch_lp_candles.d.ts +0 -3
- package/dist/analysis/ama_fitting/fetch_lp_candles.d.ts.map +0 -1
- package/dist/analysis/ama_fitting/fetch_lp_candles.js +0 -212
- package/dist/analysis/ama_fitting/fetch_lp_candles.js.map +0 -1
- package/dist/analysis/ama_fitting/generate_unified_comparison_chart.d.ts +0 -31
- package/dist/analysis/ama_fitting/generate_unified_comparison_chart.d.ts.map +0 -1
- package/dist/analysis/ama_fitting/generate_unified_comparison_chart.js +0 -249
- package/dist/analysis/ama_fitting/generate_unified_comparison_chart.js.map +0 -1
- package/dist/analysis/ama_fitting/optimizer_high_resolution.d.ts +0 -2
- package/dist/analysis/ama_fitting/optimizer_high_resolution.d.ts.map +0 -1
- package/dist/analysis/ama_fitting/optimizer_high_resolution.js +0 -782
- package/dist/analysis/ama_fitting/optimizer_high_resolution.js.map +0 -1
- package/dist/analysis/analyze_derivatives.d.ts +0 -95
- package/dist/analysis/analyze_derivatives.d.ts.map +0 -1
- package/dist/analysis/analyze_derivatives.js +0 -295
- package/dist/analysis/analyze_derivatives.js.map +0 -1
- package/dist/analysis/analyze_dynamic_weight.d.ts +0 -14
- package/dist/analysis/analyze_dynamic_weight.d.ts.map +0 -1
- package/dist/analysis/analyze_dynamic_weight.js +0 -207
- package/dist/analysis/analyze_dynamic_weight.js.map +0 -1
- package/dist/analysis/analyze_kalman.d.ts +0 -13
- package/dist/analysis/analyze_kalman.d.ts.map +0 -1
- package/dist/analysis/analyze_kalman.js +0 -123
- package/dist/analysis/analyze_kalman.js.map +0 -1
- package/dist/analysis/analyze_regime.d.ts +0 -20
- package/dist/analysis/analyze_regime.d.ts.map +0 -1
- package/dist/analysis/analyze_regime.js +0 -139
- package/dist/analysis/analyze_regime.js.map +0 -1
- package/dist/analysis/analyze_regime_windows.d.ts +0 -19
- package/dist/analysis/analyze_regime_windows.d.ts.map +0 -1
- package/dist/analysis/analyze_regime_windows.js +0 -413
- package/dist/analysis/analyze_regime_windows.js.map +0 -1
- package/dist/analysis/analyze_risk_profile.d.ts +0 -3
- package/dist/analysis/analyze_risk_profile.d.ts.map +0 -1
- package/dist/analysis/analyze_risk_profile.js +0 -159
- package/dist/analysis/analyze_risk_profile.js.map +0 -1
- package/dist/analysis/analyze_trade_heatmap.d.ts +0 -3
- package/dist/analysis/analyze_trade_heatmap.d.ts.map +0 -1
- package/dist/analysis/analyze_trade_heatmap.js +0 -367
- package/dist/analysis/analyze_trade_heatmap.js.map +0 -1
- package/dist/analysis/analyze_volatility.d.ts +0 -22
- package/dist/analysis/analyze_volatility.d.ts.map +0 -1
- package/dist/analysis/analyze_volatility.js +0 -172
- package/dist/analysis/analyze_volatility.js.map +0 -1
- package/dist/analysis/bot_fitting/backtest_ama_sweep.d.ts +0 -99
- package/dist/analysis/bot_fitting/backtest_ama_sweep.d.ts.map +0 -1
- package/dist/analysis/bot_fitting/backtest_ama_sweep.js +0 -804
- package/dist/analysis/bot_fitting/backtest_ama_sweep.js.map +0 -1
- package/dist/analysis/bot_fitting/backtest_bot_fitting.d.ts +0 -2
- package/dist/analysis/bot_fitting/backtest_bot_fitting.d.ts.map +0 -1
- package/dist/analysis/bot_fitting/backtest_bot_fitting.js +0 -347
- package/dist/analysis/bot_fitting/backtest_bot_fitting.js.map +0 -1
- package/dist/analysis/bot_fitting/shared_utils.d.ts +0 -15
- package/dist/analysis/bot_fitting/shared_utils.d.ts.map +0 -1
- package/dist/analysis/bot_fitting/shared_utils.js +0 -48
- package/dist/analysis/bot_fitting/shared_utils.js.map +0 -1
- package/dist/analysis/bot_key_utils.d.ts +0 -22
- package/dist/analysis/bot_key_utils.d.ts.map +0 -1
- package/dist/analysis/bot_key_utils.js +0 -162
- package/dist/analysis/bot_key_utils.js.map +0 -1
- package/dist/analysis/bot_usage/discover_bot_accounts.d.ts +0 -3
- package/dist/analysis/bot_usage/discover_bot_accounts.d.ts.map +0 -1
- package/dist/analysis/bot_usage/discover_bot_accounts.js +0 -498
- package/dist/analysis/bot_usage/discover_bot_accounts.js.map +0 -1
- package/dist/analysis/bot_usage/kibana_bot_queries.d.ts +0 -546
- package/dist/analysis/bot_usage/kibana_bot_queries.d.ts.map +0 -1
- package/dist/analysis/bot_usage/kibana_bot_queries.js +0 -427
- package/dist/analysis/bot_usage/kibana_bot_queries.js.map +0 -1
- package/dist/analysis/derivative_chart_generator.d.ts +0 -18
- package/dist/analysis/derivative_chart_generator.d.ts.map +0 -1
- package/dist/analysis/derivative_chart_generator.js +0 -896
- package/dist/analysis/derivative_chart_generator.js.map +0 -1
- package/dist/analysis/price_sources.d.ts +0 -34
- package/dist/analysis/price_sources.d.ts.map +0 -1
- package/dist/analysis/price_sources.js +0 -103
- package/dist/analysis/price_sources.js.map +0 -1
- package/dist/analysis/trade_profitability.d.ts +0 -115
- package/dist/analysis/trade_profitability.d.ts.map +0 -1
- package/dist/analysis/trade_profitability.js +0 -1247
- package/dist/analysis/trade_profitability.js.map +0 -1
- package/dist/analysis/tradingview/analyze_tradingview.d.ts +0 -36
- package/dist/analysis/tradingview/analyze_tradingview.d.ts.map +0 -1
- package/dist/analysis/tradingview/analyze_tradingview.js +0 -172
- package/dist/analysis/tradingview/analyze_tradingview.js.map +0 -1
- package/dist/analysis/trend_detection/derivative_analyzer.d.ts +0 -250
- package/dist/analysis/trend_detection/derivative_analyzer.d.ts.map +0 -1
- package/dist/analysis/trend_detection/derivative_analyzer.js +0 -903
- package/dist/analysis/trend_detection/derivative_analyzer.js.map +0 -1
- package/dist/analysis/trend_detection/dynamic_weight_chart_generator.d.ts +0 -6
- package/dist/analysis/trend_detection/dynamic_weight_chart_generator.d.ts.map +0 -1
- package/dist/analysis/trend_detection/dynamic_weight_chart_generator.js +0 -1450
- package/dist/analysis/trend_detection/dynamic_weight_chart_generator.js.map +0 -1
- package/dist/analysis/trend_detection/kalman_chart_generator.d.ts +0 -6
- package/dist/analysis/trend_detection/kalman_chart_generator.d.ts.map +0 -1
- package/dist/analysis/trend_detection/kalman_chart_generator.js +0 -408
- package/dist/analysis/trend_detection/kalman_chart_generator.js.map +0 -1
- package/dist/analysis/trend_detection/regime_chart_generator.d.ts +0 -6
- package/dist/analysis/trend_detection/regime_chart_generator.d.ts.map +0 -1
- package/dist/analysis/trend_detection/regime_chart_generator.js +0 -345
- package/dist/analysis/trend_detection/regime_chart_generator.js.map +0 -1
- package/dist/analysis/trend_detection/tests/test_kalman_trend.d.ts +0 -2
- package/dist/analysis/trend_detection/tests/test_kalman_trend.d.ts.map +0 -1
- package/dist/analysis/trend_detection/tests/test_kalman_trend.js +0 -130
- package/dist/analysis/trend_detection/tests/test_kalman_trend.js.map +0 -1
- package/dist/analysis/trend_detection/tests/test_kalman_velocity_smoothing.d.ts +0 -2
- package/dist/analysis/trend_detection/tests/test_kalman_velocity_smoothing.d.ts.map +0 -1
- package/dist/analysis/trend_detection/tests/test_kalman_velocity_smoothing.js +0 -38
- package/dist/analysis/trend_detection/tests/test_kalman_velocity_smoothing.js.map +0 -1
- package/dist/analysis/trend_detection/volatility_chart_generator.d.ts +0 -6
- package/dist/analysis/trend_detection/volatility_chart_generator.d.ts.map +0 -1
- package/dist/analysis/trend_detection/volatility_chart_generator.js +0 -732
- package/dist/analysis/trend_detection/volatility_chart_generator.js.map +0 -1
|
@@ -106,19 +106,81 @@
|
|
|
106
106
|
*
|
|
107
107
|
* ===============================================================================
|
|
108
108
|
*/
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
109
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
110
|
+
if (k2 === undefined) k2 = k;
|
|
111
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
112
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
113
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
114
|
+
}
|
|
115
|
+
Object.defineProperty(o, k2, desc);
|
|
116
|
+
}) : (function(o, m, k, k2) {
|
|
117
|
+
if (k2 === undefined) k2 = k;
|
|
118
|
+
o[k2] = m[k];
|
|
119
|
+
}));
|
|
120
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
121
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
122
|
+
}) : function(o, v) {
|
|
123
|
+
o["default"] = v;
|
|
124
|
+
});
|
|
125
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
126
|
+
var ownKeys = function(o) {
|
|
127
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
128
|
+
var ar = [];
|
|
129
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
130
|
+
return ar;
|
|
131
|
+
};
|
|
132
|
+
return ownKeys(o);
|
|
133
|
+
};
|
|
134
|
+
return function (mod) {
|
|
135
|
+
if (mod && mod.__esModule) return mod;
|
|
136
|
+
var result = {};
|
|
137
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
138
|
+
__setModuleDefault(result, mod);
|
|
139
|
+
return result;
|
|
140
|
+
};
|
|
141
|
+
})();
|
|
142
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
143
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
144
|
+
};
|
|
145
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
146
|
+
exports.BroadcastUncertainError = exports.FILL_PROCESSING_MODE = void 0;
|
|
147
|
+
exports.selectAccount = selectAccount;
|
|
148
|
+
exports.setPreferredAccount = setPreferredAccount;
|
|
149
|
+
exports.resolveAccountId = resolveAccountId;
|
|
150
|
+
exports.resolveAccountName = resolveAccountName;
|
|
151
|
+
exports.readOpenOrders = readOpenOrders;
|
|
152
|
+
exports.readSingleOrder = readSingleOrder;
|
|
153
|
+
exports.batchReadOrders = batchReadOrders;
|
|
154
|
+
exports.listenForFills = listenForFills;
|
|
155
|
+
exports.updateOrder = updateOrder;
|
|
156
|
+
exports.createOrder = createOrder;
|
|
157
|
+
exports.cancelOrder = cancelOrder;
|
|
158
|
+
exports.getOnChainAssetBalances = getOnChainAssetBalances;
|
|
159
|
+
exports.getFillProcessingMode = getFillProcessingMode;
|
|
160
|
+
exports.buildUpdateOrderOp = buildUpdateOrderOp;
|
|
161
|
+
exports.buildCreateOrderOp = buildCreateOrderOp;
|
|
162
|
+
exports.buildCancelOrderOp = buildCancelOrderOp;
|
|
163
|
+
exports.buildLiquidityPoolExchangeOp = buildLiquidityPoolExchangeOp;
|
|
164
|
+
exports.executeBatch = executeBatch;
|
|
165
|
+
exports.wasRecentlyOwnCancelled = wasRecentlyOwnCancelled;
|
|
166
|
+
exports.recordOwnCancel = recordOwnCancel;
|
|
167
|
+
const client = __importStar(require("./bitshares_client"));
|
|
168
|
+
const { BitShares, createAccountClient, waitForConnected, withTimeout } = client;
|
|
169
|
+
const math_1 = require("./order/utils/math");
|
|
170
|
+
const constants_1 = require("./constants");
|
|
171
|
+
const Format = __importStar(require("./order/format"));
|
|
172
|
+
const async_lock_1 = __importDefault(require("./order/async_lock"));
|
|
173
|
+
const system_1 = require("./order/utils/system");
|
|
174
|
+
const chainKeys = __importStar(require("./chain_keys"));
|
|
175
|
+
const key_store_1 = require("./key_store");
|
|
176
|
+
const dexbot_credential_client_1 = require("./dexbot_credential_client");
|
|
177
|
+
Object.defineProperty(exports, "BroadcastUncertainError", { enumerable: true, get: function () { return dexbot_credential_client_1.BroadcastUncertainError; } });
|
|
178
|
+
const logger_1 = __importDefault(require("./logger"));
|
|
179
|
+
const errors_1 = require("./utils/errors");
|
|
180
|
+
function getNodeManager() { return require('./bitshares_client').getNodeManager(); }
|
|
113
181
|
const { toFiniteNumber } = Format;
|
|
114
|
-
const
|
|
115
|
-
const {
|
|
116
|
-
const chainKeys = require('./chain_keys');
|
|
117
|
-
const { getKeyStore } = require('./key_store');
|
|
118
|
-
const { BroadcastUncertainError } = require('./dexbot_credential_client');
|
|
119
|
-
const Logger = require('./logger');
|
|
120
|
-
const chainOrdersLogger = new Logger('ChainOrders');
|
|
121
|
-
const { ORDER_EVENTS } = NATIVE_CLIENT;
|
|
182
|
+
const chainOrdersLogger = new logger_1.default('ChainOrders');
|
|
183
|
+
const { ORDER_EVENTS } = constants_1.NATIVE_CLIENT;
|
|
122
184
|
// Ring buffer of order ids the local process just cancelled.
|
|
123
185
|
// Used by the fill consumer to ignore a fill/cancel-history entry that is
|
|
124
186
|
// really just the propagation of the bot's own broadcast cancel op. Entries
|
|
@@ -165,14 +227,15 @@ function wasRecentlyOwnCancelled(orderId) {
|
|
|
165
227
|
* - 'history': Use fill event data directly to match order_id with account_orders (preferred, faster)
|
|
166
228
|
* - 'open': Fetch open orders from blockchain and sync (backup method, more API calls)
|
|
167
229
|
*/
|
|
168
|
-
const FILL_PROCESSING_MODE = FILL_PROCESSING.MODE;
|
|
230
|
+
const FILL_PROCESSING_MODE = constants_1.FILL_PROCESSING.MODE;
|
|
231
|
+
exports.FILL_PROCESSING_MODE = FILL_PROCESSING_MODE;
|
|
169
232
|
// AsyncLock instances for preventing race conditions
|
|
170
233
|
// _subscriptionLock: Serializes access to accountSubscriptions map
|
|
171
234
|
// _preferredAccountLock: Serializes access to preferredAccount global state
|
|
172
235
|
// _resolutionLock: Serializes account resolution calls and caching
|
|
173
|
-
const _subscriptionLock = new
|
|
174
|
-
const _preferredAccountLock = new
|
|
175
|
-
const _resolutionLock = new
|
|
236
|
+
const _subscriptionLock = new async_lock_1.default();
|
|
237
|
+
const _preferredAccountLock = new async_lock_1.default();
|
|
238
|
+
const _resolutionLock = new async_lock_1.default();
|
|
176
239
|
// Cache for account resolutions (name -> id and id -> name)
|
|
177
240
|
const _accountResolutionCache = new Map();
|
|
178
241
|
/**
|
|
@@ -202,7 +265,7 @@ async function _getAssetPrecision(assetRef) {
|
|
|
202
265
|
}
|
|
203
266
|
}
|
|
204
267
|
catch (e) {
|
|
205
|
-
throw new Error(`CRITICAL: Could not resolve precision for asset ${assetRef}. Halting operation to prevent scaling errors. Cause: ${e
|
|
268
|
+
throw new Error(`CRITICAL: Could not resolve precision for asset ${assetRef}. Halting operation to prevent scaling errors. Cause: ${(0, errors_1.getErrorMessage)(e)}`);
|
|
206
269
|
}
|
|
207
270
|
throw new Error(`CRITICAL: Could not resolve precision for asset ${assetRef}. Halting operation to prevent scaling errors. Cause: asset not found or precision missing.`);
|
|
208
271
|
}
|
|
@@ -346,9 +409,9 @@ async function _ensureAccountSubscriber(accountName, userCallback = null) {
|
|
|
346
409
|
// BitShares callback that receives raw updates and dispatches to user callbacks
|
|
347
410
|
const bsCallback = async (updates) => {
|
|
348
411
|
// Filter for fill-related operations
|
|
349
|
-
const fills = updates.filter(update => {
|
|
412
|
+
const fills = updates.filter((update) => {
|
|
350
413
|
const op = update.op;
|
|
351
|
-
return op && op[0] === FILL_PROCESSING.OPERATION_TYPE; // operation type for fill_order
|
|
414
|
+
return op && op[0] === constants_1.FILL_PROCESSING.OPERATION_TYPE; // operation type for fill_order
|
|
352
415
|
});
|
|
353
416
|
if (fills.length > 0) {
|
|
354
417
|
// Call each registered user callback with the fills array
|
|
@@ -359,18 +422,18 @@ async function _ensureAccountSubscriber(accountName, userCallback = null) {
|
|
|
359
422
|
}
|
|
360
423
|
catch (e) {
|
|
361
424
|
failures.push(e);
|
|
362
|
-
chainOrdersLogger.error(`chain_orders listener error ${e
|
|
425
|
+
chainOrdersLogger.error(`chain_orders listener error ${(0, errors_1.getErrorMessage)(e)}`);
|
|
363
426
|
}
|
|
364
427
|
}
|
|
365
428
|
if (failures.length > 0) {
|
|
366
|
-
const err = new Error(`Fill listener delivery failed for ${failures.length} callback(s): ${failures.map(e => e
|
|
429
|
+
const err = new Error(`Fill listener delivery failed for ${failures.length} callback(s): ${failures.map((e) => (0, errors_1.getErrorMessage)(e) || String(e)).join('; ')}`);
|
|
367
430
|
err.causes = failures;
|
|
368
431
|
throw err;
|
|
369
432
|
}
|
|
370
433
|
}
|
|
371
434
|
};
|
|
372
435
|
try {
|
|
373
|
-
await withTimeout(BitShares.subscribe('account', bsCallback, accountName), NATIVE_CLIENT.SUBSCRIPTIONS.SUBSCRIBE_TIMEOUT_MS, 'BitShares.subscribe');
|
|
436
|
+
await withTimeout(BitShares.subscribe('account', bsCallback, accountName), constants_1.NATIVE_CLIENT.SUBSCRIPTIONS.SUBSCRIBE_TIMEOUT_MS, 'BitShares.subscribe');
|
|
374
437
|
}
|
|
375
438
|
catch (subscribeErr) {
|
|
376
439
|
// Roll back any partial native-subscription state set up before the
|
|
@@ -385,7 +448,7 @@ async function _ensureAccountSubscriber(accountName, userCallback = null) {
|
|
|
385
448
|
}
|
|
386
449
|
catch (rollbackErr) {
|
|
387
450
|
chainOrdersLogger.warn(`Failed to roll back partial subscription for ${accountName} after error: ` +
|
|
388
|
-
`${
|
|
451
|
+
`${(0, errors_1.getErrorMessage)(rollbackErr)}`);
|
|
389
452
|
}
|
|
390
453
|
}
|
|
391
454
|
throw subscribeErr;
|
|
@@ -412,7 +475,7 @@ async function selectAccount() {
|
|
|
412
475
|
accountNames.forEach((name, index) => {
|
|
413
476
|
console.log(`${index + 1}. ${name}`);
|
|
414
477
|
});
|
|
415
|
-
const choiceStr = await readInput('Select account number: ');
|
|
478
|
+
const choiceStr = await (0, system_1.readInput)('Select account number: ');
|
|
416
479
|
const choice = parseInt(choiceStr, 10) - 1;
|
|
417
480
|
if (choice < 0 || choice >= accountNames.length) {
|
|
418
481
|
throw new Error('Invalid account selection.');
|
|
@@ -431,7 +494,7 @@ async function selectAccount() {
|
|
|
431
494
|
}
|
|
432
495
|
}
|
|
433
496
|
catch (e) {
|
|
434
|
-
console.error(`Failed to resolve account ID for ${selectedAccount}: ${e
|
|
497
|
+
console.error(`Failed to resolve account ID for ${selectedAccount}: ${(0, errors_1.getErrorMessage)(e)}`);
|
|
435
498
|
}
|
|
436
499
|
if (selectedId) {
|
|
437
500
|
await setPreferredAccount(selectedId, selectedAccount);
|
|
@@ -446,7 +509,7 @@ async function selectAccount() {
|
|
|
446
509
|
* @returns {boolean} True if value is a daemon signing token
|
|
447
510
|
*/
|
|
448
511
|
function isDaemonSigningToken(value) {
|
|
449
|
-
return getKeyStore().isDaemonSigningKey(value);
|
|
512
|
+
return (0, key_store_1.getKeyStore)().isDaemonSigningKey(value);
|
|
450
513
|
}
|
|
451
514
|
/**
|
|
452
515
|
* Execute blockchain operations via the credential daemon.
|
|
@@ -456,7 +519,16 @@ function isDaemonSigningToken(value) {
|
|
|
456
519
|
* @returns {Promise<import('./types').BroadcastResult>} Broadcast result
|
|
457
520
|
*/
|
|
458
521
|
async function executeViaDaemonToken(accountName, signingToken, operations, extraOptions = {}) {
|
|
459
|
-
|
|
522
|
+
const nodeManager = getNodeManager();
|
|
523
|
+
const healthyNodes = nodeManager?.getHealthyNodes() ?? [];
|
|
524
|
+
const fallbackNodes = healthyNodes.length > 1 ? healthyNodes.slice(1) : undefined;
|
|
525
|
+
const opts = extraOptions;
|
|
526
|
+
if (healthyNodes.length > 0 && nodeManager && !opts.fallbackNodes && !opts.nodeUrl) {
|
|
527
|
+
opts.nodeUrl = healthyNodes[0];
|
|
528
|
+
opts.fallbackNodes = fallbackNodes;
|
|
529
|
+
opts.onNodeFailed = (nodeUrl) => nodeManager.reportNodeFailure(nodeUrl, 'BROADCAST_DEADLINE', 'broadcast');
|
|
530
|
+
}
|
|
531
|
+
return (0, key_store_1.getKeyStore)().executeOperations(accountName, operations, signingToken, opts);
|
|
460
532
|
}
|
|
461
533
|
/**
|
|
462
534
|
* Fetch a single limit order by id from the blockchain.
|
|
@@ -483,7 +555,7 @@ async function executeViaDaemonToken(accountName, signingToken, operations, extr
|
|
|
483
555
|
* @returns {Promise<Object|null>} Raw chain order object, or null if not found
|
|
484
556
|
* @throws {Error} On connection or RPC failure
|
|
485
557
|
*/
|
|
486
|
-
async function readSingleOrder(orderId, timeoutMs = TIMING.CONNECTION_TIMEOUT_MS) {
|
|
558
|
+
async function readSingleOrder(orderId, timeoutMs = constants_1.TIMING.CONNECTION_TIMEOUT_MS) {
|
|
487
559
|
if (!orderId || typeof orderId !== 'string')
|
|
488
560
|
return null;
|
|
489
561
|
await waitForConnected(timeoutMs);
|
|
@@ -512,10 +584,10 @@ async function readSingleOrder(orderId, timeoutMs = TIMING.CONNECTION_TIMEOUT_MS
|
|
|
512
584
|
* @param {number} [timeoutMs] - Connection timeout in milliseconds
|
|
513
585
|
* @returns {Promise<Map<string, Object|null>>} Map of orderId → raw order or null
|
|
514
586
|
*/
|
|
515
|
-
async function batchReadOrders(orderIds, timeoutMs = TIMING.CONNECTION_TIMEOUT_MS) {
|
|
587
|
+
async function batchReadOrders(orderIds, timeoutMs = constants_1.TIMING.CONNECTION_TIMEOUT_MS) {
|
|
516
588
|
if (!Array.isArray(orderIds) || orderIds.length === 0)
|
|
517
589
|
return new Map();
|
|
518
|
-
const uniqueIds = [...new Set(orderIds.filter(id => id && typeof id === 'string'))];
|
|
590
|
+
const uniqueIds = [...new Set(orderIds.filter((id) => id && typeof id === 'string'))];
|
|
519
591
|
if (uniqueIds.length === 0)
|
|
520
592
|
return new Map();
|
|
521
593
|
await waitForConnected(timeoutMs);
|
|
@@ -546,7 +618,7 @@ async function batchReadOrders(orderIds, timeoutMs = TIMING.CONNECTION_TIMEOUT_M
|
|
|
546
618
|
* @param {boolean} suppress_log - Whether to suppress the log
|
|
547
619
|
* @returns {Promise<Array>} Array of raw order objects from chain
|
|
548
620
|
*/
|
|
549
|
-
async function readOpenOrders(accountId = null, timeoutMs = TIMING.CONNECTION_TIMEOUT_MS, suppress_log = true) {
|
|
621
|
+
async function readOpenOrders(accountId = null, timeoutMs = constants_1.TIMING.CONNECTION_TIMEOUT_MS, suppress_log = true) {
|
|
550
622
|
await waitForConnected(timeoutMs);
|
|
551
623
|
try {
|
|
552
624
|
let accId = accountId;
|
|
@@ -570,7 +642,7 @@ async function readOpenOrders(accountId = null, timeoutMs = TIMING.CONNECTION_TI
|
|
|
570
642
|
return orders;
|
|
571
643
|
}
|
|
572
644
|
catch (error) {
|
|
573
|
-
chainOrdersLogger.error(`Error reading open orders: ${error
|
|
645
|
+
chainOrdersLogger.error(`Error reading open orders: ${(0, errors_1.getErrorMessage)(error)}`);
|
|
574
646
|
throw error;
|
|
575
647
|
}
|
|
576
648
|
}
|
|
@@ -615,7 +687,7 @@ async function listenForFills(accountRef, callback) {
|
|
|
615
687
|
accountId = await resolveAccountId(accountName);
|
|
616
688
|
}
|
|
617
689
|
if (accountId) {
|
|
618
|
-
readOpenOrders(accountId, 30000, true).catch(error => chainOrdersLogger.error(`Error loading account for listening: ${error
|
|
690
|
+
readOpenOrders(accountId, 30000, true).catch((error) => chainOrdersLogger.error(`Error loading account for listening: ${(0, errors_1.getErrorMessage)(error)}`));
|
|
619
691
|
}
|
|
620
692
|
else {
|
|
621
693
|
chainOrdersLogger.warn('Unable to derive account id before listening for fills; skipping open-order prefetch.');
|
|
@@ -644,14 +716,14 @@ async function listenForFills(accountRef, callback) {
|
|
|
644
716
|
}
|
|
645
717
|
}
|
|
646
718
|
catch (e) {
|
|
647
|
-
chainOrdersLogger.warn(`Unsubscribe failed: ${e
|
|
719
|
+
chainOrdersLogger.warn(`Unsubscribe failed: ${(0, errors_1.getErrorMessage)(e)}`);
|
|
648
720
|
}
|
|
649
721
|
accountSubscriptions.delete(accountName);
|
|
650
722
|
}
|
|
651
723
|
});
|
|
652
724
|
}
|
|
653
725
|
catch (e) {
|
|
654
|
-
chainOrdersLogger.error(`Error unsubscribing listenForFills ${e
|
|
726
|
+
chainOrdersLogger.error(`Error unsubscribing listenForFills ${(0, errors_1.getErrorMessage)(e)}`);
|
|
655
727
|
}
|
|
656
728
|
};
|
|
657
729
|
}
|
|
@@ -677,7 +749,7 @@ async function buildUpdateOrderOp(accountName, orderId, newParams, cachedOrder =
|
|
|
677
749
|
let order = cachedOrder;
|
|
678
750
|
if (!order) {
|
|
679
751
|
const orders = await readOpenOrders(accId);
|
|
680
|
-
order = orders.find(o => o.id === orderId);
|
|
752
|
+
order = orders.find((o) => o.id === orderId);
|
|
681
753
|
}
|
|
682
754
|
if (!order)
|
|
683
755
|
throw new Error(`Order ${orderId} not found`);
|
|
@@ -686,11 +758,10 @@ async function buildUpdateOrderOp(accountName, orderId, newParams, cachedOrder =
|
|
|
686
758
|
const sellPrecision = await _getAssetPrecision(sellAssetId);
|
|
687
759
|
const receivePrecision = await _getAssetPrecision(receiveAssetId);
|
|
688
760
|
const currentSellInt = toFiniteNumber(order.for_sale);
|
|
689
|
-
const currentSellFloat = blockchainToFloat(currentSellInt, sellPrecision);
|
|
761
|
+
const currentSellFloat = (0, math_1.blockchainToFloat)(currentSellInt, sellPrecision);
|
|
690
762
|
const priceRatioBase = order.sell_price.base.amount;
|
|
691
763
|
const priceRatioQuote = order.sell_price.quote.amount;
|
|
692
764
|
const currentReceiveInt = Math.round((currentSellInt * priceRatioQuote) / priceRatioBase);
|
|
693
|
-
const currentReceiveFloat = blockchainToFloat(currentReceiveInt, receivePrecision);
|
|
694
765
|
// Determine target sell amount first.
|
|
695
766
|
// IMPORTANT: When amountToSell is undefined, use currentSellInt directly to avoid
|
|
696
767
|
// floating-point precision loss (blockchainToFloat -> floatToBlockchainInt roundtrip).
|
|
@@ -698,12 +769,12 @@ async function buildUpdateOrderOp(accountName, orderId, newParams, cachedOrder =
|
|
|
698
769
|
let newSellFloat;
|
|
699
770
|
if (newParams.amountToSell !== undefined && newParams.amountToSell !== null) {
|
|
700
771
|
newSellFloat = newParams.amountToSell;
|
|
701
|
-
newSellInt = floatToBlockchainInt(newSellFloat, sellPrecision);
|
|
772
|
+
newSellInt = (0, math_1.floatToBlockchainInt)(newSellFloat, sellPrecision);
|
|
702
773
|
}
|
|
703
774
|
else {
|
|
704
775
|
// Keep current amount exactly as-is on-chain, bypassing float conversion
|
|
705
776
|
newSellInt = currentSellInt;
|
|
706
|
-
newSellFloat = blockchainToFloat(currentSellInt, sellPrecision);
|
|
777
|
+
newSellFloat = (0, math_1.blockchainToFloat)(currentSellInt, sellPrecision);
|
|
707
778
|
}
|
|
708
779
|
// Determine an initial receive amount for price-change detection.
|
|
709
780
|
// Policy:
|
|
@@ -712,7 +783,7 @@ async function buildUpdateOrderOp(accountName, orderId, newParams, cachedOrder =
|
|
|
712
783
|
// - Else: keep the existing on-chain price by scaling receive with sell.
|
|
713
784
|
let candidateReceiveInt;
|
|
714
785
|
if (newParams.minToReceive !== undefined && newParams.minToReceive !== null) {
|
|
715
|
-
candidateReceiveInt = floatToBlockchainInt(newParams.minToReceive, receivePrecision);
|
|
786
|
+
candidateReceiveInt = (0, math_1.floatToBlockchainInt)(newParams.minToReceive, receivePrecision);
|
|
716
787
|
}
|
|
717
788
|
else if (newParams.newPrice !== undefined && newParams.newPrice !== null) {
|
|
718
789
|
const price = toFiniteNumber(newParams.newPrice);
|
|
@@ -720,14 +791,14 @@ async function buildUpdateOrderOp(accountName, orderId, newParams, cachedOrder =
|
|
|
720
791
|
const receiveFloat = (newParams.orderType === 'sell')
|
|
721
792
|
? (sellFloat * price)
|
|
722
793
|
: (sellFloat / price);
|
|
723
|
-
candidateReceiveInt = floatToBlockchainInt(receiveFloat, receivePrecision);
|
|
794
|
+
candidateReceiveInt = (0, math_1.floatToBlockchainInt)(receiveFloat, receivePrecision);
|
|
724
795
|
}
|
|
725
796
|
else {
|
|
726
797
|
candidateReceiveInt = Math.round((newSellInt * priceRatioQuote) / priceRatioBase);
|
|
727
798
|
}
|
|
728
799
|
// Validate amounts before converting to blockchain integers / computing deltas
|
|
729
|
-
const candidateReceiveFloat = blockchainToFloat(candidateReceiveInt, receivePrecision);
|
|
730
|
-
if (!validateOrderAmountsWithinLimits(newSellFloat, candidateReceiveFloat, sellPrecision, receivePrecision)) {
|
|
800
|
+
const candidateReceiveFloat = (0, math_1.blockchainToFloat)(candidateReceiveInt, receivePrecision);
|
|
801
|
+
if (!(0, math_1.validateOrderAmountsWithinLimits)(newSellFloat, candidateReceiveFloat, sellPrecision, receivePrecision)) {
|
|
731
802
|
throw new Error(`Cannot update order: calculated amounts exceed blockchain limits. ` +
|
|
732
803
|
`Sell: ${newSellFloat}, Receive: ${candidateReceiveFloat}. ` +
|
|
733
804
|
`This typically happens with extreme price values or mixed absolute/relative price bounds that diverge too far. ` +
|
|
@@ -742,8 +813,8 @@ async function buildUpdateOrderOp(accountName, orderId, newParams, cachedOrder =
|
|
|
742
813
|
// This happens when newAmountToSell was rounded, causing floatToBlockchainInt
|
|
743
814
|
// to produce a different value than what's currently on-chain.
|
|
744
815
|
if (Math.abs(deltaSellInt) === 1 && newParams.amountToSell !== undefined && newParams.amountToSell !== null) {
|
|
745
|
-
const roundedNewSellInt = normalizeInt(newSellInt, sellPrecision);
|
|
746
|
-
const roundedCurrentSellInt = normalizeInt(currentSellInt, sellPrecision);
|
|
816
|
+
const roundedNewSellInt = (0, math_1.normalizeInt)(newSellInt, sellPrecision);
|
|
817
|
+
const roundedCurrentSellInt = (0, math_1.normalizeInt)(currentSellInt, sellPrecision);
|
|
747
818
|
// If they match after rounding to precision, use the current amount (delta = 0)
|
|
748
819
|
if (roundedNewSellInt === roundedCurrentSellInt || Math.abs(roundedNewSellInt - roundedCurrentSellInt) <= 1) {
|
|
749
820
|
newSellInt = currentSellInt;
|
|
@@ -753,14 +824,14 @@ async function buildUpdateOrderOp(accountName, orderId, newParams, cachedOrder =
|
|
|
753
824
|
// First, compute the receive amount with the current delta (not adjusted yet)
|
|
754
825
|
let newReceiveInt;
|
|
755
826
|
if (newParams.minToReceive !== undefined && newParams.minToReceive !== null) {
|
|
756
|
-
newReceiveInt = floatToBlockchainInt(newParams.minToReceive, receivePrecision);
|
|
827
|
+
newReceiveInt = (0, math_1.floatToBlockchainInt)(newParams.minToReceive, receivePrecision);
|
|
757
828
|
}
|
|
758
829
|
else if (newParams.newPrice !== undefined && newParams.newPrice !== null) {
|
|
759
830
|
const price = toFiniteNumber(newParams.newPrice);
|
|
760
831
|
const receiveFloat = (newParams.orderType === 'sell')
|
|
761
832
|
? (newSellFloat * price)
|
|
762
833
|
: (newSellFloat / price);
|
|
763
|
-
newReceiveInt = floatToBlockchainInt(receiveFloat, receivePrecision);
|
|
834
|
+
newReceiveInt = (0, math_1.floatToBlockchainInt)(receiveFloat, receivePrecision);
|
|
764
835
|
}
|
|
765
836
|
else {
|
|
766
837
|
// Keep existing on-chain price ratio.
|
|
@@ -796,23 +867,23 @@ async function buildUpdateOrderOp(accountName, orderId, newParams, cachedOrder =
|
|
|
796
867
|
const adjustedSellInt = currentSellInt + deltaSellInt;
|
|
797
868
|
// Recompute the final receive amount with the adjusted sell amount
|
|
798
869
|
if (newParams.minToReceive !== undefined && newParams.minToReceive !== null) {
|
|
799
|
-
newReceiveInt = floatToBlockchainInt(newParams.minToReceive, receivePrecision);
|
|
870
|
+
newReceiveInt = (0, math_1.floatToBlockchainInt)(newParams.minToReceive, receivePrecision);
|
|
800
871
|
}
|
|
801
872
|
else if (newParams.newPrice !== undefined && newParams.newPrice !== null) {
|
|
802
873
|
const price = toFiniteNumber(newParams.newPrice);
|
|
803
|
-
const adjustedSellFloat = blockchainToFloat(adjustedSellInt, sellPrecision);
|
|
874
|
+
const adjustedSellFloat = (0, math_1.blockchainToFloat)(adjustedSellInt, sellPrecision);
|
|
804
875
|
const receiveFloat = (newParams.orderType === 'sell')
|
|
805
876
|
? (adjustedSellFloat * price)
|
|
806
877
|
: (adjustedSellFloat / price);
|
|
807
|
-
newReceiveInt = floatToBlockchainInt(receiveFloat, receivePrecision);
|
|
878
|
+
newReceiveInt = (0, math_1.floatToBlockchainInt)(receiveFloat, receivePrecision);
|
|
808
879
|
}
|
|
809
880
|
else {
|
|
810
881
|
// Keep existing on-chain price ratio.
|
|
811
882
|
newReceiveInt = Math.round((adjustedSellInt * priceRatioQuote) / priceRatioBase);
|
|
812
883
|
}
|
|
813
|
-
const adjustedSellFloat = blockchainToFloat(adjustedSellInt, sellPrecision);
|
|
814
|
-
const finalReceiveFloat = blockchainToFloat(newReceiveInt, receivePrecision);
|
|
815
|
-
if (!validateOrderAmountsWithinLimits(adjustedSellFloat, finalReceiveFloat, sellPrecision, receivePrecision)) {
|
|
884
|
+
const adjustedSellFloat = (0, math_1.blockchainToFloat)(adjustedSellInt, sellPrecision);
|
|
885
|
+
const finalReceiveFloat = (0, math_1.blockchainToFloat)(newReceiveInt, receivePrecision);
|
|
886
|
+
if (!(0, math_1.validateOrderAmountsWithinLimits)(adjustedSellFloat, finalReceiveFloat, sellPrecision, receivePrecision)) {
|
|
816
887
|
throw new Error(`Cannot update order: calculated amounts exceed blockchain limits. ` +
|
|
817
888
|
`Sell: ${adjustedSellFloat}, Receive: ${finalReceiveFloat}. ` +
|
|
818
889
|
`Consider adjusting minPrice/maxPrice configuration.`);
|
|
@@ -821,7 +892,7 @@ async function buildUpdateOrderOp(accountName, orderId, newParams, cachedOrder =
|
|
|
821
892
|
op: {
|
|
822
893
|
op_name: 'limit_order_update',
|
|
823
894
|
op_data: {
|
|
824
|
-
fee: { amount: 0, asset_id: NATIVE_CLIENT.CHAIN.CORE_ASSET_ID },
|
|
895
|
+
fee: { amount: 0, asset_id: constants_1.NATIVE_CLIENT.CHAIN.CORE_ASSET_ID },
|
|
825
896
|
seller: accId,
|
|
826
897
|
order: orderId,
|
|
827
898
|
new_price: {
|
|
@@ -850,7 +921,7 @@ async function buildUpdateOrderOp(accountName, orderId, newParams, cachedOrder =
|
|
|
850
921
|
* @returns {Promise<Object|null>} Success object or null if skipped.
|
|
851
922
|
* @throws {Error} If update fails.
|
|
852
923
|
*/
|
|
853
|
-
async function updateOrder(accountName, privateKey, orderId, newParams) {
|
|
924
|
+
async function updateOrder(accountName, privateKey, orderId, newParams, extraOptions = {}) {
|
|
854
925
|
try {
|
|
855
926
|
const buildResult = await buildUpdateOrderOp(accountName, orderId, newParams);
|
|
856
927
|
if (!buildResult) {
|
|
@@ -859,7 +930,7 @@ async function updateOrder(accountName, privateKey, orderId, newParams) {
|
|
|
859
930
|
}
|
|
860
931
|
const { op } = buildResult;
|
|
861
932
|
if (isDaemonSigningToken(privateKey)) {
|
|
862
|
-
const result = await executeViaDaemonToken(accountName, privateKey, [op]);
|
|
933
|
+
const result = await executeViaDaemonToken(accountName, privateKey, [op], extraOptions);
|
|
863
934
|
chainOrdersLogger.info(`Order ${orderId} updated successfully`);
|
|
864
935
|
return { success: true, orderId, raw: result.raw, operation_results: result.operation_results };
|
|
865
936
|
}
|
|
@@ -878,7 +949,7 @@ async function updateOrder(accountName, privateKey, orderId, newParams) {
|
|
|
878
949
|
return { success: true, orderId };
|
|
879
950
|
}
|
|
880
951
|
catch (error) {
|
|
881
|
-
chainOrdersLogger.error(`Error updating order: ${error
|
|
952
|
+
chainOrdersLogger.error(`Error updating order: ${(0, errors_1.getErrorMessage)(error)}`);
|
|
882
953
|
throw error;
|
|
883
954
|
}
|
|
884
955
|
}
|
|
@@ -904,13 +975,13 @@ async function buildCreateOrderOp(accountName, amountToSell, sellAssetId, minToR
|
|
|
904
975
|
}
|
|
905
976
|
const sellPrecision = await _getAssetPrecision(sellAssetId);
|
|
906
977
|
const receivePrecision = await _getAssetPrecision(receiveAssetId);
|
|
907
|
-
const amountToSellInt = floatToBlockchainInt(amountToSell, sellPrecision);
|
|
908
|
-
const minToReceiveInt = floatToBlockchainInt(minToReceive, receivePrecision);
|
|
978
|
+
const amountToSellInt = (0, math_1.floatToBlockchainInt)(amountToSell, sellPrecision);
|
|
979
|
+
const minToReceiveInt = (0, math_1.floatToBlockchainInt)(minToReceive, receivePrecision);
|
|
909
980
|
// CRITICAL: Validate order amounts before creating operation
|
|
910
981
|
// This prevents "Assert Exception: min_to_receive.amount > 0" errors from BitShares
|
|
911
982
|
// when order sizes are too small and round to 0 after precision conversion
|
|
912
983
|
// Returns null instead of throwing to allow caller to skip invalid orders gracefully
|
|
913
|
-
if (!validateOrderAmountsWithinLimits(amountToSell, minToReceive, sellPrecision, receivePrecision)) {
|
|
984
|
+
if (!(0, math_1.validateOrderAmountsWithinLimits)(amountToSell, minToReceive, sellPrecision, receivePrecision)) {
|
|
914
985
|
chainOrdersLogger.warn(`Order skipped: amounts would round to 0 on blockchain\n` +
|
|
915
986
|
` Float values: sell=${amountToSell}, receive=${minToReceive}\n` +
|
|
916
987
|
` Blockchain integers: sell=${amountToSellInt} (prec ${sellPrecision}), receive=${minToReceiveInt} (prec ${receivePrecision})\n` +
|
|
@@ -920,7 +991,7 @@ async function buildCreateOrderOp(accountName, amountToSell, sellAssetId, minToR
|
|
|
920
991
|
const op = {
|
|
921
992
|
op_name: 'limit_order_create',
|
|
922
993
|
op_data: {
|
|
923
|
-
fee: { amount: 0, asset_id: NATIVE_CLIENT.CHAIN.CORE_ASSET_ID },
|
|
994
|
+
fee: { amount: 0, asset_id: constants_1.NATIVE_CLIENT.CHAIN.CORE_ASSET_ID },
|
|
924
995
|
seller: accId,
|
|
925
996
|
amount_to_sell: { amount: amountToSellInt, asset_id: sellAssetId },
|
|
926
997
|
min_to_receive: { amount: minToReceiveInt, asset_id: receiveAssetId },
|
|
@@ -947,7 +1018,7 @@ async function buildCreateOrderOp(accountName, amountToSell, sellAssetId, minToR
|
|
|
947
1018
|
* @returns {Promise<Object>} The transaction result or dry run info.
|
|
948
1019
|
* @throws {Error} If account not found or creation fails.
|
|
949
1020
|
*/
|
|
950
|
-
async function createOrder(accountName, privateKey, amountToSell, sellAssetId, minToReceive, receiveAssetId, expiration, dryRun = false) {
|
|
1021
|
+
async function createOrder(accountName, privateKey, amountToSell, sellAssetId, minToReceive, receiveAssetId, expiration, dryRun = false, extraOptions = {}) {
|
|
951
1022
|
try {
|
|
952
1023
|
const buildResult = await buildCreateOrderOp(accountName, amountToSell, sellAssetId, minToReceive, receiveAssetId, expiration);
|
|
953
1024
|
if (!buildResult)
|
|
@@ -958,7 +1029,7 @@ async function createOrder(accountName, privateKey, amountToSell, sellAssetId, m
|
|
|
958
1029
|
return { dryRun: true, params: op.op_data };
|
|
959
1030
|
}
|
|
960
1031
|
if (isDaemonSigningToken(privateKey)) {
|
|
961
|
-
const result = await executeViaDaemonToken(accountName, privateKey, [op]);
|
|
1032
|
+
const result = await executeViaDaemonToken(accountName, privateKey, [op], extraOptions);
|
|
962
1033
|
chainOrdersLogger.info(`Limit order created successfully for account ${accountName}`);
|
|
963
1034
|
return result;
|
|
964
1035
|
}
|
|
@@ -972,7 +1043,7 @@ async function createOrder(accountName, privateKey, amountToSell, sellAssetId, m
|
|
|
972
1043
|
return result;
|
|
973
1044
|
}
|
|
974
1045
|
catch (error) {
|
|
975
|
-
chainOrdersLogger.error(`Error creating limit order: ${error
|
|
1046
|
+
chainOrdersLogger.error(`Error creating limit order: ${(0, errors_1.getErrorMessage)(error)}`);
|
|
976
1047
|
throw error;
|
|
977
1048
|
}
|
|
978
1049
|
}
|
|
@@ -990,7 +1061,7 @@ async function buildCancelOrderOp(accountName, orderId) {
|
|
|
990
1061
|
return {
|
|
991
1062
|
op_name: 'limit_order_cancel',
|
|
992
1063
|
op_data: {
|
|
993
|
-
fee: { amount: 0, asset_id: NATIVE_CLIENT.CHAIN.CORE_ASSET_ID },
|
|
1064
|
+
fee: { amount: 0, asset_id: constants_1.NATIVE_CLIENT.CHAIN.CORE_ASSET_ID },
|
|
994
1065
|
fee_paying_account: accId,
|
|
995
1066
|
order: orderId
|
|
996
1067
|
}
|
|
@@ -1032,8 +1103,8 @@ async function cancelOrder(accountName, privateKey, orderId, extraOptions = {})
|
|
|
1032
1103
|
catch (error) {
|
|
1033
1104
|
if (accountId) {
|
|
1034
1105
|
try {
|
|
1035
|
-
const openOrders = await readOpenOrders(accountId, TIMING.CONNECTION_TIMEOUT_MS, true);
|
|
1036
|
-
const stillPresent = Array.isArray(openOrders) && openOrders.some(order => String(order?.id ?? '') === String(orderId));
|
|
1106
|
+
const openOrders = await readOpenOrders(accountId, constants_1.TIMING.CONNECTION_TIMEOUT_MS, true);
|
|
1107
|
+
const stillPresent = Array.isArray(openOrders) && openOrders.some((order) => String(order?.id ?? '') === String(orderId));
|
|
1037
1108
|
if (!stillPresent) {
|
|
1038
1109
|
chainOrdersLogger.info(`Order ${orderId} cancellation confirmed after broadcast failure`);
|
|
1039
1110
|
return { success: true, orderId, verified: true, verifiedAfterFailure: true };
|
|
@@ -1043,7 +1114,7 @@ async function cancelOrder(accountName, privateKey, orderId, extraOptions = {})
|
|
|
1043
1114
|
// Fall through to the original error.
|
|
1044
1115
|
}
|
|
1045
1116
|
}
|
|
1046
|
-
chainOrdersLogger.error(`Error cancelling order: ${error
|
|
1117
|
+
chainOrdersLogger.error(`Error cancelling order: ${(0, errors_1.getErrorMessage)(error)}`);
|
|
1047
1118
|
throw error;
|
|
1048
1119
|
}
|
|
1049
1120
|
}
|
|
@@ -1052,14 +1123,15 @@ async function cancelOrder(accountName, privateKey, orderId, extraOptions = {})
|
|
|
1052
1123
|
* @param {string} accountName - Account paying fees (usually the bot account)
|
|
1053
1124
|
* @param {string|Object} privateKey - Private key for signing (or daemon signing token)
|
|
1054
1125
|
* @param {Array} operations - Array of operation objects { op_name, op_data } returned by build helpers
|
|
1126
|
+
* @param {Object} [extraOptions] - Optional parameters (fallbackNodes, etc.)
|
|
1055
1127
|
* @returns {Promise<Object>} Transaction result
|
|
1056
1128
|
*/
|
|
1057
|
-
async function executeBatch(accountName, privateKey, operations) {
|
|
1129
|
+
async function executeBatch(accountName, privateKey, operations, extraOptions = {}) {
|
|
1058
1130
|
if (!operations || operations.length === 0)
|
|
1059
1131
|
return { success: true, operations: 0 };
|
|
1060
1132
|
try {
|
|
1061
1133
|
if (isDaemonSigningToken(privateKey)) {
|
|
1062
|
-
const result = await executeViaDaemonToken(accountName, privateKey, operations);
|
|
1134
|
+
const result = await executeViaDaemonToken(accountName, privateKey, operations, extraOptions);
|
|
1063
1135
|
recordOwnCancelOps(operations);
|
|
1064
1136
|
return result;
|
|
1065
1137
|
}
|
|
@@ -1094,7 +1166,7 @@ async function executeBatch(accountName, privateKey, operations) {
|
|
|
1094
1166
|
};
|
|
1095
1167
|
}
|
|
1096
1168
|
catch (error) {
|
|
1097
|
-
chainOrdersLogger.error(`Error executing batch transaction: ${error
|
|
1169
|
+
chainOrdersLogger.error(`Error executing batch transaction: ${(0, errors_1.getErrorMessage)(error)}`);
|
|
1098
1170
|
throw error;
|
|
1099
1171
|
}
|
|
1100
1172
|
}
|
|
@@ -1168,7 +1240,7 @@ async function getOnChainAssetBalances(accountRef, assets, options = {}) {
|
|
|
1168
1240
|
}
|
|
1169
1241
|
}
|
|
1170
1242
|
catch (dealErr) {
|
|
1171
|
-
chainOrdersLogger.warn(`getOnChainAssetBalances: failed to fetch credit deals for ${accountRef}: ${dealErr
|
|
1243
|
+
chainOrdersLogger.warn(`getOnChainAssetBalances: failed to fetch credit deals for ${accountRef}: ${(0, errors_1.getErrorMessage)(dealErr)}`);
|
|
1172
1244
|
}
|
|
1173
1245
|
}
|
|
1174
1246
|
// If assets omitted, build list from balances and limit_orders
|
|
@@ -1198,7 +1270,7 @@ async function getOnChainAssetBalances(accountRef, assets, options = {}) {
|
|
|
1198
1270
|
}
|
|
1199
1271
|
}
|
|
1200
1272
|
catch (e) {
|
|
1201
|
-
chainOrdersLogger.warn(`lookup_asset_symbols failed for ${a}: ${e
|
|
1273
|
+
chainOrdersLogger.warn(`lookup_asset_symbols failed for ${a}: ${(0, errors_1.getErrorMessage)(e)}`);
|
|
1202
1274
|
}
|
|
1203
1275
|
// try to get precision and symbol
|
|
1204
1276
|
let precision = null;
|
|
@@ -1211,7 +1283,7 @@ async function getOnChainAssetBalances(accountRef, assets, options = {}) {
|
|
|
1211
1283
|
}
|
|
1212
1284
|
}
|
|
1213
1285
|
catch (e) {
|
|
1214
|
-
chainOrdersLogger.warn(`Failed to fetch asset data for ${aid}: ${e
|
|
1286
|
+
chainOrdersLogger.warn(`Failed to fetch asset data for ${aid}: ${(0, errors_1.getErrorMessage)(e)}`);
|
|
1215
1287
|
}
|
|
1216
1288
|
if (precision === null) {
|
|
1217
1289
|
chainOrdersLogger.error(`CRITICAL: Could not determine precision for asset ${aid}. Skipping balance entry to prevent massive scaling errors.`);
|
|
@@ -1219,14 +1291,14 @@ async function getOnChainAssetBalances(accountRef, assets, options = {}) {
|
|
|
1219
1291
|
}
|
|
1220
1292
|
const freeRaw = freeInt.get(String(aid)) || 0;
|
|
1221
1293
|
const lockedRaw = lockedInt.get(String(aid)) || 0;
|
|
1222
|
-
const free = blockchainToFloat(freeRaw, precision);
|
|
1223
|
-
const locked = blockchainToFloat(lockedRaw, precision);
|
|
1294
|
+
const free = (0, math_1.blockchainToFloat)(freeRaw, precision);
|
|
1295
|
+
const locked = (0, math_1.blockchainToFloat)(lockedRaw, precision);
|
|
1224
1296
|
out[String(a)] = { assetId: String(aid), symbol, precision, freeRaw, lockedRaw, free, locked, total: free + locked };
|
|
1225
1297
|
}
|
|
1226
1298
|
return out;
|
|
1227
1299
|
}
|
|
1228
1300
|
catch (err) {
|
|
1229
|
-
chainOrdersLogger.error(`getOnChainAssetBalances failed: ${err
|
|
1301
|
+
chainOrdersLogger.error(`getOnChainAssetBalances failed: ${(0, errors_1.getErrorMessage)(err)}`);
|
|
1230
1302
|
return {};
|
|
1231
1303
|
}
|
|
1232
1304
|
}
|
|
@@ -1244,7 +1316,7 @@ function buildLiquidityPoolExchangeOp(accountId, poolId, sellAmountInt, sellAsse
|
|
|
1244
1316
|
return {
|
|
1245
1317
|
op_name: 'liquidity_pool_exchange',
|
|
1246
1318
|
op_data: {
|
|
1247
|
-
fee: { amount: 0, asset_id: NATIVE_CLIENT.CHAIN.CORE_ASSET_ID },
|
|
1319
|
+
fee: { amount: 0, asset_id: constants_1.NATIVE_CLIENT.CHAIN.CORE_ASSET_ID },
|
|
1248
1320
|
account: accountId,
|
|
1249
1321
|
pool: poolId,
|
|
1250
1322
|
amount_to_sell: { amount: sellAmountInt, asset_id: sellAssetId },
|
|
@@ -1260,29 +1332,5 @@ function buildLiquidityPoolExchangeOp(accountId, poolId, sellAmountInt, sellAsse
|
|
|
1260
1332
|
function getFillProcessingMode() {
|
|
1261
1333
|
return FILL_PROCESSING_MODE;
|
|
1262
1334
|
}
|
|
1263
|
-
module.exports = {
|
|
1264
|
-
selectAccount,
|
|
1265
|
-
setPreferredAccount,
|
|
1266
|
-
resolveAccountId,
|
|
1267
|
-
resolveAccountName,
|
|
1268
|
-
readOpenOrders,
|
|
1269
|
-
readSingleOrder,
|
|
1270
|
-
batchReadOrders,
|
|
1271
|
-
listenForFills,
|
|
1272
|
-
updateOrder,
|
|
1273
|
-
createOrder,
|
|
1274
|
-
cancelOrder,
|
|
1275
|
-
getOnChainAssetBalances,
|
|
1276
|
-
getFillProcessingMode,
|
|
1277
|
-
FILL_PROCESSING_MODE,
|
|
1278
|
-
buildUpdateOrderOp,
|
|
1279
|
-
buildCreateOrderOp,
|
|
1280
|
-
buildCancelOrderOp,
|
|
1281
|
-
buildLiquidityPoolExchangeOp,
|
|
1282
|
-
executeBatch,
|
|
1283
|
-
wasRecentlyOwnCancelled,
|
|
1284
|
-
recordOwnCancel,
|
|
1285
|
-
BroadcastUncertainError,
|
|
1286
|
-
// Note: authentication and key retrieval moved to modules/chain_keys.ts
|
|
1287
|
-
};
|
|
1335
|
+
module.exports = { selectAccount, setPreferredAccount, resolveAccountId, resolveAccountName, readOpenOrders, readSingleOrder, batchReadOrders, listenForFills, updateOrder, createOrder, cancelOrder, getOnChainAssetBalances, getFillProcessingMode, FILL_PROCESSING_MODE, buildUpdateOrderOp, buildCreateOrderOp, buildCancelOrderOp, buildLiquidityPoolExchangeOp, executeBatch, wasRecentlyOwnCancelled, recordOwnCancel, BroadcastUncertainError: dexbot_credential_client_1.BroadcastUncertainError };
|
|
1288
1336
|
//# sourceMappingURL=chain_orders.js.map
|