@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,38 @@
1
+ import * as zod_v4_core from 'zod/v4/core';
2
+ import * as zod_mini from 'zod/mini';
3
+ import { Method } from 'mppx';
4
+ import { Account } from 'viem';
5
+
6
+ interface EvmChargeClientConfig {
7
+ /** viem Account (from privateKeyToAccount or similar) */
8
+ account: Account;
9
+ /** Optional custom RPC URL — if not provided, uses the one from the challenge */
10
+ rpcUrl?: string;
11
+ }
12
+ declare function evmCharge(config: EvmChargeClientConfig): Method.Client<{
13
+ readonly intent: "charge";
14
+ readonly name: "evm";
15
+ readonly schema: {
16
+ readonly credential: {
17
+ readonly payload: zod_mini.ZodMiniObject<{
18
+ type: zod_mini.ZodMiniString<string>;
19
+ hash: zod_mini.ZodMiniOptional<zod_mini.ZodMiniString<string>>;
20
+ }, zod_v4_core.$strip>;
21
+ };
22
+ readonly request: zod_mini.ZodMiniObject<{
23
+ amount: zod_mini.ZodMiniString<string>;
24
+ currency: zod_mini.ZodMiniString<string>;
25
+ recipient: zod_mini.ZodMiniString<string>;
26
+ description: zod_mini.ZodMiniOptional<zod_mini.ZodMiniString<string>>;
27
+ methodDetails: zod_mini.ZodMiniObject<{
28
+ chainId: zod_mini.ZodMiniNumber<number>;
29
+ network: zod_mini.ZodMiniOptional<zod_mini.ZodMiniString<string>>;
30
+ decimals: zod_mini.ZodMiniOptional<zod_mini.ZodMiniNumber<number>>;
31
+ rpcUrl: zod_mini.ZodMiniOptional<zod_mini.ZodMiniString<string>>;
32
+ reference: zod_mini.ZodMiniString<string>;
33
+ }, zod_v4_core.$strip>;
34
+ }, zod_v4_core.$strip>;
35
+ };
36
+ }, undefined>;
37
+
38
+ export { type EvmChargeClientConfig, evmCharge };
@@ -0,0 +1,38 @@
1
+ import * as zod_v4_core from 'zod/v4/core';
2
+ import * as zod_mini from 'zod/mini';
3
+ import { Method } from 'mppx';
4
+ import { Account } from 'viem';
5
+
6
+ interface EvmChargeClientConfig {
7
+ /** viem Account (from privateKeyToAccount or similar) */
8
+ account: Account;
9
+ /** Optional custom RPC URL — if not provided, uses the one from the challenge */
10
+ rpcUrl?: string;
11
+ }
12
+ declare function evmCharge(config: EvmChargeClientConfig): Method.Client<{
13
+ readonly intent: "charge";
14
+ readonly name: "evm";
15
+ readonly schema: {
16
+ readonly credential: {
17
+ readonly payload: zod_mini.ZodMiniObject<{
18
+ type: zod_mini.ZodMiniString<string>;
19
+ hash: zod_mini.ZodMiniOptional<zod_mini.ZodMiniString<string>>;
20
+ }, zod_v4_core.$strip>;
21
+ };
22
+ readonly request: zod_mini.ZodMiniObject<{
23
+ amount: zod_mini.ZodMiniString<string>;
24
+ currency: zod_mini.ZodMiniString<string>;
25
+ recipient: zod_mini.ZodMiniString<string>;
26
+ description: zod_mini.ZodMiniOptional<zod_mini.ZodMiniString<string>>;
27
+ methodDetails: zod_mini.ZodMiniObject<{
28
+ chainId: zod_mini.ZodMiniNumber<number>;
29
+ network: zod_mini.ZodMiniOptional<zod_mini.ZodMiniString<string>>;
30
+ decimals: zod_mini.ZodMiniOptional<zod_mini.ZodMiniNumber<number>>;
31
+ rpcUrl: zod_mini.ZodMiniOptional<zod_mini.ZodMiniString<string>>;
32
+ reference: zod_mini.ZodMiniString<string>;
33
+ }, zod_v4_core.$strip>;
34
+ }, zod_v4_core.$strip>;
35
+ };
36
+ }, undefined>;
37
+
38
+ export { type EvmChargeClientConfig, evmCharge };