moltspay 0.9.0 → 0.9.1

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/.env.example CHANGED
@@ -1,10 +1,46 @@
1
1
  # MoltsPay Server Configuration
2
2
  # Copy to ~/.moltspay/.env or ./.env and fill in values
3
3
 
4
- # Network: true = Base mainnet, false = Base Sepolia testnet
4
+ # ===========================================
5
+ # Network Configuration
6
+ # ===========================================
7
+ # true = Base mainnet, false = Base Sepolia testnet
5
8
  USE_MAINNET=true
6
9
 
7
- # CDP API Credentials (required for mainnet)
8
- # Get from: https://portal.cdp.coinbase.com/
10
+ # ===========================================
11
+ # Facilitator Selection (v0.9.0+)
12
+ # ===========================================
13
+ # Primary facilitator to use
14
+ # Available: cdp
15
+ # Coming soon: chaoschain, questflow
16
+ FACILITATOR_PRIMARY=cdp
17
+
18
+ # Fallback facilitators (comma-separated, optional)
19
+ # Example: chaoschain,questflow
20
+ # FACILITATOR_FALLBACK=
21
+
22
+ # Selection strategy when multiple facilitators available
23
+ # Options: failover | cheapest | fastest | random | roundrobin
24
+ FACILITATOR_STRATEGY=failover
25
+
26
+ # ===========================================
27
+ # CDP Facilitator (Coinbase)
28
+ # ===========================================
29
+ # Required for mainnet. Get credentials from:
30
+ # https://portal.cdp.coinbase.com/
9
31
  CDP_API_KEY_ID=
10
32
  CDP_API_KEY_SECRET=
33
+
34
+ # ===========================================
35
+ # ChaosChain Facilitator (Coming Soon)
36
+ # ===========================================
37
+ # https://github.com/ChaosChain/chaoschain-x402
38
+ # CHAOSCHAIN_ENDPOINT=https://x402.chaoschain.io
39
+ # CHAOSCHAIN_API_KEY=
40
+
41
+ # ===========================================
42
+ # Questflow Facilitator (Coming Soon)
43
+ # ===========================================
44
+ # https://facilitator.questflow.ai/
45
+ # QUESTFLOW_ENDPOINT=https://facilitator.questflow.ai
46
+ # QUESTFLOW_API_KEY=
package/dist/cli/index.js CHANGED
@@ -945,8 +945,9 @@ var MoltsPayServer = class {
945
945
  this.useMainnet = process.env.USE_MAINNET?.toLowerCase() === "true";
946
946
  this.networkId = this.useMainnet ? "eip155:8453" : "eip155:84532";
947
947
  const facilitatorConfig = options.facilitators || {
948
- primary: "cdp",
949
- strategy: "failover",
948
+ primary: process.env.FACILITATOR_PRIMARY || "cdp",
949
+ fallback: process.env.FACILITATOR_FALLBACK?.split(",").filter(Boolean),
950
+ strategy: process.env.FACILITATOR_STRATEGY || "failover",
950
951
  config: {
951
952
  cdp: { useMainnet: this.useMainnet }
952
953
  }