UNPKG

@thorium-dev-group/x402-mcp-extension

Version:
34 lines 1.05 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BaseFacilitatorService = void 0; class BaseFacilitatorService { async validatePayment(payload, paymentRequirements) { try { return await this.performValidation(payload, paymentRequirements); } catch (error) { console.error('Payment validation failed:', error); return { isValid: false, invalidReason: error instanceof Error ? error.message : 'Unknown error', }; } } async executePayment(payload, paymentRequirements) { return await this.performExecution(payload, paymentRequirements); } createValidResult(payer) { return { isValid: true, payer, }; } createInvalidResult(reason) { return { isValid: false, invalidReason: reason, }; } } exports.BaseFacilitatorService = BaseFacilitatorService; //# sourceMappingURL=base-facilitator.js.map