aimeat 2.1.0 → 2.2.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/.env.example +9 -4
- package/dist/locales/en.json +28 -0
- package/dist/locales/fi.json +28 -0
- package/dist/public/cortex-bundled/aimeat-charts.js +158 -10
- package/dist/public/cortex-bundled/aimeat-charts.yaml +1 -1
- package/dist/public/cortex-bundled/aimeat-dag.js +515 -173
- package/dist/public/cortex-bundled/aimeat-dag.yaml +1 -1
- package/dist/public/cortex-bundled/aimeat-i18n.js +6 -1
- package/dist/public/cortex-bundled/aimeat-i18n.yaml +1 -1
- package/dist/public/cortex-bundled/aimeat-surface.js +577 -0
- package/dist/public/cortex-bundled/aimeat-surface.yaml +107 -0
- package/dist/public/cortex-bundled/aimeat-viewport.js +405 -0
- package/dist/public/cortex-bundled/aimeat-viewport.yaml +100 -0
- package/dist/public/css/views/inbox.css +1 -1
- package/dist/public/css/views/profile.css +9 -0
- package/dist/public/lib/VENDORED.md +6 -3
- package/dist/public/lib/aimeat-daisyui-bridge.css +39 -2
- package/dist/public/lib/aimeat-theme.css +538 -0
- package/dist/public/lib/fonts/LICENSE.md +11 -4
- package/dist/public/lib/fonts/fraunces-var-latin-ext.woff2 +0 -0
- package/dist/public/lib/fonts/fraunces-var-latin.woff2 +0 -0
- package/dist/public/lib/fonts/inter-var-latin-ext.woff2 +0 -0
- package/dist/public/lib/fonts/inter-var-latin.woff2 +0 -0
- package/dist/public/lib/fonts/jetbrains-mono-var-latin-ext.woff2 +0 -0
- package/dist/public/lib/fonts/jetbrains-mono-var-latin.woff2 +0 -0
- package/dist/public/lib/fonts/space-grotesk-var-latin-ext.woff2 +0 -0
- package/dist/public/lib/fonts/space-grotesk-var-latin.woff2 +0 -0
- package/dist/public/lib/samples/theme-check.html +92 -0
- package/dist/public/lib/samples/themes-boot.js +20 -0
- package/dist/public/lib/samples/themes.html +154 -0
- package/dist/public/lib/samples/themes.js +60 -0
- package/dist/public/views/profile/access-tab/connected-apps.js +81 -5
- package/dist/public/views/profile/extensions-tab.maturity.js +4 -1
- package/dist/public/views/profile/inbox-tab/components.js +17 -1
- package/dist/public/views/profile/inbox-tab/use-thread-ux.js +29 -2
- package/dist/public/views/profile/libraries-tab.js +10 -2
- package/dist/public/views/profile/wallet-tab.js +64 -0
- package/dist/scripts/check-openapi.d.ts +2 -0
- package/dist/scripts/check-openapi.d.ts.map +1 -0
- package/dist/scripts/check-openapi.js +139 -0
- package/dist/scripts/check-openapi.js.map +1 -0
- package/dist/scripts/embed-viewport.d.ts +23 -0
- package/dist/scripts/embed-viewport.d.ts.map +1 -0
- package/dist/scripts/embed-viewport.js +116 -0
- package/dist/scripts/embed-viewport.js.map +1 -0
- package/dist/src/auth/sse-domain-scopes.d.ts +50 -0
- package/dist/src/auth/sse-domain-scopes.d.ts.map +1 -0
- package/dist/src/auth/sse-domain-scopes.js +111 -0
- package/dist/src/auth/sse-domain-scopes.js.map +1 -0
- package/dist/src/cli/connect/mcp/tools/agent-tasks.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/agent-tasks.js +4 -1
- package/dist/src/cli/connect/mcp/tools/agent-tasks.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/core.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/core.js +14 -3
- package/dist/src/cli/connect/mcp/tools/core.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/workspaces.d.ts +3 -0
- package/dist/src/cli/connect/mcp/tools/workspaces.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/workspaces.js +4 -2
- package/dist/src/cli/connect/mcp/tools/workspaces.js.map +1 -1
- package/dist/src/cli/connect/tool-call-defs-core.d.ts.map +1 -1
- package/dist/src/cli/connect/tool-call-defs-core.js +13 -1
- package/dist/src/cli/connect/tool-call-defs-core.js.map +1 -1
- package/dist/src/commerce/__tests__/x402-registry.test.d.ts +2 -0
- package/dist/src/commerce/__tests__/x402-registry.test.d.ts.map +1 -0
- package/dist/src/commerce/__tests__/x402-registry.test.js +105 -0
- package/dist/src/commerce/__tests__/x402-registry.test.js.map +1 -0
- package/dist/src/commerce/evm-address.d.ts +21 -0
- package/dist/src/commerce/evm-address.d.ts.map +1 -0
- package/dist/src/commerce/evm-address.js +94 -0
- package/dist/src/commerce/evm-address.js.map +1 -0
- package/dist/src/commerce/money.d.ts +18 -5
- package/dist/src/commerce/money.d.ts.map +1 -1
- package/dist/src/commerce/money.js +27 -6
- package/dist/src/commerce/money.js.map +1 -1
- package/dist/src/commerce/x402-facilitator.d.ts +64 -13
- package/dist/src/commerce/x402-facilitator.d.ts.map +1 -1
- package/dist/src/commerce/x402-facilitator.js +71 -19
- package/dist/src/commerce/x402-facilitator.js.map +1 -1
- package/dist/src/commerce/x402-handler.d.ts +13 -7
- package/dist/src/commerce/x402-handler.d.ts.map +1 -1
- package/dist/src/commerce/x402-handler.js +23 -10
- package/dist/src/commerce/x402-handler.js.map +1 -1
- package/dist/src/commerce/x402.d.ts +11 -6
- package/dist/src/commerce/x402.d.ts.map +1 -1
- package/dist/src/commerce/x402.js +10 -7
- package/dist/src/commerce/x402.js.map +1 -1
- package/dist/src/config-types.d.ts +12 -0
- package/dist/src/config-types.d.ts.map +1 -1
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/config.js +8 -0
- package/dist/src/config.js.map +1 -1
- package/dist/src/data/app-templates/shells.d.ts +11 -3
- package/dist/src/data/app-templates/shells.d.ts.map +1 -1
- package/dist/src/data/app-templates/shells.js +87 -6
- package/dist/src/data/app-templates/shells.js.map +1 -1
- package/dist/src/data/app-templates.js +2 -2
- package/dist/src/data/app-templates.js.map +1 -1
- package/dist/src/data/library-packs/cortex.d.ts.map +1 -1
- package/dist/src/data/library-packs/cortex.js +108 -5
- package/dist/src/data/library-packs/cortex.js.map +1 -1
- package/dist/src/data/library-packs/sdk.d.ts.map +1 -1
- package/dist/src/data/library-packs/sdk.js +32 -8
- package/dist/src/data/library-packs/sdk.js.map +1 -1
- package/dist/src/data/library-packs/vendored.d.ts.map +1 -1
- package/dist/src/data/library-packs/vendored.js +83 -6
- package/dist/src/data/library-packs/vendored.js.map +1 -1
- package/dist/src/generated/api-types.d.ts +478 -19
- package/dist/src/generated/api-types.d.ts.map +1 -1
- package/dist/src/mcp/agent-tasks.d.ts +4 -0
- package/dist/src/mcp/agent-tasks.d.ts.map +1 -1
- package/dist/src/mcp/agent-tasks.js +20 -2
- package/dist/src/mcp/agent-tasks.js.map +1 -1
- package/dist/src/mcp/capabilities.d.ts +7 -1
- package/dist/src/mcp/capabilities.d.ts.map +1 -1
- package/dist/src/mcp/capabilities.js +5 -2
- package/dist/src/mcp/capabilities.js.map +1 -1
- package/dist/src/mcp/catalog/definitions/commerce.d.ts.map +1 -1
- package/dist/src/mcp/catalog/definitions/commerce.js +4 -2
- package/dist/src/mcp/catalog/definitions/commerce.js.map +1 -1
- package/dist/src/mcp/catalog/definitions/discovery-work-boards.d.ts.map +1 -1
- package/dist/src/mcp/catalog/definitions/discovery-work-boards.js +4 -3
- package/dist/src/mcp/catalog/definitions/discovery-work-boards.js.map +1 -1
- package/dist/src/mcp/catalog/definitions/organisms-workspaces-apps.js +1 -1
- package/dist/src/mcp/catalog/definitions/organisms-workspaces-apps.js.map +1 -1
- package/dist/src/mcp/catalog/definitions/schedules-tasks-memory.d.ts.map +1 -1
- package/dist/src/mcp/catalog/definitions/schedules-tasks-memory.js +3 -2
- package/dist/src/mcp/catalog/definitions/schedules-tasks-memory.js.map +1 -1
- package/dist/src/mcp/catalog/output-schemas.d.ts +6 -1
- package/dist/src/mcp/catalog/output-schemas.d.ts.map +1 -1
- package/dist/src/mcp/catalog/output-schemas.js +6 -1
- package/dist/src/mcp/catalog/output-schemas.js.map +1 -1
- package/dist/src/mcp/commerce.d.ts.map +1 -1
- package/dist/src/mcp/commerce.js +15 -3
- package/dist/src/mcp/commerce.js.map +1 -1
- package/dist/src/mcp/core-storage.d.ts +23 -0
- package/dist/src/mcp/core-storage.d.ts.map +1 -0
- package/dist/src/mcp/core-storage.js +157 -0
- package/dist/src/mcp/core-storage.js.map +1 -0
- package/dist/src/mcp/core.d.ts +16 -0
- package/dist/src/mcp/core.d.ts.map +1 -1
- package/dist/src/mcp/core.js +75 -119
- package/dist/src/mcp/core.js.map +1 -1
- package/dist/src/mcp/dm-messages.d.ts +4 -0
- package/dist/src/mcp/dm-messages.d.ts.map +1 -1
- package/dist/src/mcp/dm-messages.js +43 -2
- package/dist/src/mcp/dm-messages.js.map +1 -1
- package/dist/src/mcp/exchange.d.ts.map +1 -1
- package/dist/src/mcp/exchange.js +3 -2
- package/dist/src/mcp/exchange.js.map +1 -1
- package/dist/src/mcp/extensions.d.ts.map +1 -1
- package/dist/src/mcp/extensions.js +6 -2
- package/dist/src/mcp/extensions.js.map +1 -1
- package/dist/src/mcp/index.d.ts +5 -0
- package/dist/src/mcp/index.d.ts.map +1 -1
- package/dist/src/mcp/index.js +23 -4
- package/dist/src/mcp/index.js.map +1 -1
- package/dist/src/mcp/memory-namespace-hints.d.ts +33 -0
- package/dist/src/mcp/memory-namespace-hints.d.ts.map +1 -0
- package/dist/src/mcp/memory-namespace-hints.js +60 -0
- package/dist/src/mcp/memory-namespace-hints.js.map +1 -0
- package/dist/src/mcp/workspaces.d.ts +5 -0
- package/dist/src/mcp/workspaces.d.ts.map +1 -1
- package/dist/src/mcp/workspaces.js +5 -3
- package/dist/src/mcp/workspaces.js.map +1 -1
- package/dist/src/models/agent-task-schemas.d.ts +25 -3
- package/dist/src/models/agent-task-schemas.d.ts.map +1 -1
- package/dist/src/models/agent-task-schemas.js +16 -0
- package/dist/src/models/agent-task-schemas.js.map +1 -1
- package/dist/src/models/app-tool-schemas.d.ts +518 -1
- package/dist/src/models/app-tool-schemas.d.ts.map +1 -1
- package/dist/src/models/app-tool-schemas.js +53 -1
- package/dist/src/models/app-tool-schemas.js.map +1 -1
- package/dist/src/models/odps-schemas.d.ts +305 -0
- package/dist/src/models/odps-schemas.d.ts.map +1 -0
- package/dist/src/models/odps-schemas.js +182 -0
- package/dist/src/models/odps-schemas.js.map +1 -0
- package/dist/src/models/offer-schemas.d.ts +357 -2
- package/dist/src/models/offer-schemas.d.ts.map +1 -1
- package/dist/src/models/offer-schemas.js +37 -0
- package/dist/src/models/offer-schemas.js.map +1 -1
- package/dist/src/models/schemas.d.ts +6 -3
- package/dist/src/models/schemas.d.ts.map +1 -1
- package/dist/src/models/schemas.js +10 -1
- package/dist/src/models/schemas.js.map +1 -1
- package/dist/src/models/webhook-schemas.d.ts +8 -8
- package/dist/src/routes/agent-tasks/create-read.d.ts +4 -0
- package/dist/src/routes/agent-tasks/create-read.d.ts.map +1 -1
- package/dist/src/routes/agent-tasks/create-read.js +20 -1
- package/dist/src/routes/agent-tasks/create-read.js.map +1 -1
- package/dist/src/routes/agent-tasks/lifecycle.d.ts.map +1 -1
- package/dist/src/routes/agent-tasks/lifecycle.js +10 -0
- package/dist/src/routes/agent-tasks/lifecycle.js.map +1 -1
- package/dist/src/routes/agents/offers.d.ts +2 -0
- package/dist/src/routes/agents/offers.d.ts.map +1 -1
- package/dist/src/routes/agents/offers.js +0 -0
- package/dist/src/routes/agents/offers.js.map +1 -1
- package/dist/src/routes/app-grants.d.ts +6 -0
- package/dist/src/routes/app-grants.d.ts.map +1 -1
- package/dist/src/routes/app-grants.js +55 -25
- package/dist/src/routes/app-grants.js.map +1 -1
- package/dist/src/routes/apps/drafts.d.ts +3 -0
- package/dist/src/routes/apps/drafts.d.ts.map +1 -1
- package/dist/src/routes/apps/drafts.js +63 -1
- package/dist/src/routes/apps/drafts.js.map +1 -1
- package/dist/src/routes/apps/publish.d.ts +2 -0
- package/dist/src/routes/apps/publish.d.ts.map +1 -1
- package/dist/src/routes/apps/publish.js +17 -2
- package/dist/src/routes/apps/publish.js.map +1 -1
- package/dist/src/routes/commerce.d.ts.map +1 -1
- package/dist/src/routes/commerce.js +122 -2
- package/dist/src/routes/commerce.js.map +1 -1
- package/dist/src/routes/exchange-market.d.ts +6 -2
- package/dist/src/routes/exchange-market.d.ts.map +1 -1
- package/dist/src/routes/exchange-market.js +154 -28
- package/dist/src/routes/exchange-market.js.map +1 -1
- package/dist/src/routes/exchange.d.ts.map +1 -1
- package/dist/src/routes/exchange.js +5 -2
- package/dist/src/routes/exchange.js.map +1 -1
- package/dist/src/routes/extensions/actions.d.ts.map +1 -1
- package/dist/src/routes/extensions/actions.js +18 -0
- package/dist/src/routes/extensions/actions.js.map +1 -1
- package/dist/src/routes/extensions/crud.d.ts.map +1 -1
- package/dist/src/routes/extensions/crud.js +36 -3
- package/dist/src/routes/extensions/crud.js.map +1 -1
- package/dist/src/routes/extensions/entitlement-gate.d.ts.map +1 -1
- package/dist/src/routes/extensions/entitlement-gate.js +13 -0
- package/dist/src/routes/extensions/entitlement-gate.js.map +1 -1
- package/dist/src/routes/extensions/manifest.d.ts +6 -0
- package/dist/src/routes/extensions/manifest.d.ts.map +1 -1
- package/dist/src/routes/extensions/manifest.js +68 -1
- package/dist/src/routes/extensions/manifest.js.map +1 -1
- package/dist/src/routes/extensions/pacing.d.ts +31 -0
- package/dist/src/routes/extensions/pacing.d.ts.map +1 -0
- package/dist/src/routes/extensions/pacing.js +73 -0
- package/dist/src/routes/extensions/pacing.js.map +1 -0
- package/dist/src/routes/extensions/paywall.d.ts.map +1 -1
- package/dist/src/routes/extensions/paywall.js +17 -17
- package/dist/src/routes/extensions/paywall.js.map +1 -1
- package/dist/src/routes/memory/crud.d.ts.map +1 -1
- package/dist/src/routes/memory/crud.js +10 -0
- package/dist/src/routes/memory/crud.js.map +1 -1
- package/dist/src/routes/organisms/crud.d.ts +3 -0
- package/dist/src/routes/organisms/crud.d.ts.map +1 -1
- package/dist/src/routes/organisms/crud.js +5 -2
- package/dist/src/routes/organisms/crud.js.map +1 -1
- package/dist/src/routes/organisms/workspace-read.d.ts.map +1 -1
- package/dist/src/routes/organisms/workspace-read.js +7 -2
- package/dist/src/routes/organisms/workspace-read.js.map +1 -1
- package/dist/src/routes/public-stats.d.ts +7 -0
- package/dist/src/routes/public-stats.d.ts.map +1 -1
- package/dist/src/routes/public-stats.js +28 -7
- package/dist/src/routes/public-stats.js.map +1 -1
- package/dist/src/routes/sse.d.ts +7 -0
- package/dist/src/routes/sse.d.ts.map +1 -1
- package/dist/src/routes/sse.js +36 -6
- package/dist/src/routes/sse.js.map +1 -1
- package/dist/src/routes/storage-files.d.ts +11 -0
- package/dist/src/routes/storage-files.d.ts.map +1 -1
- package/dist/src/routes/storage-files.js +58 -51
- package/dist/src/routes/storage-files.js.map +1 -1
- package/dist/src/routes/subdomains.d.ts +4 -0
- package/dist/src/routes/subdomains.d.ts.map +1 -1
- package/dist/src/routes/subdomains.js +42 -5
- package/dist/src/routes/subdomains.js.map +1 -1
- package/dist/src/routes/upload.d.ts +11 -0
- package/dist/src/routes/upload.d.ts.map +1 -1
- package/dist/src/routes/upload.js +108 -28
- package/dist/src/routes/upload.js.map +1 -1
- package/dist/src/routes/webmcp.d.ts.map +1 -1
- package/dist/src/routes/webmcp.js +4 -0
- package/dist/src/routes/webmcp.js.map +1 -1
- package/dist/src/schemas/knowledge-package.d.ts +1 -1
- package/dist/src/server-bootstrap/static-files.d.ts +4 -0
- package/dist/src/server-bootstrap/static-files.d.ts.map +1 -1
- package/dist/src/server-bootstrap/static-files.js +11 -0
- package/dist/src/server-bootstrap/static-files.js.map +1 -1
- package/dist/src/services/build-app-prompt.d.ts +19 -0
- package/dist/src/services/build-app-prompt.d.ts.map +1 -1
- package/dist/src/services/build-app-prompt.js +97 -11
- package/dist/src/services/build-app-prompt.js.map +1 -1
- package/dist/src/services/call-timing.d.ts +51 -0
- package/dist/src/services/call-timing.d.ts.map +1 -0
- package/dist/src/services/call-timing.js +91 -0
- package/dist/src/services/call-timing.js.map +1 -0
- package/dist/src/services/capability-invoke.d.ts +2 -0
- package/dist/src/services/capability-invoke.d.ts.map +1 -1
- package/dist/src/services/capability-invoke.js +10 -0
- package/dist/src/services/capability-invoke.js.map +1 -1
- package/dist/src/services/config-schema.d.ts.map +1 -1
- package/dist/src/services/config-schema.js +6 -0
- package/dist/src/services/config-schema.js.map +1 -1
- package/dist/src/services/draft-token.d.ts +22 -2
- package/dist/src/services/draft-token.d.ts.map +1 -1
- package/dist/src/services/draft-token.js +52 -3
- package/dist/src/services/draft-token.js.map +1 -1
- package/dist/src/services/exchange-market.d.ts +41 -8
- package/dist/src/services/exchange-market.d.ts.map +1 -1
- package/dist/src/services/exchange-market.js +24 -2
- package/dist/src/services/exchange-market.js.map +1 -1
- package/dist/src/services/exchange-odps.d.ts +58 -0
- package/dist/src/services/exchange-odps.d.ts.map +1 -0
- package/dist/src/services/exchange-odps.js +400 -0
- package/dist/src/services/exchange-odps.js.map +1 -0
- package/dist/src/services/exchange-projection.d.ts +61 -0
- package/dist/src/services/exchange-projection.d.ts.map +1 -0
- package/dist/src/services/exchange-projection.js +504 -0
- package/dist/src/services/exchange-projection.js.map +1 -0
- package/dist/src/services/exchange-proposals.d.ts.map +1 -1
- package/dist/src/services/exchange-proposals.js +2 -0
- package/dist/src/services/exchange-proposals.js.map +1 -1
- package/dist/src/services/extension-files.d.ts +64 -0
- package/dist/src/services/extension-files.d.ts.map +1 -0
- package/dist/src/services/extension-files.js +88 -0
- package/dist/src/services/extension-files.js.map +1 -0
- package/dist/src/services/extension-runtime.d.ts +33 -0
- package/dist/src/services/extension-runtime.d.ts.map +1 -1
- package/dist/src/services/extension-runtime.js +52 -0
- package/dist/src/services/extension-runtime.js.map +1 -1
- package/dist/src/services/file-refs.d.ts +105 -0
- package/dist/src/services/file-refs.d.ts.map +1 -0
- package/dist/src/services/file-refs.js +106 -0
- package/dist/src/services/file-refs.js.map +1 -0
- package/dist/src/services/metered-entitlements.d.ts +7 -0
- package/dist/src/services/metered-entitlements.d.ts.map +1 -1
- package/dist/src/services/metered-entitlements.js +4 -0
- package/dist/src/services/metered-entitlements.js.map +1 -1
- package/dist/src/services/owner-memory.d.ts +14 -1
- package/dist/src/services/owner-memory.d.ts.map +1 -1
- package/dist/src/services/owner-memory.js +8 -14
- package/dist/src/services/owner-memory.js.map +1 -1
- package/dist/src/services/task-files.d.ts +51 -0
- package/dist/src/services/task-files.d.ts.map +1 -0
- package/dist/src/services/task-files.js +58 -0
- package/dist/src/services/task-files.js.map +1 -0
- package/dist/src/services/upload-token.d.ts +29 -0
- package/dist/src/services/upload-token.d.ts.map +1 -1
- package/dist/src/services/upload-token.js +37 -0
- package/dist/src/services/upload-token.js.map +1 -1
- package/dist/src/services/upload-zip.d.ts +2 -0
- package/dist/src/services/upload-zip.d.ts.map +1 -1
- package/dist/src/services/upload-zip.js +5 -1
- package/dist/src/services/upload-zip.js.map +1 -1
- package/dist/src/services/workspace-meta.d.ts +15 -0
- package/dist/src/services/workspace-meta.d.ts.map +1 -1
- package/dist/src/services/workspace-meta.js +17 -0
- package/dist/src/services/workspace-meta.js.map +1 -1
- package/dist/src/services/workspace-provision.d.ts +3 -0
- package/dist/src/services/workspace-provision.d.ts.map +1 -1
- package/dist/src/services/workspace-provision.js +5 -3
- package/dist/src/services/workspace-provision.js.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/app-grants.d.ts +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/app-grants.d.ts.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/app-grants.js +10 -0
- package/dist/src/storage/providers/postgres-kysely/methods/app-grants.js.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/memory.d.ts +2 -0
- package/dist/src/storage/providers/postgres-kysely/methods/memory.d.ts.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/memory.js +12 -1
- package/dist/src/storage/providers/postgres-kysely/methods/memory.js.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/organisms.d.ts.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/organisms.js +5 -1
- package/dist/src/storage/providers/postgres-kysely/methods/organisms.js.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/migrations/0012_unique_live_app_grant.sql +29 -0
- package/dist/src/storage/providers/sqlite/methods/apps.d.ts +3 -0
- package/dist/src/storage/providers/sqlite/methods/apps.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/apps.js +7 -0
- package/dist/src/storage/providers/sqlite/methods/apps.js.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/governance.d.ts +1 -0
- package/dist/src/storage/providers/sqlite/methods/governance.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/governance.js +4 -1
- package/dist/src/storage/providers/sqlite/methods/governance.js.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/owner.d.ts +5 -0
- package/dist/src/storage/providers/sqlite/methods/owner.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/owner.js +8 -0
- package/dist/src/storage/providers/sqlite/methods/owner.js.map +1 -1
- package/dist/src/storage/providers/sqlite/schema.d.ts +3 -0
- package/dist/src/storage/providers/sqlite/schema.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/schema.js +20 -0
- package/dist/src/storage/providers/sqlite/schema.js.map +1 -1
- package/dist/src/storage/repositories/app-grant.repository.d.ts +9 -1
- package/dist/src/storage/repositories/app-grant.repository.d.ts.map +1 -1
- package/dist/src/storage/repositories/memory.repository.d.ts +14 -0
- package/dist/src/storage/repositories/memory.repository.d.ts.map +1 -1
- package/dist/src/storage/repositories-impl/memory-repository.d.ts +8 -1
- package/dist/src/storage/repositories-impl/memory-repository.d.ts.map +1 -1
- package/dist/src/storage/repositories-impl/memory-repository.js +15 -4
- package/dist/src/storage/repositories-impl/memory-repository.js.map +1 -1
- package/dist/src/storage/types/agents-messaging.d.ts +19 -0
- package/dist/src/storage/types/agents-messaging.d.ts.map +1 -1
- package/dist/src/storage/types/agents-messaging.js.map +1 -1
- package/dist/src/storage/types/organisms-federation.d.ts +29 -0
- package/dist/src/storage/types/organisms-federation.d.ts.map +1 -1
- package/dist/src/utils/app-badge.d.ts.map +1 -1
- package/dist/src/utils/app-badge.js +7 -3
- package/dist/src/utils/app-badge.js.map +1 -1
- package/dist/static/app-catalog/_template.html +6 -5
- package/dist/static/app-catalog/js/cortex.js +3 -1
- package/dist/static/app-catalog/js/detail.js +411 -36
- package/dist/static/app-catalog/js/i18n-data.js +279 -3
- package/dist/static/app-catalog/js/main.js +28 -37
- package/dist/static/app-catalog/js/monetize.js +204 -16
- package/dist/static/app-catalog/js/odps.js +489 -0
- package/dist/static/app-catalog/js/render.js +3 -0
- package/dist/static/app-catalog/js/workcopy.js +198 -0
- package/dist/static/app-catalog/styles/app-catalog.css +60 -0
- package/dist/static/app-catalog.html +1450 -137
- package/dist/static/sdk-libs/agents/index.js +45 -7
- package/dist/static/sdk-libs/auth/cluster.js +97 -0
- package/dist/static/sdk-libs/auth/index.js +25 -1
- package/dist/static/sdk-libs/auth/locale.js +151 -0
- package/dist/static/sdk-libs/auth/modal.js +11 -2
- package/dist/static/sdk-libs/auth/palette.js +172 -0
- package/dist/static/sdk-libs/auth/pill.js +37 -6
- package/dist/static/sdk-libs/auth/theme.js +61 -20
- package/dist/static/sdk-libs/data/index.js +70 -8
- package/dist/static/sdk-libs/dist/aimeat-agents.js +41 -8
- package/dist/static/sdk-libs/dist/aimeat-auth.js +422 -21
- package/dist/static/sdk-libs/dist/aimeat-data.js +50 -8
- package/dist/static/sdk-libs/dist/aimeat-live.js +54 -2
- package/dist/static/sdk-libs/dist/aimeat-markdown.js +32 -1
- package/dist/static/sdk-libs/live/index.js +71 -4
- package/dist/static/sdk-libs/markdown/index.js +49 -1
- package/package.json +6 -2
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file src/commerce/evm-address.ts
|
|
3
|
+
* @description Guards for the ONE value a seller types by hand in the whole stablecoin flow: the
|
|
4
|
+
* address their USDC settles to. Getting it wrong is not a validation nicety — an EIP-3009 transfer
|
|
5
|
+
* to the wrong target is irreversible, and the two ways to get it wrong are both easy:
|
|
6
|
+
*
|
|
7
|
+
* 1. A TYPO. 40 hex characters carry no meaning a human can proof-read. EIP-55 encodes a checksum
|
|
8
|
+
* in the CAPITALISATION of the hex, so a mixed-case address that fails the checksum is almost
|
|
9
|
+
* certainly mistyped or truncated. (An all-lowercase or all-uppercase address carries no
|
|
10
|
+
* checksum at all, so it is accepted and normalised rather than rejected.)
|
|
11
|
+
* 2. PASTING THE TOKEN CONTRACT instead of a wallet. The USDC/EURC contract addresses are the
|
|
12
|
+
* values a seller most plausibly has on their clipboard while setting this up — they appear in
|
|
13
|
+
* every x402 doc, and in our own network registry. Funds sent there are gone.
|
|
14
|
+
*
|
|
15
|
+
* The optional on-chain probe answers the remaining question — is this a contract or an account the
|
|
16
|
+
* seller can hold a key for — but only when the operator configured an RPC. It is best-effort by
|
|
17
|
+
* design: a save must not depend on a third party being reachable, so an unreachable RPC lets the
|
|
18
|
+
* save through while a definite "this is a contract" answer blocks it.
|
|
19
|
+
* @structure isEvmAddressShape · toChecksumAddress · checksumIsWrong · settlementAssetMatch ·
|
|
20
|
+
* probeIsContract
|
|
21
|
+
* @usage
|
|
22
|
+
* const bad = settlementAssetMatch(addr); // → { network, currency } when it is a token
|
|
23
|
+
* if (checksumIsWrong(addr)) return 400;
|
|
24
|
+
* const stored = toChecksumAddress(addr);
|
|
25
|
+
* @version-history
|
|
26
|
+
* v1.0.0 — 2026-07-25 — Initial guards after a real misconfiguration: the USDC Base-Sepolia contract
|
|
27
|
+
* address was saved as a payout address, and the shape-only check accepted it silently.
|
|
28
|
+
*/
|
|
29
|
+
import { keccak_256 } from '@noble/hashes/sha3.js';
|
|
30
|
+
import { X402_NETWORKS } from './x402-facilitator.js';
|
|
31
|
+
import { safeFetch } from '../utils/url-validator.js';
|
|
32
|
+
import { logger } from '../utils/logger.js';
|
|
33
|
+
/** 0x + 40 hex characters. Shape only — says nothing about whether the address means anything. */
|
|
34
|
+
export function isEvmAddressShape(value) {
|
|
35
|
+
return /^0x[a-fA-F0-9]{40}$/.test(value);
|
|
36
|
+
}
|
|
37
|
+
/** The EIP-55 mixed-case form: capitalisation derived from keccak-256 of the lowercase hex body. */
|
|
38
|
+
export function toChecksumAddress(value) {
|
|
39
|
+
const body = value.slice(2).toLowerCase();
|
|
40
|
+
const hash = Buffer.from(keccak_256(new TextEncoder().encode(body))).toString('hex');
|
|
41
|
+
let out = '0x';
|
|
42
|
+
for (let i = 0; i < body.length; i++) {
|
|
43
|
+
out += parseInt(hash[i], 16) >= 8 ? body[i].toUpperCase() : body[i];
|
|
44
|
+
}
|
|
45
|
+
return out;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* True when the input carries a checksum (it is mixed case) and that checksum does not match.
|
|
49
|
+
* All-lowercase / all-uppercase input carries no checksum, so it is not "wrong" — just unverifiable.
|
|
50
|
+
*/
|
|
51
|
+
export function checksumIsWrong(value) {
|
|
52
|
+
const body = value.slice(2);
|
|
53
|
+
const mixedCase = body !== body.toLowerCase() && body !== body.toUpperCase();
|
|
54
|
+
return mixedCase && toChecksumAddress(value) !== value;
|
|
55
|
+
}
|
|
56
|
+
/** The settlement token this address IS, when it is one of ours. A payout address must never be a token. */
|
|
57
|
+
export function settlementAssetMatch(value) {
|
|
58
|
+
const needle = value.toLowerCase();
|
|
59
|
+
for (const [networkId, network] of Object.entries(X402_NETWORKS)) {
|
|
60
|
+
for (const [currency, asset] of Object.entries(network.assets)) {
|
|
61
|
+
if (asset && asset.address.toLowerCase() === needle)
|
|
62
|
+
return { network: networkId, currency };
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Ask the chain whether the address holds contract code. `true` = definitely a contract (block the
|
|
69
|
+
* save), `false` = an externally-owned account, `null` = could not tell, which must never block:
|
|
70
|
+
* an RPC outage is not a reason to stop a seller configuring their own payouts.
|
|
71
|
+
*/
|
|
72
|
+
export async function probeIsContract(rpcUrl, address) {
|
|
73
|
+
if (!rpcUrl)
|
|
74
|
+
return null;
|
|
75
|
+
try {
|
|
76
|
+
const res = await safeFetch(rpcUrl, {
|
|
77
|
+
method: 'POST',
|
|
78
|
+
headers: { 'Content-Type': 'application/json', Accept: 'application/json' },
|
|
79
|
+
body: JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'eth_getCode', params: [address, 'latest'] }),
|
|
80
|
+
signal: AbortSignal.timeout(6000),
|
|
81
|
+
});
|
|
82
|
+
if (!res.ok)
|
|
83
|
+
return null;
|
|
84
|
+
const body = await res.json();
|
|
85
|
+
if (typeof body.result !== 'string')
|
|
86
|
+
return null;
|
|
87
|
+
return body.result !== '0x' && body.result !== '0x0';
|
|
88
|
+
}
|
|
89
|
+
catch (err) {
|
|
90
|
+
logger.warn('[payout] on-chain address probe unavailable; saving without it', { error: String(err) });
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=evm-address.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evm-address.js","sourceRoot":"","sources":["../../../src/commerce/evm-address.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,kGAAkG;AAClG,MAAM,UAAU,iBAAiB,CAAC,KAAa;IAC7C,OAAO,qBAAqB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC3C,CAAC;AAED,oGAAoG;AACpG,MAAM,UAAU,iBAAiB,CAAC,KAAa;IAC7C,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IAC1C,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CA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C;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,MAAc,EAAE,OAAe;IACnE,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IACzB,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,SAAS,CAAC,MAAM,EAAE;YAClC,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,EAAE,kBAAkB,EAAE;YAC3E,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,CAAC;YACnG,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC;SAClC,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,CAAC,EAAE;YAAE,OAAO,IAAI,CAAC;QACzB,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,EAA0B,CAAC;QACtD,IAAI,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ;YAAE,OAAO,IAAI,CAAC;QACjD,OAAO,IAAI,CAAC,MAAM,KAAK,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC;IACvD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,CAAC,IAAI,CAAC,gEAAgE,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACtG,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -12,14 +12,16 @@
|
|
|
12
12
|
* ROUNDING POLICY for both ledgers (fee always ceils, cut always floors) — they operate on one
|
|
13
13
|
* integer amount of either unit at a time, which is policy sharing, not unit mixing.
|
|
14
14
|
* @structure MONEY_SCALE · MONEY_UNIT · MONEY_CURRENCIES · isMoneyCurrency ·
|
|
15
|
-
* isSupportedMoneyCurrency · microsToStripeMinor · stripeMinorToMicros ·
|
|
16
|
-
* usdcRawToMicros · integerMicros · percentFee · percentCut ·
|
|
17
|
-
* formatMoneyMajor
|
|
15
|
+
* isSupportedMoneyCurrency · microsToStripeMinor · stripeMinorToMicros · microsToTokenRaw ·
|
|
16
|
+
* microsToUsdcRaw · usdcRawToMicros · integerMicros · percentFee · percentCut ·
|
|
17
|
+
* roundToMoneyScale · formatMoneyMajor
|
|
18
18
|
* @usage
|
|
19
19
|
* import { isMoneyCurrency, microsToStripeMinor, percentFee } from './money.js';
|
|
20
20
|
* if (isMoneyCurrency(session.currency)) stripeAmount = microsToStripeMinor(micros); // → cents
|
|
21
21
|
* const fee = percentFee(gross, commerceFeePercent(config));
|
|
22
22
|
* @version-history
|
|
23
|
+
* v1.2.0 — 2026-07-25 — microsToTokenRaw: decimals-aware micros → token atomic units, so a second
|
|
24
|
+
* settlement asset (EURC) crosses the chokepoint on its own precision (TARGET-042)
|
|
23
25
|
* v1.1.0 — 2026-07-14 — Chokepoint completion: currency allowlist, Stripe-minor + USDC-raw
|
|
24
26
|
* round-trips, percent fee/cut rounding policy, major-unit scale rounding (TARGET-033 phase 7c)
|
|
25
27
|
* v1.0.0 — 2026-07-14 — Initial 6-decimal micro-unit money representation (TARGET-033 phase 7b)
|
|
@@ -45,8 +47,19 @@ export declare function microsToStripeMinor(micros: number): number;
|
|
|
45
47
|
/** Convert a Stripe minor-unit (cent) amount back to micro-units. Exact for integer cents. */
|
|
46
48
|
export declare function stripeMinorToMicros(minor: number): number;
|
|
47
49
|
/**
|
|
48
|
-
* Convert micro-units to
|
|
49
|
-
*
|
|
50
|
+
* Convert micro-units to a settlement token's ATOMIC units, honouring that token's own decimals
|
|
51
|
+
* (the x402 stablecoin rail). Returns a decimal STRING because an 18-decimal token overflows the
|
|
52
|
+
* safe-integer range — x402 carries `maxAmountRequired` as a string for exactly this reason.
|
|
53
|
+
*
|
|
54
|
+
* Every asset AIMEAT settles today (USDC and EURC, on both Base networks) carries 6 decimals, so
|
|
55
|
+
* this is the identity in practice; the branches exist so a token with a different precision is
|
|
56
|
+
* CONVERTED rather than mispriced by orders of magnitude. Scaling DOWN (a sub-6-decimal token)
|
|
57
|
+
* rounds up, the only direction that never hands the seller less than the price.
|
|
58
|
+
*/
|
|
59
|
+
export declare function microsToTokenRaw(micros: number, decimals: number): string;
|
|
60
|
+
/**
|
|
61
|
+
* Convert micro-units to USDC raw units (the 6-decimal special case of {@link microsToTokenRaw}).
|
|
62
|
+
* The conversion is the identity on integers — the function exists so the settlement rail still
|
|
50
63
|
* crosses the chokepoint (and keeps working if MONEY_SCALE ever diverges from the rail's).
|
|
51
64
|
*/
|
|
52
65
|
export declare function microsToUsdcRaw(micros: number): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"money.d.ts","sourceRoot":"","sources":["../../../src/commerce/money.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"money.d.ts","sourceRoot":"","sources":["../../../src/commerce/money.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,8DAA8D;AAC9D,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,0DAA0D;AAC1D,eAAO,MAAM,UAAU,UAAY,CAAC;AAEpC,8FAA8F;AAC9F,eAAO,MAAM,gBAAgB,yBAA0B,CAAC;AACxD,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9D,yFAAyF;AACzF,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEzD;AAED,oGAAoG;AACpG,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,aAAa,CAE5E;AAKD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,8FAA8F;AAC9F,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAMzE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,qFAAqF;AACrF,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAElE;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAElE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAIvD"}
|
|
@@ -12,14 +12,16 @@
|
|
|
12
12
|
* ROUNDING POLICY for both ledgers (fee always ceils, cut always floors) — they operate on one
|
|
13
13
|
* integer amount of either unit at a time, which is policy sharing, not unit mixing.
|
|
14
14
|
* @structure MONEY_SCALE · MONEY_UNIT · MONEY_CURRENCIES · isMoneyCurrency ·
|
|
15
|
-
* isSupportedMoneyCurrency · microsToStripeMinor · stripeMinorToMicros ·
|
|
16
|
-
* usdcRawToMicros · integerMicros · percentFee · percentCut ·
|
|
17
|
-
* formatMoneyMajor
|
|
15
|
+
* isSupportedMoneyCurrency · microsToStripeMinor · stripeMinorToMicros · microsToTokenRaw ·
|
|
16
|
+
* microsToUsdcRaw · usdcRawToMicros · integerMicros · percentFee · percentCut ·
|
|
17
|
+
* roundToMoneyScale · formatMoneyMajor
|
|
18
18
|
* @usage
|
|
19
19
|
* import { isMoneyCurrency, microsToStripeMinor, percentFee } from './money.js';
|
|
20
20
|
* if (isMoneyCurrency(session.currency)) stripeAmount = microsToStripeMinor(micros); // → cents
|
|
21
21
|
* const fee = percentFee(gross, commerceFeePercent(config));
|
|
22
22
|
* @version-history
|
|
23
|
+
* v1.2.0 — 2026-07-25 — microsToTokenRaw: decimals-aware micros → token atomic units, so a second
|
|
24
|
+
* settlement asset (EURC) crosses the chokepoint on its own precision (TARGET-042)
|
|
23
25
|
* v1.1.0 — 2026-07-14 — Chokepoint completion: currency allowlist, Stripe-minor + USDC-raw
|
|
24
26
|
* round-trips, percent fee/cut rounding policy, major-unit scale rounding (TARGET-033 phase 7c)
|
|
25
27
|
* v1.0.0 — 2026-07-14 — Initial 6-decimal micro-unit money representation (TARGET-033 phase 7b)
|
|
@@ -54,12 +56,31 @@ export function stripeMinorToMicros(minor) {
|
|
|
54
56
|
return minor * MICROS_PER_STRIPE_MINOR;
|
|
55
57
|
}
|
|
56
58
|
/**
|
|
57
|
-
* Convert micro-units to
|
|
58
|
-
*
|
|
59
|
+
* Convert micro-units to a settlement token's ATOMIC units, honouring that token's own decimals
|
|
60
|
+
* (the x402 stablecoin rail). Returns a decimal STRING because an 18-decimal token overflows the
|
|
61
|
+
* safe-integer range — x402 carries `maxAmountRequired` as a string for exactly this reason.
|
|
62
|
+
*
|
|
63
|
+
* Every asset AIMEAT settles today (USDC and EURC, on both Base networks) carries 6 decimals, so
|
|
64
|
+
* this is the identity in practice; the branches exist so a token with a different precision is
|
|
65
|
+
* CONVERTED rather than mispriced by orders of magnitude. Scaling DOWN (a sub-6-decimal token)
|
|
66
|
+
* rounds up, the only direction that never hands the seller less than the price.
|
|
67
|
+
*/
|
|
68
|
+
export function microsToTokenRaw(micros, decimals) {
|
|
69
|
+
const amount = BigInt(Math.trunc(micros));
|
|
70
|
+
if (decimals === MONEY_SCALE)
|
|
71
|
+
return amount.toString();
|
|
72
|
+
if (decimals > MONEY_SCALE)
|
|
73
|
+
return (amount * 10n ** BigInt(decimals - MONEY_SCALE)).toString();
|
|
74
|
+
const divisor = 10n ** BigInt(MONEY_SCALE - decimals);
|
|
75
|
+
return ((amount + divisor - 1n) / divisor).toString(); // ceil — never under-charge the buyer
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Convert micro-units to USDC raw units (the 6-decimal special case of {@link microsToTokenRaw}).
|
|
79
|
+
* The conversion is the identity on integers — the function exists so the settlement rail still
|
|
59
80
|
* crosses the chokepoint (and keeps working if MONEY_SCALE ever diverges from the rail's).
|
|
60
81
|
*/
|
|
61
82
|
export function microsToUsdcRaw(micros) {
|
|
62
|
-
return
|
|
83
|
+
return Number(microsToTokenRaw(micros, MONEY_SCALE));
|
|
63
84
|
}
|
|
64
85
|
/** Convert USDC raw units (6 decimals) back to micro-units. Identity on integers. */
|
|
65
86
|
export function usdcRawToMicros(raw) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"money.js","sourceRoot":"","sources":["../../../src/commerce/money.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"money.js","sourceRoot":"","sources":["../../../src/commerce/money.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,8DAA8D;AAC9D,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC;AAC7B,0DAA0D;AAC1D,MAAM,CAAC,MAAM,UAAU,GAAG,SAAS,CAAC;AAEpC,8FAA8F;AAC9F,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,KAAK,CAAU,CAAC;AAGxD,yFAAyF;AACzF,MAAM,UAAU,eAAe,CAAC,QAAgB;IAC9C,OAAO,QAAQ,KAAK,QAAQ,CAAC;AAC/B,CAAC;AAED,oGAAoG;AACpG,MAAM,UAAU,wBAAwB,CAAC,IAAY;IACnD,OAA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AU,aAAa,CAAC,KAAa;IACzC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC3B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,MAAc,EAAE,OAAe;IACxD,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,OAAO,GAAG,GAAG,CAAC,CAAC;AAC3C,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,MAAc,EAAE,OAAe;IACxD,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,OAAO,GAAG,GAAG,CAAC,CAAC;AAC5C,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAa;IAC7C,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,UAAU,CAAC,GAAG,UAAU,CAAC;AACrD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAc;IAC7C,MAAM,CAAC,GAAG,CAAC,MAAM,GAAG,UAAU,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IACrD,sDAAsD;IACtD,OAAO,CAAC,CAAC,OAAO,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -1,27 +1,72 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { type MoneyCurrency } from './money.js';
|
|
2
|
+
/** One settlement token: the contract, its precision, and the EIP-712 domain the buyer signs against. */
|
|
3
|
+
export interface X402Asset {
|
|
4
|
+
/** The token contract address on the owning network. */
|
|
5
|
+
address: string;
|
|
6
|
+
/** Ticker, for human-facing surfaces (payout settings, tracking codes) — never for identity. */
|
|
7
|
+
symbol: string;
|
|
8
|
+
/**
|
|
9
|
+
* Decimals the token carries onchain. Drives the micros → atomic-unit conversion, so a token that
|
|
10
|
+
* is NOT 6-decimal converts correctly instead of silently mispricing by orders of magnitude.
|
|
11
|
+
*/
|
|
12
|
+
decimals: number;
|
|
13
|
+
/**
|
|
14
|
+
* The token's EIP-712 domain (name + version) — the exact scheme `extra`. The buyer signs
|
|
15
|
+
* TransferWithAuthorization against it, so a wrong value invalidates every signature. Each entry
|
|
16
|
+
* below is verified against the live contract (see the registry comment).
|
|
17
|
+
*/
|
|
8
18
|
extra: {
|
|
9
19
|
name: string;
|
|
10
20
|
version: string;
|
|
11
21
|
};
|
|
12
22
|
}
|
|
23
|
+
/** One network the x402 handler can settle on: the chain id x402 uses + its settlement assets. */
|
|
24
|
+
export interface X402Network {
|
|
25
|
+
/** x402 `network` id echoed in the accepts[] exact scheme and the X-PAYMENT payload. */
|
|
26
|
+
id: string;
|
|
27
|
+
/**
|
|
28
|
+
* One settlement asset per MONEY currency (model 2: the fiat price picks its stablecoin
|
|
29
|
+
* instrument). A (network, currency) pair with no asset is ABSENT from this map, never an empty
|
|
30
|
+
* entry — that absence is exactly what stops the currency being advertised as settleable.
|
|
31
|
+
*/
|
|
32
|
+
assets: Partial<Record<MoneyCurrency, X402Asset>>;
|
|
33
|
+
}
|
|
13
34
|
/**
|
|
14
35
|
* The network registry — the ONE place a chain/asset is defined. Adding Base mainnet, Solana, or
|
|
15
36
|
* another network is a new entry here, never a change to the handler or the commerce core
|
|
16
|
-
* (TARGET-042: network is a parameter, selected by config.x402Network).
|
|
37
|
+
* (TARGET-042: network is a parameter, selected by config.x402Network). A currency joins a network
|
|
38
|
+
* by gaining an entry in `assets` — that is the whole of "AIMEAT can settle EUR here".
|
|
39
|
+
*
|
|
40
|
+
* VERIFICATION (2026-07-25). Addresses from Circle's own documentation
|
|
41
|
+
* (https://developers.circle.com/stablecoins/usdc-contract-addresses and
|
|
42
|
+
* .../eurc-contract-addresses); `symbol`, `decimals` and the EIP-712 domain (`extra`) were then read
|
|
43
|
+
* from the live contracts and PROVEN by recomputing each contract's own DOMAIN_SEPARATOR from
|
|
44
|
+
* (name, version, chainId, address) — all four match. Note the domain `name` is the ERC-20 `name()`,
|
|
45
|
+
* which is NOT uniform: Base mainnet USDC is "USD Coin" while every other entry equals its ticker.
|
|
46
|
+
* The public x402.org facilitator was probed with a real EIP-3009 signature over each asset: EURC
|
|
47
|
+
* verifies identically to USDC (both reaching `invalid_exact_evm_insufficient_balance` on an unfunded
|
|
48
|
+
* signer), and a deliberately wrong domain name is rejected with `invalid_exact_evm_token_name_mismatch`
|
|
49
|
+
* — so a mistake here fails loudly rather than hiding behind a generic signature error.
|
|
17
50
|
*/
|
|
18
51
|
export declare const X402_NETWORKS: Record<string, X402Network>;
|
|
19
52
|
export declare function getX402Network(id: string): X402Network | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* The settlement asset for one (network, currency) pair, or undefined when the pair cannot settle.
|
|
55
|
+
* THE gate behind the advertising rule: every surface that names a currency resolves it through
|
|
56
|
+
* here first, so a currency is only ever offered when a real asset backs it.
|
|
57
|
+
*/
|
|
58
|
+
export declare function getX402Asset(network: X402Network | undefined, currency: string): X402Asset | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* The money currencies a network can actually settle — derived from the assets that exist, never a
|
|
61
|
+
* hardcoded list. An unknown network yields [], so a misconfigured node advertises nothing rather
|
|
62
|
+
* than promising a rail it has no asset for. Ordered by MONEY_CURRENCIES for a stable response.
|
|
63
|
+
*/
|
|
64
|
+
export declare function x402SettlementCurrencies(network: X402Network | undefined): MoneyCurrency[];
|
|
20
65
|
/** One entry of a 402 response's `accepts[]`: what a payment must satisfy to unlock the resource. */
|
|
21
66
|
export interface X402PaymentRequirements {
|
|
22
67
|
scheme: 'exact';
|
|
23
68
|
network: string;
|
|
24
|
-
/** Atomic units of the asset (USDC
|
|
69
|
+
/** Atomic units of the asset (USDC and EURC both carry 6 decimals, matching money micros) as a string. */
|
|
25
70
|
maxAmountRequired: string;
|
|
26
71
|
resource: string;
|
|
27
72
|
description: string;
|
|
@@ -92,19 +137,25 @@ export declare function testFacilitator(): X402Facilitator;
|
|
|
92
137
|
/** Decode a base64 X-PAYMENT header into an exact-scheme payload; null on missing/malformed input. */
|
|
93
138
|
export declare function decodeXPayment(header: string | undefined): X402PaymentPayload | null;
|
|
94
139
|
/**
|
|
95
|
-
* Build the exact-scheme PaymentRequirements for a MONEY amount
|
|
96
|
-
* the
|
|
97
|
-
*
|
|
140
|
+
* Build the exact-scheme PaymentRequirements for a MONEY amount in ONE settlement asset. The caller
|
|
141
|
+
* resolves the asset via {@link getX402Asset} first, so a currency with no asset can never reach
|
|
142
|
+
* here. Model 2 made concrete: a 1.50 USD price (1_500_000 micros) asks for 1.50 USDC, and a 1.50 EUR
|
|
143
|
+
* price asks for 1.50 EURC — the price stays fiat, the token is only the instrument. The amount goes
|
|
144
|
+
* through the money chokepoint with the asset's own decimals, so a token that is not 6-decimal is
|
|
145
|
+
* converted rather than mispriced.
|
|
98
146
|
*/
|
|
99
147
|
export declare function buildExactRequirements(args: {
|
|
100
148
|
network: X402Network;
|
|
149
|
+
asset: X402Asset;
|
|
101
150
|
payTo: string;
|
|
102
151
|
amountMicros: number;
|
|
103
152
|
resource: string;
|
|
104
153
|
description: string;
|
|
105
154
|
}): X402PaymentRequirements;
|
|
106
155
|
/**
|
|
107
|
-
* Pull the seller's
|
|
156
|
+
* Pull the seller's stablecoin payout address (payTo) from their opaque `commerce.psp` record. ONE
|
|
157
|
+
* EVM address receives every settlement asset — USDC and EURC are both ERC-20s on the same chain —
|
|
158
|
+
* so adding a currency never asks the seller for another field. Accepts a
|
|
108
159
|
* few shapes — `{ payTo }`, `{ address }`, `{ x402: { address } }` — and returns it only when it is a
|
|
109
160
|
* well-formed EVM address, so a Stripe-only psp (no address) simply yields undefined and the handler
|
|
110
161
|
* answers "seller has no x402 address" rather than settling to a bad target.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"x402-facilitator.d.ts","sourceRoot":"","sources":["../../../src/commerce/x402-facilitator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"x402-facil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AAM,GAAG,eAAe,CAkBhE;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,IAAI,eAAe,CAiBjD;AAED,sGAAsG;AACtG,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,kBAAkB,GAAG,IAAI,CAOpF;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE;IAC3C,OAAO,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;CACpH,GAAG,uBAAuB,CAa1B;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAK7D"}
|
|
@@ -1,45 +1,92 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file src/commerce/x402-facilitator.ts
|
|
3
3
|
* @description The x402 network registry, wire types, and facilitator client for the non-custodial
|
|
4
|
-
*
|
|
4
|
+
* stablecoin settlement handler (TARGET-042). The heavy crypto (EIP-3009 signing by the buyer's wallet,
|
|
5
5
|
* signature + onchain verification, the settling transfer) lives in the buyer's wallet and in the
|
|
6
6
|
* Coinbase-style FACILITATOR — never here. AIMEAT only (1) serializes the x402 `exact`
|
|
7
7
|
* PaymentRequirements a 402 advertises, (2) decodes the buyer's base64 X-PAYMENT proof, and (3)
|
|
8
8
|
* forwards both to the facilitator's /verify + /settle over safeFetch (Rule 10). That is why this
|
|
9
9
|
* handler needs no @x402 / viem dependency: there is no EIP-3009 serialization to hand-write on the
|
|
10
10
|
* server side. The NETWORK REGISTRY is the one place a chain + asset is defined, so Base, Solana, or
|
|
11
|
-
* another network is a data entry, not a code change (TARGET-042: network is a parameter).
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
11
|
+
* another network is a data entry, not a code change (TARGET-042: network is a parameter). The
|
|
12
|
+
* registry is CURRENCY-AWARE: each network carries one settlement asset per money currency (USD →
|
|
13
|
+
* USDC, EUR → EURC), and a pair with no asset is absent, which is the gate that keeps a currency
|
|
14
|
+
* from ever being advertised as settleable.
|
|
15
|
+
* @structure X402Asset · X402Network · X402_NETWORKS · getX402Network · getX402Asset ·
|
|
16
|
+
* x402SettlementCurrencies · X402PaymentRequirements · X402PaymentPayload · X402VerifyResult ·
|
|
17
|
+
* X402SettleResult · X402Facilitator · httpFacilitator · testFacilitator · decodeXPayment ·
|
|
18
|
+
* buildExactRequirements · extractPayTo
|
|
15
19
|
* @usage
|
|
16
20
|
* const fac = config.x402TestFacilitator ? testFacilitator() : httpFacilitator(config.x402FacilitatorUrl);
|
|
17
|
-
* const
|
|
21
|
+
* const asset = getX402Asset(network, session.currency); // undefined → this currency cannot settle
|
|
22
|
+
* const reqs = buildExactRequirements({ network, asset, payTo, amountMicros, resource, description });
|
|
18
23
|
* @version-history
|
|
24
|
+
* v1.1.0 — 2026-07-25 — Currency-aware asset registry: EURC joins USDC as a settlement asset on
|
|
25
|
+
* both Base networks, decimals carried per asset (TARGET-042)
|
|
19
26
|
* v1.0.0 — 2026-07-18 — Initial x402 facilitator client + network registry + test double (TARGET-042)
|
|
20
27
|
*/
|
|
21
28
|
import { safeFetch } from '../utils/url-validator.js';
|
|
22
|
-
import {
|
|
29
|
+
import { microsToTokenRaw, isSupportedMoneyCurrency, MONEY_CURRENCIES } from './money.js';
|
|
23
30
|
/**
|
|
24
31
|
* The network registry — the ONE place a chain/asset is defined. Adding Base mainnet, Solana, or
|
|
25
32
|
* another network is a new entry here, never a change to the handler or the commerce core
|
|
26
|
-
* (TARGET-042: network is a parameter, selected by config.x402Network).
|
|
33
|
+
* (TARGET-042: network is a parameter, selected by config.x402Network). A currency joins a network
|
|
34
|
+
* by gaining an entry in `assets` — that is the whole of "AIMEAT can settle EUR here".
|
|
35
|
+
*
|
|
36
|
+
* VERIFICATION (2026-07-25). Addresses from Circle's own documentation
|
|
37
|
+
* (https://developers.circle.com/stablecoins/usdc-contract-addresses and
|
|
38
|
+
* .../eurc-contract-addresses); `symbol`, `decimals` and the EIP-712 domain (`extra`) were then read
|
|
39
|
+
* from the live contracts and PROVEN by recomputing each contract's own DOMAIN_SEPARATOR from
|
|
40
|
+
* (name, version, chainId, address) — all four match. Note the domain `name` is the ERC-20 `name()`,
|
|
41
|
+
* which is NOT uniform: Base mainnet USDC is "USD Coin" while every other entry equals its ticker.
|
|
42
|
+
* The public x402.org facilitator was probed with a real EIP-3009 signature over each asset: EURC
|
|
43
|
+
* verifies identically to USDC (both reaching `invalid_exact_evm_insufficient_balance` on an unfunded
|
|
44
|
+
* signer), and a deliberately wrong domain name is rejected with `invalid_exact_evm_token_name_mismatch`
|
|
45
|
+
* — so a mistake here fails loudly rather than hiding behind a generic signature error.
|
|
27
46
|
*/
|
|
28
47
|
export const X402_NETWORKS = {
|
|
29
48
|
'base-sepolia': {
|
|
30
49
|
id: 'base-sepolia',
|
|
31
|
-
|
|
32
|
-
|
|
50
|
+
assets: {
|
|
51
|
+
// USDC on Base Sepolia (testnet).
|
|
52
|
+
USD: { address: '0x036CbD53842c5426634e7929541eC2318f3dCF7e', symbol: 'USDC', decimals: 6, extra: { name: 'USDC', version: '2' } },
|
|
53
|
+
// EURC on Base Sepolia (testnet).
|
|
54
|
+
EUR: { address: '0x808456652fdb597867f38412077A9182bf77359F', symbol: 'EURC', decimals: 6, extra: { name: 'EURC', version: '2' } },
|
|
55
|
+
},
|
|
33
56
|
},
|
|
34
57
|
'base': {
|
|
35
58
|
id: 'base',
|
|
36
|
-
|
|
37
|
-
|
|
59
|
+
assets: {
|
|
60
|
+
// USDC on Base mainnet — domain name is "USD Coin", not the ticker.
|
|
61
|
+
USD: { address: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', symbol: 'USDC', decimals: 6, extra: { name: 'USD Coin', version: '2' } },
|
|
62
|
+
// EURC on Base mainnet.
|
|
63
|
+
EUR: { address: '0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42', symbol: 'EURC', decimals: 6, extra: { name: 'EURC', version: '2' } },
|
|
64
|
+
},
|
|
38
65
|
},
|
|
39
66
|
};
|
|
40
67
|
export function getX402Network(id) {
|
|
41
68
|
return X402_NETWORKS[id];
|
|
42
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* The settlement asset for one (network, currency) pair, or undefined when the pair cannot settle.
|
|
72
|
+
* THE gate behind the advertising rule: every surface that names a currency resolves it through
|
|
73
|
+
* here first, so a currency is only ever offered when a real asset backs it.
|
|
74
|
+
*/
|
|
75
|
+
export function getX402Asset(network, currency) {
|
|
76
|
+
if (!network || !isSupportedMoneyCurrency(currency))
|
|
77
|
+
return undefined;
|
|
78
|
+
return network.assets[currency];
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* The money currencies a network can actually settle — derived from the assets that exist, never a
|
|
82
|
+
* hardcoded list. An unknown network yields [], so a misconfigured node advertises nothing rather
|
|
83
|
+
* than promising a rail it has no asset for. Ordered by MONEY_CURRENCIES for a stable response.
|
|
84
|
+
*/
|
|
85
|
+
export function x402SettlementCurrencies(network) {
|
|
86
|
+
if (!network)
|
|
87
|
+
return [];
|
|
88
|
+
return MONEY_CURRENCIES.filter((c) => !!network.assets[c]);
|
|
89
|
+
}
|
|
43
90
|
/**
|
|
44
91
|
* The real facilitator: POST { x402Version, paymentPayload, paymentRequirements } to {baseUrl}/verify
|
|
45
92
|
* and /settle. Every call goes through safeFetch (Rule 10: all non-constant outbound HTTP is SSRF
|
|
@@ -109,26 +156,31 @@ export function decodeXPayment(header) {
|
|
|
109
156
|
}
|
|
110
157
|
}
|
|
111
158
|
/**
|
|
112
|
-
* Build the exact-scheme PaymentRequirements for a MONEY amount
|
|
113
|
-
* the
|
|
114
|
-
*
|
|
159
|
+
* Build the exact-scheme PaymentRequirements for a MONEY amount in ONE settlement asset. The caller
|
|
160
|
+
* resolves the asset via {@link getX402Asset} first, so a currency with no asset can never reach
|
|
161
|
+
* here. Model 2 made concrete: a 1.50 USD price (1_500_000 micros) asks for 1.50 USDC, and a 1.50 EUR
|
|
162
|
+
* price asks for 1.50 EURC — the price stays fiat, the token is only the instrument. The amount goes
|
|
163
|
+
* through the money chokepoint with the asset's own decimals, so a token that is not 6-decimal is
|
|
164
|
+
* converted rather than mispriced.
|
|
115
165
|
*/
|
|
116
166
|
export function buildExactRequirements(args) {
|
|
117
167
|
return {
|
|
118
168
|
scheme: 'exact',
|
|
119
169
|
network: args.network.id,
|
|
120
|
-
maxAmountRequired:
|
|
170
|
+
maxAmountRequired: microsToTokenRaw(args.amountMicros, args.asset.decimals),
|
|
121
171
|
resource: args.resource,
|
|
122
172
|
description: args.description,
|
|
123
173
|
mimeType: 'application/json',
|
|
124
174
|
payTo: args.payTo,
|
|
125
175
|
maxTimeoutSeconds: 120,
|
|
126
|
-
asset: args.
|
|
127
|
-
extra: args.
|
|
176
|
+
asset: args.asset.address,
|
|
177
|
+
extra: args.asset.extra,
|
|
128
178
|
};
|
|
129
179
|
}
|
|
130
180
|
/**
|
|
131
|
-
* Pull the seller's
|
|
181
|
+
* Pull the seller's stablecoin payout address (payTo) from their opaque `commerce.psp` record. ONE
|
|
182
|
+
* EVM address receives every settlement asset — USDC and EURC are both ERC-20s on the same chain —
|
|
183
|
+
* so adding a currency never asks the seller for another field. Accepts a
|
|
132
184
|
* few shapes — `{ payTo }`, `{ address }`, `{ x402: { address } }` — and returns it only when it is a
|
|
133
185
|
* well-formed EVM address, so a Stripe-only psp (no address) simply yields undefined and the handler
|
|
134
186
|
* answers "seller has no x402 address" rather than settling to a bad target.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"x402-facilitator.js","sourceRoot":"","sources":["../../../src/commerce/x402-facilitator.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"x402-facilitator.js","sourceRoot":"","sources":["../../../src/commerce/x402-facilitator.ts"],"names":[],"mappings":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,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO;QACzB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK;KACxB,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAC,GAAY;IACvC,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IACtD,MAAM,CAAC,GAAG,GAA4F,CAAC;IACvG,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,IAAI,EAAE,OAAO,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC;IAC3E,OAAO,OAAO,SAAS,KAAK,QAAQ,IAAI,qBAAqB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;AACxG,CAAC"}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file src/commerce/x402-handler.ts
|
|
3
|
-
* @description The x402 stablecoin PaymentHandler (TARGET-042): settles a MONEY
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
3
|
+
* @description The x402 stablecoin PaymentHandler (TARGET-042): settles a MONEY checkout session
|
|
4
|
+
* with the stablecoin that matches its currency — USD with USDC, EUR with EURC — via the x402
|
|
5
|
+
* `exact` scheme, NON-CUSTODIAL. It registers in the same registry as io.aimeat.morsels and
|
|
6
|
+
* com.stripe.spt and implements the same collect/payout/refund contract, so the commerce core
|
|
7
|
+
* orchestrates it unchanged. The stablecoin is a payment METHOD for a fiat price (model 2): the
|
|
8
|
+
* session currency stays USD or EUR and never becomes USDC/EURC.
|
|
9
|
+
*
|
|
10
|
+
* The advertised currency list is DERIVED from the configured network's assets, so this node only
|
|
11
|
+
* ever offers a currency it can actually settle — see x402-facilitator.ts for the registry and
|
|
12
|
+
* the verification behind each asset.
|
|
9
13
|
*
|
|
10
14
|
* collect: the buyer's decoded X-PAYMENT proof arrives as the adapter `instrument`. With no proof
|
|
11
15
|
* yet, collect throws 402 PAYMENT_REQUIRED so the adapter answers with the exact-scheme accepts[].
|
|
@@ -14,11 +18,13 @@
|
|
|
14
18
|
* hash as the tracking code. AIMEAT never holds funds — replay is rejected by the facilitator's
|
|
15
19
|
* single-use EIP-3009 nonce (and, on the same session, by the completed-session gate). payout and
|
|
16
20
|
* refund are no-ops: the facilitator already moved money directly to the seller, and an onchain
|
|
17
|
-
*
|
|
21
|
+
* onchain transfer cannot be reversed (a post-settlement fulfillment failure is recorded, not clawed
|
|
18
22
|
* back).
|
|
19
23
|
* @structure X402_HANDLER_ID · x402PaymentHandler
|
|
20
24
|
* @usage registerPaymentHandler(x402PaymentHandler(config, facilitator));
|
|
21
25
|
* @version-history
|
|
26
|
+
* v1.1.0 — 2026-07-25 — EUR settles in EURC alongside USD/USDC: currencies derived from the
|
|
27
|
+
* network registry, asset selected by session currency, asset named in the tracking code (TARGET-042)
|
|
22
28
|
* v1.0.0 — 2026-07-18 — Initial non-custodial USDC handler (TARGET-042)
|
|
23
29
|
*/
|
|
24
30
|
import type { AimeatConfig } from '../config.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"x402-handler.d.ts","sourceRoot":"","sources":["../../../src/commerce/x402-handler.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"x402-handler.d.ts","sourceRoot":"","sources":["../../../src/commerce/x402-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,YAAY,CAAC;AAEjE,OAAO,EAEL,KAAK,eAAe,EACrB,MAAM,uBAAuB,CAAC;AAE/B,+EAA+E;AAC/E,eAAO,MAAM,eAAe,sBAAsB,CAAC;AAEnD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,eAAe,GAAG,cAAc,CA8DrG"}
|