moltspay 1.3.0 → 1.4.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 +14 -0
- package/README.md +319 -89
- package/dist/cdp/index.d.mts +4 -4
- package/dist/cdp/index.d.ts +4 -4
- package/dist/cdp/index.js +57 -0
- package/dist/cdp/index.js.map +1 -1
- package/dist/cdp/index.mjs +57 -0
- package/dist/cdp/index.mjs.map +1 -1
- package/dist/chains/index.d.mts +9 -8
- package/dist/chains/index.d.ts +9 -8
- package/dist/chains/index.js +57 -0
- package/dist/chains/index.js.map +1 -1
- package/dist/chains/index.mjs +57 -0
- package/dist/chains/index.mjs.map +1 -1
- package/dist/cli/index.js +2021 -285
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/index.mjs +2023 -277
- package/dist/cli/index.mjs.map +1 -1
- package/dist/client/index.d.mts +39 -3
- package/dist/client/index.d.ts +39 -3
- package/dist/client/index.js +563 -37
- package/dist/client/index.js.map +1 -1
- package/dist/client/index.mjs +571 -35
- package/dist/client/index.mjs.map +1 -1
- package/dist/facilitators/index.d.mts +220 -1
- package/dist/facilitators/index.d.ts +220 -1
- package/dist/facilitators/index.js +664 -1
- package/dist/facilitators/index.js.map +1 -1
- package/dist/facilitators/index.mjs +670 -1
- package/dist/facilitators/index.mjs.map +1 -1
- package/dist/{index-On9ZaGDW.d.mts → index-D_2FkLwV.d.mts} +6 -2
- package/dist/{index-On9ZaGDW.d.ts → index-D_2FkLwV.d.ts} +6 -2
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1440 -153
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1448 -151
- package/dist/index.mjs.map +1 -1
- package/dist/server/index.d.mts +13 -3
- package/dist/server/index.d.ts +13 -3
- package/dist/server/index.js +909 -54
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +919 -54
- package/dist/server/index.mjs.map +1 -1
- package/dist/verify/index.d.mts +1 -1
- package/dist/verify/index.d.ts +1 -1
- package/dist/verify/index.js +57 -0
- package/dist/verify/index.js.map +1 -1
- package/dist/verify/index.mjs +57 -0
- package/dist/verify/index.mjs.map +1 -1
- package/dist/wallet/index.d.mts +3 -3
- package/dist/wallet/index.d.ts +3 -3
- package/dist/wallet/index.js +57 -0
- package/dist/wallet/index.js.map +1 -1
- package/dist/wallet/index.mjs +57 -0
- package/dist/wallet/index.mjs.map +1 -1
- package/package.json +5 -2
- package/schemas/moltspay.services.schema.json +27 -132
package/dist/server/index.d.mts
CHANGED
|
@@ -42,6 +42,7 @@ interface ProviderConfig {
|
|
|
42
42
|
name: string;
|
|
43
43
|
description?: string;
|
|
44
44
|
wallet: string;
|
|
45
|
+
solana_wallet?: string;
|
|
45
46
|
chain?: string;
|
|
46
47
|
chains?: ChainConfig[];
|
|
47
48
|
}
|
|
@@ -212,16 +213,25 @@ declare class MoltsPayServer {
|
|
|
212
213
|
/**
|
|
213
214
|
* POST /proxy - Handle payment for external services (moltspay-creators)
|
|
214
215
|
*
|
|
215
|
-
* This endpoint allows other services to delegate x402 payment handling.
|
|
216
|
+
* This endpoint allows other services to delegate x402/MPP payment handling.
|
|
216
217
|
* It does NOT execute any skill - just handles payment verification/settlement.
|
|
217
218
|
*
|
|
218
219
|
* Request body:
|
|
219
220
|
* { wallet, amount, currency, chain, memo, serviceId, description }
|
|
220
221
|
*
|
|
221
|
-
*
|
|
222
|
-
*
|
|
222
|
+
* For x402 (base, polygon, base_sepolia):
|
|
223
|
+
* Without X-Payment header: returns 402 with X-Payment-Required
|
|
224
|
+
* With X-Payment header: verifies payment via CDP
|
|
225
|
+
*
|
|
226
|
+
* For MPP (tempo_moderato):
|
|
227
|
+
* Without Authorization header: returns 402 with WWW-Authenticate
|
|
228
|
+
* With Authorization: Payment header: verifies tx on Tempo chain
|
|
223
229
|
*/
|
|
224
230
|
private handleProxy;
|
|
231
|
+
/**
|
|
232
|
+
* Handle MPP payment flow for /proxy endpoint (tempo_moderato chain)
|
|
233
|
+
*/
|
|
234
|
+
private handleProxyMPP;
|
|
225
235
|
/**
|
|
226
236
|
* Build payment requirements for proxy endpoint (uses provided wallet)
|
|
227
237
|
*/
|
package/dist/server/index.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ interface ProviderConfig {
|
|
|
42
42
|
name: string;
|
|
43
43
|
description?: string;
|
|
44
44
|
wallet: string;
|
|
45
|
+
solana_wallet?: string;
|
|
45
46
|
chain?: string;
|
|
46
47
|
chains?: ChainConfig[];
|
|
47
48
|
}
|
|
@@ -212,16 +213,25 @@ declare class MoltsPayServer {
|
|
|
212
213
|
/**
|
|
213
214
|
* POST /proxy - Handle payment for external services (moltspay-creators)
|
|
214
215
|
*
|
|
215
|
-
* This endpoint allows other services to delegate x402 payment handling.
|
|
216
|
+
* This endpoint allows other services to delegate x402/MPP payment handling.
|
|
216
217
|
* It does NOT execute any skill - just handles payment verification/settlement.
|
|
217
218
|
*
|
|
218
219
|
* Request body:
|
|
219
220
|
* { wallet, amount, currency, chain, memo, serviceId, description }
|
|
220
221
|
*
|
|
221
|
-
*
|
|
222
|
-
*
|
|
222
|
+
* For x402 (base, polygon, base_sepolia):
|
|
223
|
+
* Without X-Payment header: returns 402 with X-Payment-Required
|
|
224
|
+
* With X-Payment header: verifies payment via CDP
|
|
225
|
+
*
|
|
226
|
+
* For MPP (tempo_moderato):
|
|
227
|
+
* Without Authorization header: returns 402 with WWW-Authenticate
|
|
228
|
+
* With Authorization: Payment header: verifies tx on Tempo chain
|
|
223
229
|
*/
|
|
224
230
|
private handleProxy;
|
|
231
|
+
/**
|
|
232
|
+
* Handle MPP payment flow for /proxy endpoint (tempo_moderato chain)
|
|
233
|
+
*/
|
|
234
|
+
private handleProxyMPP;
|
|
225
235
|
/**
|
|
226
236
|
* Build payment requirements for proxy endpoint (uses provided wallet)
|
|
227
237
|
*/
|