From c8303f33a37c9fd6f6b7b76841407093a4e42e25 Mon Sep 17 00:00:00 2001 From: bdj Date: Tue, 31 Mar 2026 16:41:54 -0700 Subject: [PATCH] fix: use PaymentProtocol from @atxp/common instead of local duplicate @atxp/server had its own PaymentProtocol = 'atxp' | 'x402' which didn't include 'mpp'. @atxp/common has the canonical type that includes all protocols. Import and re-export from common for type consistency. Co-Authored-By: Claude Opus 4.6 (1M context) --- packages/atxp-server/src/protocol.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/packages/atxp-server/src/protocol.ts b/packages/atxp-server/src/protocol.ts index 238afcd..078f71c 100644 --- a/packages/atxp-server/src/protocol.ts +++ b/packages/atxp-server/src/protocol.ts @@ -1,11 +1,6 @@ -import { AuthorizationServerUrl, FetchLike, Logger } from "@atxp/common"; - -/** - * Payment protocol types supported by the omni-challenge system. - * - 'atxp': ATXP-MCP protocol (JWT-based, existing flow) - * - 'x402': X402 protocol (Permit2 / X-PAYMENT header) - */ -export type PaymentProtocol = 'atxp' | 'x402'; +import { AuthorizationServerUrl, FetchLike, Logger, type PaymentProtocol } from "@atxp/common"; +// Re-export from common so consumers of @atxp/server get the same type +export type { PaymentProtocol } from "@atxp/common"; /** * Result of detecting which protocol a client used from its credential.