@relai-fi/x402 0.6.2 → 0.6.4

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.
@@ -0,0 +1,52 @@
1
+ import * as zod_v4_core from 'zod/v4/core';
2
+ import * as zod_mini from 'zod/mini';
3
+ import { Method } from 'mppx';
4
+
5
+ interface EvmChargeConfig {
6
+ /** Recipient EVM address */
7
+ recipient: string;
8
+ /** ERC-20 token contract address (e.g. USDC) */
9
+ tokenAddress: string;
10
+ /** Token decimals (default 6) */
11
+ decimals?: number;
12
+ /** EVM chain ID */
13
+ chainId: number;
14
+ /** RPC URL for this chain */
15
+ rpcUrl: string;
16
+ /** Human-readable network name (e.g. "skale-base") */
17
+ network?: string;
18
+ }
19
+ declare function evmCharge(config: EvmChargeConfig): Method.Server<{
20
+ readonly intent: "charge";
21
+ readonly name: "evm";
22
+ readonly schema: {
23
+ readonly credential: {
24
+ readonly payload: zod_mini.ZodMiniObject<{
25
+ type: zod_mini.ZodMiniString<string>;
26
+ hash: zod_mini.ZodMiniOptional<zod_mini.ZodMiniString<string>>;
27
+ }, zod_v4_core.$strip>;
28
+ };
29
+ readonly request: zod_mini.ZodMiniObject<{
30
+ amount: zod_mini.ZodMiniString<string>;
31
+ currency: zod_mini.ZodMiniString<string>;
32
+ recipient: zod_mini.ZodMiniString<string>;
33
+ description: zod_mini.ZodMiniOptional<zod_mini.ZodMiniString<string>>;
34
+ methodDetails: zod_mini.ZodMiniObject<{
35
+ chainId: zod_mini.ZodMiniNumber<number>;
36
+ network: zod_mini.ZodMiniOptional<zod_mini.ZodMiniString<string>>;
37
+ decimals: zod_mini.ZodMiniOptional<zod_mini.ZodMiniNumber<number>>;
38
+ rpcUrl: zod_mini.ZodMiniOptional<zod_mini.ZodMiniString<string>>;
39
+ reference: zod_mini.ZodMiniString<string>;
40
+ }, zod_v4_core.$strip>;
41
+ }, zod_v4_core.$strip>;
42
+ };
43
+ }, {
44
+ readonly currency: string;
45
+ readonly recipient: "";
46
+ readonly methodDetails: {
47
+ readonly reference: "";
48
+ readonly chainId: number;
49
+ };
50
+ }, undefined>;
51
+
52
+ export { type EvmChargeConfig, evmCharge };
@@ -0,0 +1,52 @@
1
+ import * as zod_v4_core from 'zod/v4/core';
2
+ import * as zod_mini from 'zod/mini';
3
+ import { Method } from 'mppx';
4
+
5
+ interface EvmChargeConfig {
6
+ /** Recipient EVM address */
7
+ recipient: string;
8
+ /** ERC-20 token contract address (e.g. USDC) */
9
+ tokenAddress: string;
10
+ /** Token decimals (default 6) */
11
+ decimals?: number;
12
+ /** EVM chain ID */
13
+ chainId: number;
14
+ /** RPC URL for this chain */
15
+ rpcUrl: string;
16
+ /** Human-readable network name (e.g. "skale-base") */
17
+ network?: string;
18
+ }
19
+ declare function evmCharge(config: EvmChargeConfig): Method.Server<{
20
+ readonly intent: "charge";
21
+ readonly name: "evm";
22
+ readonly schema: {
23
+ readonly credential: {
24
+ readonly payload: zod_mini.ZodMiniObject<{
25
+ type: zod_mini.ZodMiniString<string>;
26
+ hash: zod_mini.ZodMiniOptional<zod_mini.ZodMiniString<string>>;
27
+ }, zod_v4_core.$strip>;
28
+ };
29
+ readonly request: zod_mini.ZodMiniObject<{
30
+ amount: zod_mini.ZodMiniString<string>;
31
+ currency: zod_mini.ZodMiniString<string>;
32
+ recipient: zod_mini.ZodMiniString<string>;
33
+ description: zod_mini.ZodMiniOptional<zod_mini.ZodMiniString<string>>;
34
+ methodDetails: zod_mini.ZodMiniObject<{
35
+ chainId: zod_mini.ZodMiniNumber<number>;
36
+ network: zod_mini.ZodMiniOptional<zod_mini.ZodMiniString<string>>;
37
+ decimals: zod_mini.ZodMiniOptional<zod_mini.ZodMiniNumber<number>>;
38
+ rpcUrl: zod_mini.ZodMiniOptional<zod_mini.ZodMiniString<string>>;
39
+ reference: zod_mini.ZodMiniString<string>;
40
+ }, zod_v4_core.$strip>;
41
+ }, zod_v4_core.$strip>;
42
+ };
43
+ }, {
44
+ readonly currency: string;
45
+ readonly recipient: "";
46
+ readonly methodDetails: {
47
+ readonly reference: "";
48
+ readonly chainId: number;
49
+ };
50
+ }, undefined>;
51
+
52
+ export { type EvmChargeConfig, evmCharge };