project-cpu-mcp 0.10.0 → 0.12.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/README.md +111 -35
- package/dist/api/authentication-required.error.d.ts +6 -0
- package/dist/api/authentication-required.error.d.ts.map +1 -0
- package/dist/api/authentication-required.error.js +9 -0
- package/dist/api/authentication-required.error.js.map +1 -0
- package/dist/api/client.d.ts +7 -5
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +29 -14
- package/dist/api/client.js.map +1 -1
- package/dist/api/constants.d.ts +2 -0
- package/dist/api/constants.d.ts.map +1 -1
- package/dist/api/constants.js +6 -0
- package/dist/api/constants.js.map +1 -1
- package/dist/api/types.d.ts +189 -220
- package/dist/api/types.d.ts.map +1 -1
- package/dist/api/types.js +43 -29
- package/dist/api/types.js.map +1 -1
- package/dist/config/constants.d.ts +6 -2
- package/dist/config/constants.d.ts.map +1 -1
- package/dist/config/constants.js +6 -2
- package/dist/config/constants.js.map +1 -1
- package/dist/config/types.js +2 -2
- package/dist/config/types.js.map +1 -1
- package/dist/contracts/cell.abi.d.ts +26 -2
- package/dist/contracts/cell.abi.d.ts.map +1 -1
- package/dist/contracts/cell.abi.js +21 -2
- package/dist/contracts/cell.abi.js.map +1 -1
- package/dist/contracts/erc20.abi.d.ts.map +1 -1
- package/dist/contracts/erc20.abi.js +1 -2
- package/dist/contracts/erc20.abi.js.map +1 -1
- package/dist/contracts/trade.abi.d.ts +341 -0
- package/dist/contracts/trade.abi.d.ts.map +1 -1
- package/dist/contracts/trade.abi.js +163 -0
- package/dist/contracts/trade.abi.js.map +1 -1
- package/dist/contracts/trade.types.d.ts +14 -0
- package/dist/contracts/trade.types.d.ts.map +1 -0
- package/dist/contracts/trade.types.js +15 -0
- package/dist/contracts/trade.types.js.map +1 -0
- package/dist/contracts/transport.abi.d.ts +4 -0
- package/dist/contracts/transport.abi.d.ts.map +1 -1
- package/dist/contracts/transport.abi.js +1 -0
- package/dist/contracts/transport.abi.js.map +1 -1
- package/dist/index.js +40 -3
- package/dist/index.js.map +1 -1
- package/dist/logger/constants.d.ts +7 -0
- package/dist/logger/constants.d.ts.map +1 -1
- package/dist/logger/constants.js +11 -0
- package/dist/logger/constants.js.map +1 -1
- package/dist/logger/file-log.utils.d.ts +4 -0
- package/dist/logger/file-log.utils.d.ts.map +1 -0
- package/dist/logger/file-log.utils.js +23 -0
- package/dist/logger/file-log.utils.js.map +1 -0
- package/dist/logger/index.d.ts +1 -1
- package/dist/logger/index.d.ts.map +1 -1
- package/dist/logger/index.js +5 -3
- package/dist/logger/index.js.map +1 -1
- package/dist/logger/logger.d.ts +4 -0
- package/dist/logger/logger.d.ts.map +1 -1
- package/dist/logger/logger.js +48 -3
- package/dist/logger/logger.js.map +1 -1
- package/dist/logger/redact.utils.d.ts.map +1 -1
- package/dist/logger/redact.utils.js +7 -2
- package/dist/logger/redact.utils.js.map +1 -1
- package/dist/logger/types.d.ts +8 -0
- package/dist/logger/types.d.ts.map +1 -1
- package/dist/map/attention.utils.d.ts.map +1 -1
- package/dist/map/attention.utils.js +1 -0
- package/dist/map/attention.utils.js.map +1 -1
- package/dist/map/cell-view.utils.d.ts.map +1 -1
- package/dist/map/cell-view.utils.js +5 -3
- package/dist/map/cell-view.utils.js.map +1 -1
- package/dist/map/process-projection.utils.js +2 -2
- package/dist/map/process-projection.utils.js.map +1 -1
- package/dist/map/reader.utils.d.ts.map +1 -1
- package/dist/map/reader.utils.js +3 -2
- package/dist/map/reader.utils.js.map +1 -1
- package/dist/map/storage.utils.d.ts.map +1 -1
- package/dist/map/storage.utils.js +5 -1
- package/dist/map/storage.utils.js.map +1 -1
- package/dist/map/types.d.ts +21 -0
- package/dist/map/types.d.ts.map +1 -1
- package/dist/map/types.js +6 -0
- package/dist/map/types.js.map +1 -1
- package/dist/paybox/auth/authority.d.ts +46 -0
- package/dist/paybox/auth/authority.d.ts.map +1 -0
- package/dist/paybox/auth/authority.js +410 -0
- package/dist/paybox/auth/authority.js.map +1 -0
- package/dist/paybox/auth/browser-opener.d.ts +8 -0
- package/dist/paybox/auth/browser-opener.d.ts.map +1 -0
- package/dist/paybox/auth/browser-opener.js +22 -0
- package/dist/paybox/auth/browser-opener.js.map +1 -0
- package/dist/paybox/auth/browser-opener.utils.d.ts +2 -0
- package/dist/paybox/auth/browser-opener.utils.d.ts.map +1 -0
- package/dist/paybox/auth/browser-opener.utils.js +10 -0
- package/dist/paybox/auth/browser-opener.utils.js.map +1 -0
- package/dist/paybox/auth/constants.d.ts +16 -0
- package/dist/paybox/auth/constants.d.ts.map +1 -0
- package/dist/paybox/auth/constants.js +16 -0
- package/dist/paybox/auth/constants.js.map +1 -0
- package/dist/paybox/auth/coordinator.d.ts +21 -0
- package/dist/paybox/auth/coordinator.d.ts.map +1 -0
- package/dist/paybox/auth/coordinator.factory.d.ts +5 -0
- package/dist/paybox/auth/coordinator.factory.d.ts.map +1 -0
- package/dist/paybox/auth/coordinator.factory.js +5 -0
- package/dist/paybox/auth/coordinator.factory.js.map +1 -0
- package/dist/paybox/auth/coordinator.js +87 -0
- package/dist/paybox/auth/coordinator.js.map +1 -0
- package/dist/paybox/auth/coordinator.utils.d.ts +4 -0
- package/dist/paybox/auth/coordinator.utils.d.ts.map +1 -0
- package/dist/paybox/auth/coordinator.utils.js +8 -0
- package/dist/paybox/auth/coordinator.utils.js.map +1 -0
- package/dist/paybox/auth/flow-session.d.ts +24 -0
- package/dist/paybox/auth/flow-session.d.ts.map +1 -0
- package/dist/paybox/auth/flow-session.js +155 -0
- package/dist/paybox/auth/flow-session.js.map +1 -0
- package/dist/paybox/auth/loopback-flow.d.ts +49 -0
- package/dist/paybox/auth/loopback-flow.d.ts.map +1 -0
- package/dist/paybox/auth/loopback-flow.js +381 -0
- package/dist/paybox/auth/loopback-flow.js.map +1 -0
- package/dist/paybox/auth/loopback-flow.utils.d.ts +7 -0
- package/dist/paybox/auth/loopback-flow.utils.d.ts.map +1 -0
- package/dist/paybox/auth/loopback-flow.utils.js +47 -0
- package/dist/paybox/auth/loopback-flow.utils.js.map +1 -0
- package/dist/paybox/auth/loopback-page-fonts.constants.d.ts +3 -0
- package/dist/paybox/auth/loopback-page-fonts.constants.d.ts.map +1 -0
- package/dist/paybox/auth/loopback-page-fonts.constants.js +228 -0
- package/dist/paybox/auth/loopback-page-fonts.constants.js.map +1 -0
- package/dist/paybox/auth/loopback-page.utils.d.ts +4 -0
- package/dist/paybox/auth/loopback-page.utils.d.ts.map +1 -0
- package/dist/paybox/auth/loopback-page.utils.js +261 -0
- package/dist/paybox/auth/loopback-page.utils.js.map +1 -0
- package/dist/paybox/auth/provisioning.utils.d.ts +3 -0
- package/dist/paybox/auth/provisioning.utils.d.ts.map +1 -0
- package/dist/paybox/auth/provisioning.utils.js +27 -0
- package/dist/paybox/auth/provisioning.utils.js.map +1 -0
- package/dist/paybox/auth/signing-key.utils.d.ts +2 -0
- package/dist/paybox/auth/signing-key.utils.d.ts.map +1 -0
- package/dist/paybox/auth/signing-key.utils.js +14 -0
- package/dist/paybox/auth/signing-key.utils.js.map +1 -0
- package/dist/paybox/auth/types.d.ts +18 -0
- package/dist/paybox/auth/types.d.ts.map +1 -0
- package/dist/paybox/auth/types.js +6 -0
- package/dist/paybox/auth/types.js.map +1 -0
- package/dist/paybox/auth/utils.d.ts +5 -0
- package/dist/paybox/auth/utils.d.ts.map +1 -0
- package/dist/paybox/auth/utils.js +17 -0
- package/dist/paybox/auth/utils.js.map +1 -0
- package/dist/paybox/constants.d.ts +11 -0
- package/dist/paybox/constants.d.ts.map +1 -0
- package/dist/paybox/constants.js +11 -0
- package/dist/paybox/constants.js.map +1 -0
- package/dist/paybox/errors.d.ts +43 -0
- package/dist/paybox/errors.d.ts.map +1 -0
- package/dist/paybox/errors.js +141 -0
- package/dist/paybox/errors.js.map +1 -0
- package/dist/paybox/sdk/adapter.d.ts +16 -0
- package/dist/paybox/sdk/adapter.d.ts.map +1 -0
- package/dist/paybox/sdk/adapter.js +127 -0
- package/dist/paybox/sdk/adapter.js.map +1 -0
- package/dist/paybox/sdk/constants.d.ts +14 -0
- package/dist/paybox/sdk/constants.d.ts.map +1 -0
- package/dist/paybox/sdk/constants.js +23 -0
- package/dist/paybox/sdk/constants.js.map +1 -0
- package/dist/paybox/sdk/factory.d.ts +4 -0
- package/dist/paybox/sdk/factory.d.ts.map +1 -0
- package/dist/paybox/sdk/factory.js +24 -0
- package/dist/paybox/sdk/factory.js.map +1 -0
- package/dist/paybox/sdk/logging.utils.d.ts +4 -0
- package/dist/paybox/sdk/logging.utils.d.ts.map +1 -0
- package/dist/paybox/sdk/logging.utils.js +19 -0
- package/dist/paybox/sdk/logging.utils.js.map +1 -0
- package/dist/paybox/sdk/utils.d.ts +7 -0
- package/dist/paybox/sdk/utils.d.ts.map +1 -0
- package/dist/paybox/sdk/utils.js +182 -0
- package/dist/paybox/sdk/utils.js.map +1 -0
- package/dist/paybox/storage.d.ts +17 -0
- package/dist/paybox/storage.d.ts.map +1 -0
- package/dist/paybox/storage.js +87 -0
- package/dist/paybox/storage.js.map +1 -0
- package/dist/paybox/types.d.ts +481 -0
- package/dist/paybox/types.d.ts.map +1 -0
- package/dist/paybox/types.js +144 -0
- package/dist/paybox/types.js.map +1 -0
- package/dist/paybox/wallet/manager.d.ts +22 -0
- package/dist/paybox/wallet/manager.d.ts.map +1 -0
- package/dist/paybox/wallet/manager.js +111 -0
- package/dist/paybox/wallet/manager.js.map +1 -0
- package/dist/paybox/wallet/rpc.client.d.ts +16 -0
- package/dist/paybox/wallet/rpc.client.d.ts.map +1 -0
- package/dist/paybox/wallet/rpc.client.js +53 -0
- package/dist/paybox/wallet/rpc.client.js.map +1 -0
- package/dist/paybox/wallet/utils.d.ts +5 -0
- package/dist/paybox/wallet/utils.d.ts.map +1 -0
- package/dist/paybox/wallet/utils.js +82 -0
- package/dist/paybox/wallet/utils.js.map +1 -0
- package/dist/server.constants.d.ts.map +1 -1
- package/dist/server.constants.js +5 -2
- package/dist/server.constants.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +8 -2
- package/dist/server.js.map +1 -1
- package/dist/services/app-config.utils.d.ts.map +1 -1
- package/dist/services/app-config.utils.js +22 -11
- package/dist/services/app-config.utils.js.map +1 -1
- package/dist/services/auth.service.d.ts +3 -5
- package/dist/services/auth.service.d.ts.map +1 -1
- package/dist/services/auth.service.js +20 -77
- package/dist/services/auth.service.js.map +1 -1
- package/dist/services/cell.client.d.ts.map +1 -1
- package/dist/services/cell.client.js +22 -9
- package/dist/services/cell.client.js.map +1 -1
- package/dist/services/lot-return.constants.d.ts +3 -0
- package/dist/services/lot-return.constants.d.ts.map +1 -0
- package/dist/services/lot-return.constants.js +35 -0
- package/dist/services/lot-return.constants.js.map +1 -0
- package/dist/services/lot-return.service.d.ts +25 -0
- package/dist/services/lot-return.service.d.ts.map +1 -0
- package/dist/services/lot-return.service.js +151 -0
- package/dist/services/lot-return.service.js.map +1 -0
- package/dist/services/lot-return.types.d.ts +19 -0
- package/dist/services/lot-return.types.d.ts.map +1 -0
- package/dist/services/lot-return.types.js +2 -0
- package/dist/services/lot-return.types.js.map +1 -0
- package/dist/services/lot-return.utils.d.ts +33 -0
- package/dist/services/lot-return.utils.d.ts.map +1 -0
- package/dist/services/lot-return.utils.js +128 -0
- package/dist/services/lot-return.utils.js.map +1 -0
- package/dist/services/lot-terms.constants.d.ts +4 -0
- package/dist/services/lot-terms.constants.d.ts.map +1 -0
- package/dist/services/lot-terms.constants.js +5 -0
- package/dist/services/lot-terms.constants.js.map +1 -0
- package/dist/services/lot-terms.helpers.d.ts +11 -0
- package/dist/services/lot-terms.helpers.d.ts.map +1 -0
- package/dist/services/lot-terms.helpers.js +45 -0
- package/dist/services/lot-terms.helpers.js.map +1 -0
- package/dist/services/lot-terms.service.d.ts +20 -0
- package/dist/services/lot-terms.service.d.ts.map +1 -0
- package/dist/services/lot-terms.service.js +119 -0
- package/dist/services/lot-terms.service.js.map +1 -0
- package/dist/services/lot-terms.types.d.ts +25 -0
- package/dist/services/lot-terms.types.d.ts.map +1 -0
- package/dist/services/lot-terms.types.js +2 -0
- package/dist/services/lot-terms.types.js.map +1 -0
- package/dist/services/reveal-revert.utils.d.ts +1 -0
- package/dist/services/reveal-revert.utils.d.ts.map +1 -1
- package/dist/services/reveal-revert.utils.js +20 -0
- package/dist/services/reveal-revert.utils.js.map +1 -1
- package/dist/services/reveal.constants.d.ts +1 -1
- package/dist/services/reveal.constants.d.ts.map +1 -1
- package/dist/services/reveal.constants.js +1 -1
- package/dist/services/reveal.constants.js.map +1 -1
- package/dist/services/reveal.service.d.ts +4 -3
- package/dist/services/reveal.service.d.ts.map +1 -1
- package/dist/services/reveal.service.js +35 -10
- package/dist/services/reveal.service.js.map +1 -1
- package/dist/services/reveal.utils.d.ts +7 -8
- package/dist/services/reveal.utils.d.ts.map +1 -1
- package/dist/services/reveal.utils.js +15 -8
- package/dist/services/reveal.utils.js.map +1 -1
- package/dist/services/route.constants.d.ts +12 -1
- package/dist/services/route.constants.d.ts.map +1 -1
- package/dist/services/route.constants.js +66 -15
- package/dist/services/route.constants.js.map +1 -1
- package/dist/services/route.lots.d.ts +18 -0
- package/dist/services/route.lots.d.ts.map +1 -0
- package/dist/services/route.lots.js +33 -0
- package/dist/services/route.lots.js.map +1 -0
- package/dist/services/route.service.d.ts +13 -4
- package/dist/services/route.service.d.ts.map +1 -1
- package/dist/services/route.service.js +95 -13
- package/dist/services/route.service.js.map +1 -1
- package/dist/services/route.types.d.ts +76 -0
- package/dist/services/route.types.d.ts.map +1 -0
- package/dist/services/route.types.js +8 -0
- package/dist/services/route.types.js.map +1 -0
- package/dist/services/route.utils.d.ts +19 -0
- package/dist/services/route.utils.d.ts.map +1 -1
- package/dist/services/route.utils.js +35 -0
- package/dist/services/route.utils.js.map +1 -1
- package/dist/services/trade-eviction.constants.d.ts +12 -0
- package/dist/services/trade-eviction.constants.d.ts.map +1 -0
- package/dist/services/trade-eviction.constants.js +25 -0
- package/dist/services/trade-eviction.constants.js.map +1 -0
- package/dist/services/trade-eviction.service.d.ts +22 -0
- package/dist/services/trade-eviction.service.d.ts.map +1 -0
- package/dist/services/trade-eviction.service.js +101 -0
- package/dist/services/trade-eviction.service.js.map +1 -0
- package/dist/services/trade-eviction.types.d.ts +30 -0
- package/dist/services/trade-eviction.types.d.ts.map +1 -0
- package/dist/services/trade-eviction.types.js +2 -0
- package/dist/services/trade-eviction.types.js.map +1 -0
- package/dist/services/trade-eviction.utils.d.ts +9 -0
- package/dist/services/trade-eviction.utils.d.ts.map +1 -0
- package/dist/services/trade-eviction.utils.js +38 -0
- package/dist/services/trade-eviction.utils.js.map +1 -0
- package/dist/services/trade-rules.service.d.ts +15 -0
- package/dist/services/trade-rules.service.d.ts.map +1 -0
- package/dist/services/trade-rules.service.js +45 -0
- package/dist/services/trade-rules.service.js.map +1 -0
- package/dist/services/trade.client.d.ts +11 -1
- package/dist/services/trade.client.d.ts.map +1 -1
- package/dist/services/trade.client.js +87 -0
- package/dist/services/trade.client.js.map +1 -1
- package/dist/services/trade.constants.d.ts +9 -0
- package/dist/services/trade.constants.d.ts.map +1 -0
- package/dist/services/trade.constants.js +28 -0
- package/dist/services/trade.constants.js.map +1 -0
- package/dist/services/trade.helpers.d.ts +9 -1
- package/dist/services/trade.helpers.d.ts.map +1 -1
- package/dist/services/trade.helpers.js +40 -27
- package/dist/services/trade.helpers.js.map +1 -1
- package/dist/services/transport-revert.utils.d.ts +3 -0
- package/dist/services/transport-revert.utils.d.ts.map +1 -0
- package/dist/services/transport-revert.utils.js +15 -0
- package/dist/services/transport-revert.utils.js.map +1 -0
- package/dist/services/transport.client.d.ts.map +1 -1
- package/dist/services/transport.client.js +14 -6
- package/dist/services/transport.client.js.map +1 -1
- package/dist/services/types.d.ts +249 -21
- package/dist/services/types.d.ts.map +1 -1
- package/dist/services/types.js +25 -0
- package/dist/services/types.js.map +1 -1
- package/dist/services/warehouse.utils.d.ts +8 -0
- package/dist/services/warehouse.utils.d.ts.map +1 -1
- package/dist/services/warehouse.utils.js +25 -0
- package/dist/services/warehouse.utils.js.map +1 -1
- package/dist/session/manager.d.ts +1 -0
- package/dist/session/manager.d.ts.map +1 -1
- package/dist/session/manager.js +13 -0
- package/dist/session/manager.js.map +1 -1
- package/dist/session/storage.d.ts +0 -3
- package/dist/session/storage.d.ts.map +1 -1
- package/dist/session/storage.js +6 -43
- package/dist/session/storage.js.map +1 -1
- package/dist/session/types.d.ts +4 -98
- package/dist/session/types.d.ts.map +1 -1
- package/dist/session/types.js +0 -15
- package/dist/session/types.js.map +1 -1
- package/dist/tools/authenticate.d.ts +1 -1
- package/dist/tools/authenticate.d.ts.map +1 -1
- package/dist/tools/authenticate.js +19 -45
- package/dist/tools/authenticate.js.map +1 -1
- package/dist/tools/config/get-game-config/constants.d.ts +3 -0
- package/dist/tools/config/get-game-config/constants.d.ts.map +1 -1
- package/dist/tools/config/get-game-config/constants.js +13 -2
- package/dist/tools/config/get-game-config/constants.js.map +1 -1
- package/dist/tools/config/get-game-config/get-game-config.d.ts.map +1 -1
- package/dist/tools/config/get-game-config/get-game-config.js +6 -3
- package/dist/tools/config/get-game-config/get-game-config.js.map +1 -1
- package/dist/tools/config/get-game-config/get-game-config.utils.d.ts +4 -4
- package/dist/tools/config/get-game-config/get-game-config.utils.d.ts.map +1 -1
- package/dist/tools/config/get-game-config/get-game-config.utils.js +26 -9
- package/dist/tools/config/get-game-config/get-game-config.utils.js.map +1 -1
- package/dist/tools/config/get-game-config/types.d.ts +6 -2
- package/dist/tools/config/get-game-config/types.d.ts.map +1 -1
- package/dist/tools/config/resource-lens/resource-lens.utils.d.ts.map +1 -1
- package/dist/tools/config/resource-lens/resource-lens.utils.js +5 -4
- package/dist/tools/config/resource-lens/resource-lens.utils.js.map +1 -1
- package/dist/tools/map/attention/attention.d.ts.map +1 -1
- package/dist/tools/map/attention/attention.js +16 -5
- package/dist/tools/map/attention/attention.js.map +1 -1
- package/dist/tools/map/attention/constants.d.ts +6 -0
- package/dist/tools/map/attention/constants.d.ts.map +1 -1
- package/dist/tools/map/attention/constants.js +16 -2
- package/dist/tools/map/attention/constants.js.map +1 -1
- package/dist/tools/map/attention/evicted.service.d.ts +19 -0
- package/dist/tools/map/attention/evicted.service.d.ts.map +1 -0
- package/dist/tools/map/attention/evicted.service.js +73 -0
- package/dist/tools/map/attention/evicted.service.js.map +1 -0
- package/dist/tools/map/attention/evicted.utils.d.ts +16 -0
- package/dist/tools/map/attention/evicted.utils.d.ts.map +1 -0
- package/dist/tools/map/attention/evicted.utils.js +72 -0
- package/dist/tools/map/attention/evicted.utils.js.map +1 -0
- package/dist/tools/map/attention/panel.utils.d.ts.map +1 -1
- package/dist/tools/map/attention/panel.utils.js +1 -0
- package/dist/tools/map/attention/panel.utils.js.map +1 -1
- package/dist/tools/map/attention/types.d.ts +17 -0
- package/dist/tools/map/attention/types.d.ts.map +1 -1
- package/dist/tools/map/attention/types.js.map +1 -1
- package/dist/tools/map/get-map/constants.d.ts.map +1 -1
- package/dist/tools/map/get-map/constants.js +4 -2
- package/dist/tools/map/get-map/constants.js.map +1 -1
- package/dist/tools/reveal/constants.d.ts.map +1 -1
- package/dist/tools/reveal/constants.js +3 -1
- package/dist/tools/reveal/constants.js.map +1 -1
- package/dist/tools/trade/buy-lot/buy-lot.d.ts.map +1 -1
- package/dist/tools/trade/buy-lot/buy-lot.js +2 -0
- package/dist/tools/trade/buy-lot/buy-lot.js.map +1 -1
- package/dist/tools/trade/buy-lot/constants.d.ts.map +1 -1
- package/dist/tools/trade/buy-lot/constants.js +2 -0
- package/dist/tools/trade/buy-lot/constants.js.map +1 -1
- package/dist/tools/trade/buyer-guard/constants.d.ts +4 -0
- package/dist/tools/trade/buyer-guard/constants.d.ts.map +1 -0
- package/dist/tools/trade/buyer-guard/constants.js +11 -0
- package/dist/tools/trade/buyer-guard/constants.js.map +1 -0
- package/dist/tools/trade/buyer-guard/lot-open.guard.d.ts +9 -0
- package/dist/tools/trade/buyer-guard/lot-open.guard.d.ts.map +1 -0
- package/dist/tools/trade/buyer-guard/lot-open.guard.js +15 -0
- package/dist/tools/trade/buyer-guard/lot-open.guard.js.map +1 -0
- package/dist/tools/trade/buyer-guard/types.d.ts +6 -0
- package/dist/tools/trade/buyer-guard/types.d.ts.map +1 -0
- package/dist/tools/trade/buyer-guard/types.js +2 -0
- package/dist/tools/trade/buyer-guard/types.js.map +1 -0
- package/dist/tools/trade/constants.d.ts +5 -0
- package/dist/tools/trade/constants.d.ts.map +1 -0
- package/dist/tools/trade/constants.js +14 -0
- package/dist/tools/trade/constants.js.map +1 -0
- package/dist/tools/trade/create-lot/constants.d.ts.map +1 -1
- package/dist/tools/trade/create-lot/constants.js +4 -1
- package/dist/tools/trade/create-lot/constants.js.map +1 -1
- package/dist/tools/trade/create-lot/create-lot.d.ts +2 -1
- package/dist/tools/trade/create-lot/create-lot.d.ts.map +1 -1
- package/dist/tools/trade/create-lot/create-lot.js +15 -1
- package/dist/tools/trade/create-lot/create-lot.js.map +1 -1
- package/dist/tools/trade/evict-lot/constants.d.ts +4 -0
- package/dist/tools/trade/evict-lot/constants.d.ts.map +1 -0
- package/dist/tools/trade/evict-lot/constants.js +13 -0
- package/dist/tools/trade/evict-lot/constants.js.map +1 -0
- package/dist/tools/trade/evict-lot/evict-lot.d.ts +6 -0
- package/dist/tools/trade/evict-lot/evict-lot.d.ts.map +1 -0
- package/dist/tools/trade/evict-lot/evict-lot.js +35 -0
- package/dist/tools/trade/evict-lot/evict-lot.js.map +1 -0
- package/dist/tools/trade/evict-lot/format.utils.d.ts +5 -0
- package/dist/tools/trade/evict-lot/format.utils.d.ts.map +1 -0
- package/dist/tools/trade/evict-lot/format.utils.js +10 -0
- package/dist/tools/trade/evict-lot/format.utils.js.map +1 -0
- package/dist/tools/trade/evict-lot/types.d.ts +5 -0
- package/dist/tools/trade/evict-lot/types.d.ts.map +1 -0
- package/dist/tools/trade/evict-lot/types.js +8 -0
- package/dist/tools/trade/evict-lot/types.js.map +1 -0
- package/dist/tools/trade/format.utils.d.ts +2 -4
- package/dist/tools/trade/format.utils.d.ts.map +1 -1
- package/dist/tools/trade/format.utils.js +11 -13
- package/dist/tools/trade/format.utils.js.map +1 -1
- package/dist/tools/trade/get-lot/constants.d.ts.map +1 -1
- package/dist/tools/trade/get-lot/constants.js +2 -1
- package/dist/tools/trade/get-lot/constants.js.map +1 -1
- package/dist/tools/trade/list-lots/constants.d.ts +2 -0
- package/dist/tools/trade/list-lots/constants.d.ts.map +1 -1
- package/dist/tools/trade/list-lots/constants.js +5 -1
- package/dist/tools/trade/list-lots/constants.js.map +1 -1
- package/dist/tools/trade/list-lots/list-lots.d.ts.map +1 -1
- package/dist/tools/trade/list-lots/list-lots.js +2 -1
- package/dist/tools/trade/list-lots/list-lots.js.map +1 -1
- package/dist/tools/trade/list-lots/list-lots.utils.d.ts +8 -0
- package/dist/tools/trade/list-lots/list-lots.utils.d.ts.map +1 -0
- package/dist/tools/trade/list-lots/list-lots.utils.js +10 -0
- package/dist/tools/trade/list-lots/list-lots.utils.js.map +1 -0
- package/dist/tools/trade/list-mine/constants.d.ts.map +1 -1
- package/dist/tools/trade/list-mine/constants.js +3 -1
- package/dist/tools/trade/list-mine/constants.js.map +1 -1
- package/dist/tools/trade/lot-terms/constants.d.ts +5 -0
- package/dist/tools/trade/lot-terms/constants.d.ts.map +1 -0
- package/dist/tools/trade/lot-terms/constants.js +13 -0
- package/dist/tools/trade/lot-terms/constants.js.map +1 -0
- package/dist/tools/trade/lot-terms/factory.d.ts +4 -0
- package/dist/tools/trade/lot-terms/factory.d.ts.map +1 -0
- package/dist/tools/trade/lot-terms/factory.js +14 -0
- package/dist/tools/trade/lot-terms/factory.js.map +1 -0
- package/dist/tools/trade/lot-terms/format.utils.d.ts +4 -0
- package/dist/tools/trade/lot-terms/format.utils.d.ts.map +1 -0
- package/dist/tools/trade/lot-terms/format.utils.js +30 -0
- package/dist/tools/trade/lot-terms/format.utils.js.map +1 -0
- package/dist/tools/trade/lot-terms/lot-terms.d.ts +5 -0
- package/dist/tools/trade/lot-terms/lot-terms.d.ts.map +1 -0
- package/dist/tools/trade/lot-terms/lot-terms.js +23 -0
- package/dist/tools/trade/lot-terms/lot-terms.js.map +1 -0
- package/dist/tools/trade/lot-terms/types.d.ts +6 -0
- package/dist/tools/trade/lot-terms/types.d.ts.map +1 -0
- package/dist/tools/trade/lot-terms/types.js +7 -0
- package/dist/tools/trade/lot-terms/types.js.map +1 -0
- package/dist/tools/trade/market-index/constants.d.ts.map +1 -1
- package/dist/tools/trade/market-index/constants.js +2 -0
- package/dist/tools/trade/market-index/constants.js.map +1 -1
- package/dist/tools/trade/markets/constants.d.ts.map +1 -1
- package/dist/tools/trade/markets/constants.js +2 -1
- package/dist/tools/trade/markets/constants.js.map +1 -1
- package/dist/tools/trade/quote-buy/constants.d.ts.map +1 -1
- package/dist/tools/trade/quote-buy/constants.js +4 -2
- package/dist/tools/trade/quote-buy/constants.js.map +1 -1
- package/dist/tools/trade/quote-buy/quote-buy.d.ts.map +1 -1
- package/dist/tools/trade/quote-buy/quote-buy.js +2 -0
- package/dist/tools/trade/quote-buy/quote-buy.js.map +1 -1
- package/dist/tools/trade/quote-lot-return/constants.d.ts +2 -0
- package/dist/tools/trade/quote-lot-return/constants.d.ts.map +1 -0
- package/dist/tools/trade/quote-lot-return/constants.js +11 -0
- package/dist/tools/trade/quote-lot-return/constants.js.map +1 -0
- package/dist/tools/trade/quote-lot-return/quote-lot-return.d.ts +5 -0
- package/dist/tools/trade/quote-lot-return/quote-lot-return.d.ts.map +1 -0
- package/dist/tools/trade/quote-lot-return/quote-lot-return.js +20 -0
- package/dist/tools/trade/quote-lot-return/quote-lot-return.js.map +1 -0
- package/dist/tools/trade/return-lot/constants.d.ts +5 -0
- package/dist/tools/trade/return-lot/constants.d.ts.map +1 -0
- package/dist/tools/trade/return-lot/constants.js +26 -0
- package/dist/tools/trade/return-lot/constants.js.map +1 -0
- package/dist/tools/trade/return-lot/factory.d.ts +4 -0
- package/dist/tools/trade/return-lot/factory.d.ts.map +1 -0
- package/dist/tools/trade/return-lot/factory.js +18 -0
- package/dist/tools/trade/return-lot/factory.js.map +1 -0
- package/dist/tools/trade/return-lot/format.utils.d.ts +5 -0
- package/dist/tools/trade/return-lot/format.utils.d.ts.map +1 -0
- package/dist/tools/trade/return-lot/format.utils.js +39 -0
- package/dist/tools/trade/return-lot/format.utils.js.map +1 -0
- package/dist/tools/trade/return-lot/return-lot.d.ts +5 -0
- package/dist/tools/trade/return-lot/return-lot.d.ts.map +1 -0
- package/dist/tools/trade/return-lot/return-lot.js +25 -0
- package/dist/tools/trade/return-lot/return-lot.js.map +1 -0
- package/dist/tools/trade/return-lot/types.d.ts +11 -0
- package/dist/tools/trade/return-lot/types.d.ts.map +1 -0
- package/dist/tools/trade/return-lot/types.js +21 -0
- package/dist/tools/trade/return-lot/types.js.map +1 -0
- package/dist/tools/trade/types.d.ts +0 -4
- package/dist/tools/trade/types.d.ts.map +1 -1
- package/dist/tools/trade/types.js +4 -12
- package/dist/tools/trade/types.js.map +1 -1
- package/dist/tools/transport/constants.d.ts.map +1 -1
- package/dist/tools/transport/constants.js +9 -0
- package/dist/tools/transport/constants.js.map +1 -1
- package/dist/tools/transport/network/constants.d.ts +2 -0
- package/dist/tools/transport/network/constants.d.ts.map +1 -1
- package/dist/tools/transport/network/constants.js +2 -0
- package/dist/tools/transport/network/constants.js.map +1 -1
- package/dist/tools/transport/network/panel.utils.d.ts +2 -2
- package/dist/tools/transport/network/panel.utils.d.ts.map +1 -1
- package/dist/tools/transport/network/panel.utils.js +20 -0
- package/dist/tools/transport/network/panel.utils.js.map +1 -1
- package/dist/tools/transport/network/route-network.d.ts.map +1 -1
- package/dist/tools/transport/network/route-network.js +1 -1
- package/dist/tools/transport/network/route-network.js.map +1 -1
- package/dist/tools/transport/next-hops/next-hops.d.ts.map +1 -1
- package/dist/tools/transport/next-hops/next-hops.js +13 -3
- package/dist/tools/transport/next-hops/next-hops.js.map +1 -1
- package/dist/tools/transport/quote/constants.d.ts.map +1 -1
- package/dist/tools/transport/quote/constants.js +5 -3
- package/dist/tools/transport/quote/constants.js.map +1 -1
- package/dist/tools/transport/types.d.ts +2 -0
- package/dist/tools/transport/types.d.ts.map +1 -1
- package/dist/tools/transport/types.js +16 -0
- package/dist/tools/transport/types.js.map +1 -1
- package/dist/tools/types.d.ts +7 -1
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/types.js +16 -1
- package/dist/tools/types.js.map +1 -1
- package/dist/types.d.ts +3 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/wei.constants.d.ts +6 -0
- package/dist/utils/wei.constants.d.ts.map +1 -0
- package/dist/utils/wei.constants.js +6 -0
- package/dist/utils/wei.constants.js.map +1 -0
- package/dist/wallet/index.d.ts.map +1 -1
- package/dist/wallet/index.js +2 -3
- package/dist/wallet/index.js.map +1 -1
- package/dist/wallet/types.d.ts +0 -9
- package/dist/wallet/types.d.ts.map +1 -1
- package/dist/wallet/types.js.map +1 -1
- package/package.json +2 -2
- package/dist/tools/trade/cancel-lot/cancel-lot.d.ts +0 -4
- package/dist/tools/trade/cancel-lot/cancel-lot.d.ts.map +0 -1
- package/dist/tools/trade/cancel-lot/cancel-lot.js +0 -20
- package/dist/tools/trade/cancel-lot/cancel-lot.js.map +0 -1
- package/dist/tools/trade/cancel-lot/constants.d.ts +0 -2
- package/dist/tools/trade/cancel-lot/constants.d.ts.map +0 -1
- package/dist/tools/trade/cancel-lot/constants.js +0 -8
- package/dist/tools/trade/cancel-lot/constants.js.map +0 -1
- package/dist/wallet/agw.manager.d.ts +0 -20
- package/dist/wallet/agw.manager.d.ts.map +0 -1
- package/dist/wallet/agw.manager.js +0 -90
- package/dist/wallet/agw.manager.js.map +0 -1
- package/dist/wallet/agw.provider.d.ts +0 -14
- package/dist/wallet/agw.provider.d.ts.map +0 -1
- package/dist/wallet/agw.provider.js +0 -48
- package/dist/wallet/agw.provider.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/tools/transport/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,eAAO,MAAM,oBAAoB;;;;CAmBhC,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/tools/transport/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,eAAO,MAAM,oBAAoB;;;;CAmBhC,CAAC;AAmBF,eAAO,MAAM,uBAAuB;;;;;;CAqBnC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;CAc/B,CAAC;AAEF,eAAO,MAAM,6BAA6B;;CAEzC,CAAC;AAEF,eAAO,MAAM,2BAA2B;;CAKvC,CAAC;AAEF,eAAO,MAAM,2BAA2B;;CAKvC,CAAC"}
|
|
@@ -20,6 +20,20 @@ export const transportInputSchema = {
|
|
|
20
20
|
.regex(/^[1-9]\d*$/)
|
|
21
21
|
.describe('Units to move, as a positive integer string (matches on-map resource balances).'),
|
|
22
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* The Lot return context, shared by both route actions. Naming a lot switches the plan to that lot's way
|
|
25
|
+
* home; leaving it null keeps ordinary planning, exception and all.
|
|
26
|
+
*/
|
|
27
|
+
const lotReturnContextSchema = z
|
|
28
|
+
.string()
|
|
29
|
+
.regex(/^\d+$/)
|
|
30
|
+
.nullable()
|
|
31
|
+
.default(null)
|
|
32
|
+
.describe('Optional lot id — plan the way home for this lot instead of an ordinary shipment. For an Evicted ' +
|
|
33
|
+
'lot the source is the hub it was listed on, admitted from the lot itself with the reach and the ' +
|
|
34
|
+
'rate recorded there, so the plan survives that hub being demolished, rebuilt or sold. Nothing ' +
|
|
35
|
+
'after the source changes: the destination is still your own revealed cell and every waypoint ' +
|
|
36
|
+
'follows the ordinary rules. Verify the chain with cpu_quote_lot_return.');
|
|
23
37
|
export const routeNetworkInputSchema = {
|
|
24
38
|
from: tokenIdSchema.describe('Source cell tokenId — where the cargo stands now. Must be your own cell past its first completed ' +
|
|
25
39
|
'reveal; a foreign Hub is passage, never an end of a shipment.'),
|
|
@@ -34,6 +48,7 @@ export const routeNetworkInputSchema = {
|
|
|
34
48
|
.regex(ROUTE_AMOUNT_PATTERN)
|
|
35
49
|
.describe('Units to move, as a positive integer string (matches on-map resource balances). Carried through ' +
|
|
36
50
|
'the graph and into the prefilled quote call unchanged.'),
|
|
51
|
+
lotId: lotReturnContextSchema,
|
|
37
52
|
};
|
|
38
53
|
export const nextHopsInputSchema = {
|
|
39
54
|
from: tokenIdSchema.describe('The cell to hop from — where the cargo stands now: your own cell, a cell with a finished Hub, or ' +
|
|
@@ -46,6 +61,7 @@ export const nextHopsInputSchema = {
|
|
|
46
61
|
.nullable()
|
|
47
62
|
.default(null)
|
|
48
63
|
.describe('Optional destination — adds the remaining grid distance to it for each candidate (a compass).'),
|
|
64
|
+
lotId: lotReturnContextSchema,
|
|
49
65
|
};
|
|
50
66
|
export const getTransportStatusInputSchema = {
|
|
51
67
|
deliveryId: z.string().describe('The on-chain delivery id (from `transport` or `list_my_transports`).'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/tools/transport/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAChC,IAAI,EAAE,CAAC;SACF,KAAK,CAA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O,CAAC,IAAI,CAAC;SACb,QAAQ,CAAC,+FAA+F,CAAC;IAC9G,KAAK,EAAE,sBAAsB;CAChC,CAAC;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAG;IACzC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sEAAsE,CAAC;CAC1G,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACvC,MAAM,EAAE,CAAC;SACJ,UAAU,CAAC,cAAc,CAAC;SAC1B,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC;SAC3B,QAAQ,CAAC,wEAAwE,CAAC;CAC1F,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACvC,GAAG,EAAE,CAAC;SACD,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;SACjB,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CAAC,oFAAoF,CAAC;CACtG,CAAC"}
|
package/dist/tools/types.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
2
|
import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
export declare const authenticateInputSchema: {
|
|
5
|
+
force: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
|
|
6
|
+
payboxCredentialId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
7
|
+
};
|
|
3
8
|
export type ToolRegistrar = Pick<McpServer, 'registerTool'>;
|
|
4
9
|
export type ToolHandler<TArgs extends Array<unknown> = Array<unknown>> = (...args: TArgs) => CallToolResult | Promise<CallToolResult>;
|
|
5
10
|
export declare enum ToolEventType {
|
|
@@ -15,7 +20,8 @@ export declare enum ToolEventType {
|
|
|
15
20
|
DeliveryFinalized = "delivery_finalized",
|
|
16
21
|
LotCreated = "lot_created",
|
|
17
22
|
LotBought = "lot_bought",
|
|
18
|
-
|
|
23
|
+
LotReturned = "lot_returned",
|
|
24
|
+
LotEvicted = "lot_evicted",
|
|
19
25
|
HubFeeSet = "hub_fee_set",
|
|
20
26
|
Swapped = "swapped",
|
|
21
27
|
Withdrawn = "withdrawn",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/tools/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/tools/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,uBAAuB;;;CAYnC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;AAE5D,MAAM,MAAM,WAAW,CAAC,KAAK,SAAS,KAAK,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CACrE,GAAG,IAAI,EAAE,KAAK,KACb,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAE9C,oBAAY,aAAa;IACrB,YAAY,kBAAkB;IAC9B,YAAY,kBAAkB;IAC9B,cAAc,oBAAoB;IAClC,kBAAkB,wBAAwB;IAC1C,aAAa,mBAAmB;IAChC,aAAa,mBAAmB;IAChC,YAAY,kBAAkB;IAC9B,YAAY,kBAAkB;IAC9B,aAAa,mBAAmB;IAChC,iBAAiB,uBAAuB;IACxC,UAAU,gBAAgB;IAC1B,SAAS,eAAe;IACxB,WAAW,iBAAiB;IAC5B,UAAU,gBAAgB;IAC1B,SAAS,gBAAgB;IACzB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,UAAU,gBAAgB;IAC1B,eAAe,qBAAqB;IACpC,aAAa,mBAAmB;IAChC,gBAAgB,sBAAsB;IACtC,uBAAuB,8BAA8B;IACrD,sBAAsB,6BAA6B;IACnD,eAAe,qBAAqB;CACvC"}
|
package/dist/tools/types.js
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const authenticateInputSchema = {
|
|
3
|
+
force: z
|
|
4
|
+
.boolean()
|
|
5
|
+
.nullable()
|
|
6
|
+
.default(null)
|
|
7
|
+
.describe('Ignore the stored session and re-run authentication from scratch.'),
|
|
8
|
+
payboxCredentialId: z
|
|
9
|
+
.string()
|
|
10
|
+
.min(1)
|
|
11
|
+
.nullable()
|
|
12
|
+
.default(null)
|
|
13
|
+
.describe('Opaque Paybox credential ID returned by an outstanding wallet selection.'),
|
|
14
|
+
};
|
|
1
15
|
export var ToolEventType;
|
|
2
16
|
(function (ToolEventType) {
|
|
3
17
|
ToolEventType["CellRevealed"] = "cell_revealed";
|
|
@@ -12,7 +26,8 @@ export var ToolEventType;
|
|
|
12
26
|
ToolEventType["DeliveryFinalized"] = "delivery_finalized";
|
|
13
27
|
ToolEventType["LotCreated"] = "lot_created";
|
|
14
28
|
ToolEventType["LotBought"] = "lot_bought";
|
|
15
|
-
ToolEventType["
|
|
29
|
+
ToolEventType["LotReturned"] = "lot_returned";
|
|
30
|
+
ToolEventType["LotEvicted"] = "lot_evicted";
|
|
16
31
|
ToolEventType["HubFeeSet"] = "hub_fee_set";
|
|
17
32
|
ToolEventType["Swapped"] = "swapped";
|
|
18
33
|
ToolEventType["Withdrawn"] = "withdrawn";
|
package/dist/tools/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/tools/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/tools/types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACnC,KAAK,EAAE,CAAC;SACH,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,OAAO,CAAC,IAAI,CAAC;SACb,QAAQ,CAAC,mEAAmE,CAAC;IAClF,kBAAkB,EAAE,CAAC;SAChB,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,EAAE;SACV,OAAO,CAAC,IAAI,CAAC;SACb,QAAQ,CAAC,0EAA0E,CAAC;CAC5F,CAAC;AAQF,MAAM,CAAN,IAAY,aAyBX;AAzBD,WAAY,aAAa;IACrB,+CAA8B,CAAA;IAC9B,+CAA8B,CAAA;IAC9B,mDAAkC,CAAA;IAClC,2DAA0C,CAAA;IAC1C,iDAAgC,CAAA;IAChC,iDAAgC,CAAA;IAChC,+CAA8B,CAAA;IAC9B,+CAA8B,CAAA;IAC9B,iDAAgC,CAAA;IAChC,yDAAwC,CAAA;IACxC,2CAA0B,CAAA;IAC1B,yCAAwB,CAAA;IACxB,6CAA4B,CAAA;IAC5B,2CAA0B,CAAA;IAC1B,0CAAyB,CAAA;IACzB,oCAAmB,CAAA;IACnB,wCAAuB,CAAA;IACvB,2CAA0B,CAAA;IAC1B,qDAAoC,CAAA;IACpC,iDAAgC,CAAA;IAChC,uDAAsC,CAAA;IACtC,sEAAqD,CAAA;IACrD,oEAAmD,CAAA;IACnD,qDAAoC,CAAA;AACxC,CAAC,EAzBW,aAAa,KAAb,aAAa,QAyBxB"}
|
package/dist/types.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ import type { RevealService } from './services/reveal.service.js';
|
|
|
15
15
|
import type { RouteService } from './services/route.service.js';
|
|
16
16
|
import type { SwapService } from './services/swap.service.js';
|
|
17
17
|
import type { SyndicateService } from './services/syndicate.service.js';
|
|
18
|
+
import type { TradeRulesService } from './services/trade-rules.service.js';
|
|
18
19
|
import type { TradeService } from './services/trade.service.js';
|
|
19
20
|
import type { TransportService } from './services/transport.service.js';
|
|
20
21
|
import type { WithdrawService } from './services/withdraw.service.js';
|
|
@@ -23,7 +24,7 @@ import type { IBackendVersionSignal, IPackageVersionSignal } from './version/typ
|
|
|
23
24
|
import type { WalletProvider } from './wallet/types.js';
|
|
24
25
|
export declare enum WalletMode {
|
|
25
26
|
EVM = "evm",
|
|
26
|
-
|
|
27
|
+
PAYBOX = "paybox"
|
|
27
28
|
}
|
|
28
29
|
export interface AppContext {
|
|
29
30
|
config: EnvConfig;
|
|
@@ -40,6 +41,7 @@ export interface AppContext {
|
|
|
40
41
|
transport: TransportService;
|
|
41
42
|
route: RouteService;
|
|
42
43
|
trade: TradeService;
|
|
44
|
+
tradeRules: TradeRulesService;
|
|
43
45
|
syndicate: SyndicateService;
|
|
44
46
|
swap: SwapService;
|
|
45
47
|
mint: MintService;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,E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CAAC;IACvB,GAAG,EAAE,SAAS,CAAC;IACf,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,MAAM,EAAE,aAAa,CAAC;IACtB,gBAAgB,EAAE,uBAAuB,CAAC;IAC1C,KAAK,EAAE,YAAY,CAAC;IACpB,KAAK,EAAE,YAAY,CAAC;IACpB,MAAM,EAAE,aAAa,CAAC;IACtB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,KAAK,EAAE,YAAY,CAAC;IACpB,KAAK,EAAE,YAAY,CAAC;IACpB,UAAU,EAAE,iBAAiB,CAAC;IAC9B,SAAS,EAAE,gBAAgB,CAAC;IAC5B,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,EAAE,cAAc,CAAC;IACxB,QAAQ,EAAE,eAAe,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC;IACrB,cAAc,EAAE,qBAAqB,CAAC;IACtC,cAAc,EAAE,qBAAqB,CAAC;IACtC,MAAM,EAAE,OAAO,CAAC;CACnB"}
|
package/dist/types.js
CHANGED
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAyBA,MAAM,CAAN,IAAY,UAGX;AAHD,WAAY,UAAU;IAClB,yBAAW,CAAA;IACX,+BAAiB,CAAA;AACrB,CAAC,EAHW,UAAU,KAAV,UAAU,QAGrB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wei only ever travels as a whole-number string, so every seam that reads one shares this shape: two copies
|
|
3
|
+
* of the guard drift apart the moment one of them learns something the other does not.
|
|
4
|
+
*/
|
|
5
|
+
export declare const WEI_STRING_PATTERN: RegExp;
|
|
6
|
+
//# sourceMappingURL=wei.constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wei.constants.d.ts","sourceRoot":"","sources":["../../src/utils/wei.constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,kBAAkB,QAAU,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wei only ever travels as a whole-number string, so every seam that reads one shares this shape: two copies
|
|
3
|
+
* of the guard drift apart the moment one of them learns something the other does not.
|
|
4
|
+
*/
|
|
5
|
+
export const WEI_STRING_PATTERN = /^\d+$/;
|
|
6
|
+
//# sourceMappingURL=wei.constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wei.constants.js","sourceRoot":"","sources":["../../src/utils/wei.constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/wallet/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/wallet/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5E,YAAY,EACR,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,yBAAyB,GAC5B,MAAM,YAAY,CAAC;AAEpB,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,GAAG,cAAc,CAOrF"}
|
package/dist/wallet/index.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { WalletMode } from '../types.js';
|
|
2
|
-
import { AgwWalletProvider } from './agw.provider.js';
|
|
3
2
|
import { EvmWalletProvider } from './evm.provider.js';
|
|
4
3
|
export function createWalletProvider(input) {
|
|
5
|
-
const { config,
|
|
4
|
+
const { config, logger } = input;
|
|
6
5
|
if (config.WALLET_MODE === WalletMode.EVM) {
|
|
7
6
|
return new EvmWalletProvider(config, logger.child('wallet:evm'));
|
|
8
7
|
}
|
|
9
|
-
|
|
8
|
+
throw new Error('Paybox wallet provider must be created with its explicit authentication dependencies.');
|
|
10
9
|
}
|
|
11
10
|
//# sourceMappingURL=index.js.map
|
package/dist/wallet/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/wallet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/wallet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAWtD,MAAM,UAAU,oBAAoB,CAAC,KAAgC;IACjE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAEjC,IAAI,MAAM,CAAC,WAAW,KAAK,UAAU,CAAC,GAAG,EAAE,CAAC;QACxC,OAAO,IAAI,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;IACrE,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,uFAAuF,CAAC,CAAC;AAC7G,CAAC"}
|
package/dist/wallet/types.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { Abi, Address, Hash, Hex, Log } from 'viem';
|
|
2
2
|
import type { EnvConfig } from '../config/types.js';
|
|
3
3
|
import type { ILogger } from '../logger/types.js';
|
|
4
|
-
import type { SessionManager } from '../session/manager.js';
|
|
5
|
-
import type { AgwSessionConfig } from '../session/types.js';
|
|
6
4
|
import type { RetryOptions } from '../utils/retry.utils.js';
|
|
7
5
|
export interface GasEstimateRequest {
|
|
8
6
|
to: Address;
|
|
@@ -72,15 +70,8 @@ export interface EvmWalletManagerOptions {
|
|
|
72
70
|
rpcUrl: string | null;
|
|
73
71
|
logger: ILogger;
|
|
74
72
|
}
|
|
75
|
-
export interface AgwWalletManagerOptions {
|
|
76
|
-
sessionPrivateKey: Hex;
|
|
77
|
-
sessionConfig: AgwSessionConfig;
|
|
78
|
-
rpcUrl: string | null;
|
|
79
|
-
logger: ILogger;
|
|
80
|
-
}
|
|
81
73
|
export interface CreateWalletProviderInput {
|
|
82
74
|
config: EnvConfig;
|
|
83
|
-
session: SessionManager;
|
|
84
75
|
logger: ILogger;
|
|
85
76
|
}
|
|
86
77
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/wallet/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAEzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/wallet/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAEzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,WAAW,kBAAkB;IAC/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],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/wallet/types.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAN,IAAY,QAGX;AAHD,WAAY,QAAQ;IAChB,+BAAmB,CAAA;IACnB,iCAAqB,CAAA;AACzB,CAAC,EAHW,QAAQ,KAAR,QAAQ,QAGnB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "project-cpu-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "MCP server for Project CPU — AI agents interact with the game on behalf of players",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"format": "prettier --write 'src/**/*.ts'"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@abstract-foundation/agw-client": "^1.12.3",
|
|
47
46
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
47
|
+
"@paybox-sh/sdk": "0.8.0",
|
|
48
48
|
"@uniswap/sdk-core": "^7.17.0",
|
|
49
49
|
"@uniswap/universal-router-sdk": "^5.7.0",
|
|
50
50
|
"@uniswap/v4-sdk": "^2.2.2",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cancel-lot.d.ts","sourceRoot":"","sources":["../../../../src/tools/trade/cancel-lot/cancel-lot.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAiB,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAInE,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,GAAG,IAAI,CAmBtF"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { CANCEL_LOT_DESCRIPTION } from './constants.js';
|
|
2
|
-
import { ToolEventType } from '../../types.js';
|
|
3
|
-
import { summarizeCancelLot } from '../format.utils.js';
|
|
4
|
-
import { cancelLotInputSchema } from '../types.js';
|
|
5
|
-
export function registerCancelLotTool(server, context) {
|
|
6
|
-
server.registerTool('cpu_cancel_lot', { description: CANCEL_LOT_DESCRIPTION, inputSchema: cancelLotInputSchema }, async (args) => {
|
|
7
|
-
const result = await context.trade.cancelLot({
|
|
8
|
-
lotId: args.lotId,
|
|
9
|
-
chain: args.chain,
|
|
10
|
-
});
|
|
11
|
-
const { resources } = await context.appConfig.load();
|
|
12
|
-
return {
|
|
13
|
-
content: [
|
|
14
|
-
{ type: 'text', text: summarizeCancelLot(result, resources) },
|
|
15
|
-
{ type: 'text', text: JSON.stringify({ ...result, eventType: ToolEventType.LotCancelled }) },
|
|
16
|
-
],
|
|
17
|
-
};
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=cancel-lot.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cancel-lot.js","sourceRoot":"","sources":["../../../../src/tools/trade/cancel-lot/cancel-lot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAExD,OAAO,EAAE,aAAa,EAAsB,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,UAAU,qBAAqB,CAAC,MAAqB,EAAE,OAAmB;IAC5E,MAAM,CAAC,YAAY,CACf,gBAAgB,EAChB,EAAE,WAAW,EAAE,sBAAsB,EAAE,WAAW,EAAE,oBAAoB,EAAE,EAC1E,KAAK,EAAE,IAAI,EAAE,EAAE;QACX,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC;YACzC,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,KAAK,EAAE,IAAI,CAAC,KAAK;SACpB,CAAC,CAAC;QACH,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QAErD,OAAO;YACH,OAAO,EAAE;gBACL,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE;gBAC7D,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,MAAM,EAAE,SAAS,EAAE,aAAa,CAAC,YAAY,EAAE,CAAC,EAAE;aAC/F;SACJ,CAAC;IACN,CAAC,CACJ,CAAC;AACN,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/tools/trade/cancel-lot/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,QAMxB,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export const CANCEL_LOT_DESCRIPTION = [
|
|
2
|
-
'Withdraw an OPEN lot; the unsold units return to you, on-chain. Requires a session.',
|
|
3
|
-
'Pass chain = [hub, ...waypoints, your destination cell] for the return shipment (required). One atomic tx: a',
|
|
4
|
-
'return through a foreign Hub costs a $CPU transit fee (auto-approved), otherwise it is free; you also pay gas.',
|
|
5
|
-
'The units ship back and are credited only after they arrive and you `cpu_finalize_delivery` on the returned',
|
|
6
|
-
'deliveryId. Track with `cpu_list_my_lots` / `cpu_get_lot`.',
|
|
7
|
-
].join(' ');
|
|
8
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/tools/trade/cancel-lot/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG;IAClC,qFAAqF;IACrF,8GAA8G;IAC9G,gHAAgH;IAChH,6GAA6G;IAC7G,4DAA4D;CAC/D,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { type Address, type Hash, type Hex } from 'viem';
|
|
2
|
-
import { type AgwWalletManagerOptions, type GasEstimateRequest, type ReadContractParams, type TransactionRequest, type TxReceipt, type WalletManager } from './types.js';
|
|
3
|
-
export declare class AgwWalletManager implements WalletManager {
|
|
4
|
-
private readonly logger;
|
|
5
|
-
private readonly sessionClient;
|
|
6
|
-
private readonly accountAddress;
|
|
7
|
-
private readonly rpcUrl;
|
|
8
|
-
constructor(options: AgwWalletManagerOptions);
|
|
9
|
-
getAddress(): Address;
|
|
10
|
-
getChainId(): number;
|
|
11
|
-
sendTransaction(tx: TransactionRequest): Promise<Hash>;
|
|
12
|
-
estimateGas(tx: GasEstimateRequest): Promise<bigint>;
|
|
13
|
-
getGasPrice(): Promise<bigint>;
|
|
14
|
-
waitForReceipt(hash: Hash): Promise<TxReceipt>;
|
|
15
|
-
readContract(params: ReadContractParams): Promise<unknown>;
|
|
16
|
-
getBalance(): Promise<bigint>;
|
|
17
|
-
private publicClient;
|
|
18
|
-
signMessage(_message: string): Promise<Hex>;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=agw.manager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agw.manager.d.ts","sourceRoot":"","sources":["../../src/wallet/agw.manager.ts"],"names":[],"mappings":"AACA,OAAO,EAA4B,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,GAAG,EAAE,MAAM,MAAM,CAAC;AAInF,OAAO,EACH,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,SAAS,EAEd,KAAK,aAAa,EACrB,MAAM,YAAY,CAAC;AAKpB,qBAAa,gBAAiB,YAAW,aAAa;IAClD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAU;IACjC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAgB;IAC9C,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAU;IACzC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;gBAE3B,OAAO,EAAE,uBAAuB;IAmB5C,UAAU,IAAI,OAAO;IAIrB,UAAU,IAAI,MAAM;IAId,eAAe,CAAC,EAAE,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAmBtD,WAAW,CAAC,EAAE,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC;IASpD,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC;IAI9B,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,SAAS,CAAC;IAU9C,YAAY,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC;IAS1D,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC;IAInC,OAAO,CAAC,YAAY;IAOd,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;CAGpD"}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { createSessionClient } from '@abstract-foundation/agw-client/sessions';
|
|
2
|
-
import { createPublicClient, http } from 'viem';
|
|
3
|
-
import { privateKeyToAccount } from 'viem/accounts';
|
|
4
|
-
import { abstractTestnet } from 'viem/chains';
|
|
5
|
-
import { TxStatus, } from './types.js';
|
|
6
|
-
export class AgwWalletManager {
|
|
7
|
-
logger;
|
|
8
|
-
sessionClient;
|
|
9
|
-
accountAddress;
|
|
10
|
-
rpcUrl;
|
|
11
|
-
constructor(options) {
|
|
12
|
-
this.logger = options.logger;
|
|
13
|
-
this.accountAddress = options.sessionConfig.accountAddress;
|
|
14
|
-
this.rpcUrl = options.rpcUrl;
|
|
15
|
-
const signer = privateKeyToAccount(options.sessionPrivateKey);
|
|
16
|
-
// The API returns the on-chain SessionConfig shape inside `policies`.
|
|
17
|
-
// Cast through unknown since our persisted schema stores it as `z.unknown()`.
|
|
18
|
-
const session = options.sessionConfig.policies;
|
|
19
|
-
this.sessionClient = createSessionClient({
|
|
20
|
-
account: this.accountAddress,
|
|
21
|
-
chain: abstractTestnet,
|
|
22
|
-
signer,
|
|
23
|
-
session,
|
|
24
|
-
transport: options.rpcUrl !== null ? http(options.rpcUrl) : http(),
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
getAddress() {
|
|
28
|
-
return this.accountAddress;
|
|
29
|
-
}
|
|
30
|
-
getChainId() {
|
|
31
|
-
return abstractTestnet.id;
|
|
32
|
-
}
|
|
33
|
-
async sendTransaction(tx) {
|
|
34
|
-
this.logger.info('sending tx via session key', {
|
|
35
|
-
to: tx.to,
|
|
36
|
-
value: tx.value !== null ? tx.value.toString() : null,
|
|
37
|
-
});
|
|
38
|
-
const hash = await this.sessionClient.sendTransaction({
|
|
39
|
-
account: this.sessionClient.account,
|
|
40
|
-
chain: abstractTestnet,
|
|
41
|
-
to: tx.to,
|
|
42
|
-
value: tx.value ?? undefined,
|
|
43
|
-
data: tx.data,
|
|
44
|
-
gas: tx.gas ?? undefined,
|
|
45
|
-
});
|
|
46
|
-
this.logger.info('tx sent', { hash });
|
|
47
|
-
return hash;
|
|
48
|
-
}
|
|
49
|
-
async estimateGas(tx) {
|
|
50
|
-
return this.publicClient().estimateGas({
|
|
51
|
-
account: this.accountAddress,
|
|
52
|
-
to: tx.to,
|
|
53
|
-
data: tx.data,
|
|
54
|
-
value: tx.value ?? undefined,
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
async getGasPrice() {
|
|
58
|
-
return this.publicClient().getGasPrice();
|
|
59
|
-
}
|
|
60
|
-
async waitForReceipt(hash) {
|
|
61
|
-
const receipt = await this.publicClient().waitForTransactionReceipt({ hash });
|
|
62
|
-
return {
|
|
63
|
-
status: receipt.status === 'success' ? TxStatus.Success : TxStatus.Reverted,
|
|
64
|
-
transactionHash: receipt.transactionHash,
|
|
65
|
-
blockNumber: receipt.blockNumber,
|
|
66
|
-
logs: receipt.logs,
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
async readContract(params) {
|
|
70
|
-
return this.publicClient().readContract({
|
|
71
|
-
address: params.address,
|
|
72
|
-
abi: params.abi,
|
|
73
|
-
functionName: params.functionName,
|
|
74
|
-
args: params.args,
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
async getBalance() {
|
|
78
|
-
return this.publicClient().getBalance({ address: this.accountAddress });
|
|
79
|
-
}
|
|
80
|
-
publicClient() {
|
|
81
|
-
return createPublicClient({
|
|
82
|
-
chain: abstractTestnet,
|
|
83
|
-
transport: this.rpcUrl !== null ? http(this.rpcUrl) : http(),
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
async signMessage(_message) {
|
|
87
|
-
throw new Error('AgwWalletManager.signMessage: not implemented');
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
//# sourceMappingURL=agw.manager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agw.manager.js","sourceRoot":"","sources":["../../src/wallet/agw.manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAsB,MAAM,0CAA0C,CAAC;AACnG,OAAO,EAAE,kBAAkB,EAAE,IAAI,EAAqC,MAAM,MAAM,CAAC;AACnF,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,EAMH,QAAQ,GAEX,MAAM,YAAY,CAAC;AAKpB,MAAM,OAAO,gBAAgB;IACR,MAAM,CAAU;IAChB,aAAa,CAAgB;IAC7B,cAAc,CAAU;IACxB,MAAM,CAAgB;IAEvC,YAAY,OAAgC;QACxC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC7B,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,cAAyB,CAAC;QACtE,IAAI,CAAC,MAAM,GAAG,OAAO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c,EAAE,CAAC,CAAC;IAC5E,CAAC;IAEO,YAAY;QAChB,OAAO,kBAAkB,CAAC;YACtB,KAAK,EAAE,eAAe;YACtB,SAAS,EAAE,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE;SAC/D,CAAC,CAAC;IACP,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,QAAgB;QAC9B,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;IACrE,CAAC;CACJ"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { WalletManager, WalletProvider } from './types.js';
|
|
2
|
-
import type { EnvConfig } from '../config/types.js';
|
|
3
|
-
import type { ILogger } from '../logger/types.js';
|
|
4
|
-
import type { SessionManager } from '../session/manager.js';
|
|
5
|
-
export declare class AgwWalletProvider implements WalletProvider {
|
|
6
|
-
private readonly config;
|
|
7
|
-
private readonly session;
|
|
8
|
-
private readonly logger;
|
|
9
|
-
private cached;
|
|
10
|
-
constructor(config: EnvConfig, session: SessionManager, logger: ILogger);
|
|
11
|
-
get(): WalletManager;
|
|
12
|
-
isReady(): boolean;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=agw.provider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agw.provider.d.ts","sourceRoot":"","sources":["../../src/wallet/agw.provider.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAG5D,qBAAa,iBAAkB,YAAW,cAAc;IAIhD,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAL3B,OAAO,CAAC,MAAM,CAA+D;gBAGxD,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,cAAc,EACvB,MAAM,EAAE,OAAO;IAGpC,GAAG,IAAI,aAAa;IA8BpB,OAAO,IAAI,OAAO;CAQrB"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { AgwWalletManager } from './agw.manager.js';
|
|
2
|
-
import { SessionStatus } from '../session/types.js';
|
|
3
|
-
export class AgwWalletProvider {
|
|
4
|
-
config;
|
|
5
|
-
session;
|
|
6
|
-
logger;
|
|
7
|
-
cached = null;
|
|
8
|
-
constructor(config, session, logger) {
|
|
9
|
-
this.config = config;
|
|
10
|
-
this.session = session;
|
|
11
|
-
this.logger = logger;
|
|
12
|
-
}
|
|
13
|
-
get() {
|
|
14
|
-
if (this.session.getStatus() === SessionStatus.Missing) {
|
|
15
|
-
throw new Error('AGW wallet not ready. Call the `authenticate` tool first.');
|
|
16
|
-
}
|
|
17
|
-
const data = this.session.getSession();
|
|
18
|
-
if (data.sessionConfig === null || data.sessionPrivateKey === null) {
|
|
19
|
-
throw new Error('AGW session is incomplete. Call the `authenticate` tool first.');
|
|
20
|
-
}
|
|
21
|
-
if (data.sessionConfig.expiresAt * 1000 < Date.now()) {
|
|
22
|
-
this.cached = null;
|
|
23
|
-
this.session.clear();
|
|
24
|
-
throw new Error('AGW session expired. Call the `authenticate` tool to renew.');
|
|
25
|
-
}
|
|
26
|
-
if (this.cached?.sessionHash === data.sessionConfig.sessionHash) {
|
|
27
|
-
return this.cached.wallet;
|
|
28
|
-
}
|
|
29
|
-
const wallet = new AgwWalletManager({
|
|
30
|
-
sessionPrivateKey: data.sessionPrivateKey,
|
|
31
|
-
sessionConfig: data.sessionConfig,
|
|
32
|
-
rpcUrl: this.config.RPC_URL,
|
|
33
|
-
logger: this.logger,
|
|
34
|
-
});
|
|
35
|
-
this.cached = { wallet, sessionHash: data.sessionConfig.sessionHash };
|
|
36
|
-
return wallet;
|
|
37
|
-
}
|
|
38
|
-
isReady() {
|
|
39
|
-
try {
|
|
40
|
-
this.get();
|
|
41
|
-
return true;
|
|
42
|
-
}
|
|
43
|
-
catch {
|
|
44
|
-
return false;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=agw.provider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agw.provider.js","sourceRoot":"","sources":["../../src/wallet/agw.provider.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAKpD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,OAAO,iBAAiB;IAIL;IACA;IACA;IALb,MAAM,GAA0D,IAAI,CAAC;IAE7E,YACqB,MAAiB,EACjB,OAAuB,EACvB,MAAe;QAFf,WAAM,GAAN,MAAM,CAAW;QACjB,YAAO,GAAP,OAAO,CAAgB;QACvB,WAAM,GAAN,MAAM,CAAS;IACjC,CAAC;IAEJ,GAAG;QACC,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,aAAa,CAAC,OAAO,EAAE,CAAC;YACrD,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;QACjF,CAAC;QAED,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;QACvC,IAAI,IAAI,CAAC,aAAa,KAAK,IAAI,IAAI,IAAI,CAAC,iBAAiB,KAAK,IAAI,EAAE,CAAC;YACjE,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;QACtF,CAAC;QAED,IAAI,IAAI,CAAC,aAAa,CAAC,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC;YACnD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;YACnB,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