🔥 ✌️ 💜 🧡
Proposal for ContextVM Payments
We're enhancing the payment system for ContextVM and its TypeScript SDK to create a flexible and robust framework that supports multiple payment methods like Bitcoin, Lightning, Cashu, and we are looking for some feedback. Here’s our current progress:
We propose introducing a `payment_method` field to clearly identify the payment method used in payment request notifications, aligning with the W3C Payment Method Identifiers (PMI) specification. This ensures interoperability and future-proofing, making it easier to support various currencies and payment systems. Payment identifiers will look like `bitcoin-lightning`, `bitcoin-lightning-bolt11`, or `ecash-cashu`.
On the SDK side, we propose a modular architecture with `PaymentHandler` and `PaymentProcessor` interfaces for client and server transports, respectively. This approach allows different payment methods to coexist seamlessly, enabling users to implement their own payment methods by adhering to these interfaces.
However, we face some challenges. One main hurdle is handling mismatching payment methods between clients and servers effectively. To address this, we propose maintaining an array of payment handlers or processors, each satisfying a standard interface and specific to a payment method. For example, a server supporting both Lightning Network (LN) and Cashu would be initialized with [LNPaymentProcessor, CashuPaymentProcessor], while a client supporting only LN would be initialized with just [LNPaymentHandler]. More info in the linked issue below
We invite you to review our progress and provide valuable feedback:
ContextVM Spec PR: https://github.com/ContextVM/contextvm-docs/pull/2
ContextVM ts-sdk: https://github.com/ContextVM/ts-sdk/issues/6
Your insights and suggestions are crucial in helping us overcome these challenges and shape these updates. Let's build a better payment system together!
Discussion
No replies yet.