@wtflabs/x402 0.0.1-beta.14 → 0.0.1-beta.16
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/dist/cjs/client/index.d.ts +1 -1
- package/dist/cjs/client/index.js +1 -1
- package/dist/cjs/client/index.js.map +1 -1
- package/dist/cjs/facilitator/index.d.ts +1 -1
- package/dist/cjs/facilitator/index.js +1169 -1077
- package/dist/cjs/facilitator/index.js.map +1 -1
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +1636 -1544
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/middleware-qavKyUnr.d.ts +93 -0
- package/dist/cjs/paywall/index.d.ts +1 -1
- package/dist/cjs/schemes/index.d.ts +1 -1
- package/dist/cjs/schemes/index.js +697 -605
- package/dist/cjs/schemes/index.js.map +1 -1
- package/dist/cjs/shared/index.d.ts +2 -2
- package/dist/cjs/types/index.d.ts +335 -4
- package/dist/cjs/types/index.js +426 -0
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/cjs/verify/index.d.ts +2 -2
- package/dist/esm/{chunk-VTLJOZXM.mjs → chunk-27VV4F7H.mjs} +3 -3
- package/dist/esm/chunk-27VV4F7H.mjs.map +1 -0
- package/dist/esm/{chunk-NPWDNT2P.mjs → chunk-5UE5XTGG.mjs} +428 -1
- package/dist/esm/chunk-5UE5XTGG.mjs.map +1 -0
- package/dist/esm/{chunk-KABV25HJ.mjs → chunk-VHQZ4KRR.mjs} +3 -3
- package/dist/esm/{chunk-WCQCFJWV.mjs → chunk-YWZNW3IG.mjs} +74 -409
- package/dist/esm/chunk-YWZNW3IG.mjs.map +1 -0
- package/dist/esm/{chunk-A6TSFIQP.mjs → chunk-YZUMYCYA.mjs} +3 -3
- package/dist/esm/client/index.d.mts +1 -1
- package/dist/esm/client/index.mjs +3 -3
- package/dist/esm/facilitator/index.d.mts +1 -1
- package/dist/esm/facilitator/index.mjs +4 -4
- package/dist/esm/index.d.mts +1 -1
- package/dist/esm/index.mjs +5 -5
- package/dist/esm/{middleware-DSDucaQ5.d.mts → middleware-CFWW-MAF.d.mts} +1 -1
- package/dist/esm/paywall/index.d.mts +1 -1
- package/dist/esm/schemes/index.d.mts +1 -1
- package/dist/esm/schemes/index.mjs +3 -3
- package/dist/esm/shared/index.d.mts +2 -2
- package/dist/esm/shared/index.mjs +1 -1
- package/dist/esm/types/index.d.mts +335 -4
- package/dist/esm/types/index.mjs +1 -1
- package/dist/esm/verify/index.d.mts +2 -2
- package/dist/esm/verify/index.mjs +1 -1
- package/dist/esm/x402Specs-B9zS3LnZ.d.mts +1778 -0
- package/package.json +1 -1
- package/dist/esm/chunk-NPWDNT2P.mjs.map +0 -1
- package/dist/esm/chunk-VTLJOZXM.mjs.map +0 -1
- package/dist/esm/chunk-WCQCFJWV.mjs.map +0 -1
- package/dist/{esm/x402Specs-BtRXj67U.d.mts → cjs/x402Specs-B9zS3LnZ.d.ts} +6 -6
- /package/dist/esm/{chunk-KABV25HJ.mjs.map → chunk-VHQZ4KRR.mjs.map} +0 -0
- /package/dist/esm/{chunk-A6TSFIQP.mjs.map → chunk-YZUMYCYA.mjs.map} +0 -0
|
@@ -0,0 +1,1778 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const schemes: readonly ["exact"];
|
|
4
|
+
declare const x402Versions: readonly [1];
|
|
5
|
+
declare const ErrorReasons: readonly ["insufficient_funds", "invalid_exact_evm_payload_authorization_valid_after", "invalid_exact_evm_payload_authorization_valid_before", "invalid_exact_evm_payload_authorization_value", "invalid_exact_evm_payload_signature", "invalid_exact_evm_payload_recipient_mismatch", "invalid_exact_svm_payload_transaction", "invalid_exact_svm_payload_transaction_amount_mismatch", "invalid_exact_svm_payload_transaction_create_ata_instruction", "invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_payee", "invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_asset", "invalid_exact_svm_payload_transaction_instructions", "invalid_exact_svm_payload_transaction_instructions_length", "invalid_exact_svm_payload_transaction_instructions_compute_limit_instruction", "invalid_exact_svm_payload_transaction_instructions_compute_price_instruction", "invalid_exact_svm_payload_transaction_instructions_compute_price_instruction_too_high", "invalid_exact_svm_payload_transaction_instruction_not_spl_token_transfer_checked", "invalid_exact_svm_payload_transaction_instruction_not_token_2022_transfer_checked", "invalid_exact_svm_payload_transaction_not_a_transfer_instruction", "invalid_exact_svm_payload_transaction_receiver_ata_not_found", "invalid_exact_svm_payload_transaction_sender_ata_not_found", "invalid_exact_svm_payload_transaction_simulation_failed", "invalid_exact_svm_payload_transaction_transfer_to_incorrect_ata", "invalid_network", "invalid_payload", "invalid_payment_requirements", "invalid_scheme", "invalid_payment", "payment_expired", "unsupported_scheme", "invalid_x402_version", "invalid_transaction_state", "settle_exact_svm_block_height_exceeded", "settle_exact_svm_transaction_confirmation_timed_out", "unexpected_settle_error", "unexpected_verify_error", "unsupported_authorization_type", "invalid_authorization_type", "invalid_permit_signature", "invalid_permit2_signature", "invalid_permit2_witness_signature", "witness_recipient_mismatch", "permit_expired", "permit2_expired", "permit2_not_approved", "invalid_token_address", "invalid_spender_address", "token_mismatch", "insufficient_payment_amount", "insufficient_token_balance", "transaction_failed", "settlement_failed"];
|
|
6
|
+
declare const PaymentRequirementsSchema: z.ZodObject<{
|
|
7
|
+
scheme: z.ZodEnum<["exact"]>;
|
|
8
|
+
network: z.ZodEnum<["base-sepolia", "base", "avalanche-fuji", "avalanche", "iotex", "solana-devnet", "solana", "sei", "sei-testnet", "polygon", "polygon-amoy", "peaq", "bsc", "bsc-testnet"]>;
|
|
9
|
+
maxAmountRequired: z.ZodEffects<z.ZodString, string, string>;
|
|
10
|
+
resource: z.ZodString;
|
|
11
|
+
description: z.ZodString;
|
|
12
|
+
mimeType: z.ZodString;
|
|
13
|
+
outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
14
|
+
payTo: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
15
|
+
maxTimeoutSeconds: z.ZodNumber;
|
|
16
|
+
asset: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
17
|
+
paymentType: z.ZodOptional<z.ZodEnum<["eip3009", "permit", "permit2"]>>;
|
|
18
|
+
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
scheme: "exact";
|
|
21
|
+
description: string;
|
|
22
|
+
asset: string;
|
|
23
|
+
maxAmountRequired: string;
|
|
24
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
25
|
+
resource: string;
|
|
26
|
+
mimeType: string;
|
|
27
|
+
payTo: string;
|
|
28
|
+
maxTimeoutSeconds: number;
|
|
29
|
+
outputSchema?: Record<string, any> | undefined;
|
|
30
|
+
paymentType?: "permit" | "eip3009" | "permit2" | undefined;
|
|
31
|
+
extra?: Record<string, any> | undefined;
|
|
32
|
+
}, {
|
|
33
|
+
scheme: "exact";
|
|
34
|
+
description: string;
|
|
35
|
+
asset: string;
|
|
36
|
+
maxAmountRequired: string;
|
|
37
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
38
|
+
resource: string;
|
|
39
|
+
mimeType: string;
|
|
40
|
+
payTo: string;
|
|
41
|
+
maxTimeoutSeconds: number;
|
|
42
|
+
outputSchema?: Record<string, any> | undefined;
|
|
43
|
+
paymentType?: "permit" | "eip3009" | "permit2" | undefined;
|
|
44
|
+
extra?: Record<string, any> | undefined;
|
|
45
|
+
}>;
|
|
46
|
+
type PaymentRequirements = z.infer<typeof PaymentRequirementsSchema>;
|
|
47
|
+
declare const ExactEvmPayloadAuthorizationSchema: z.ZodObject<{
|
|
48
|
+
from: z.ZodString;
|
|
49
|
+
to: z.ZodString;
|
|
50
|
+
value: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
51
|
+
validAfter: z.ZodEffects<z.ZodString, string, string>;
|
|
52
|
+
validBefore: z.ZodEffects<z.ZodString, string, string>;
|
|
53
|
+
nonce: z.ZodString;
|
|
54
|
+
}, "strip", z.ZodTypeAny, {
|
|
55
|
+
from: string;
|
|
56
|
+
to: string;
|
|
57
|
+
value: string;
|
|
58
|
+
validAfter: string;
|
|
59
|
+
validBefore: string;
|
|
60
|
+
nonce: string;
|
|
61
|
+
}, {
|
|
62
|
+
from: string;
|
|
63
|
+
to: string;
|
|
64
|
+
value: string;
|
|
65
|
+
validAfter: string;
|
|
66
|
+
validBefore: string;
|
|
67
|
+
nonce: string;
|
|
68
|
+
}>;
|
|
69
|
+
type ExactEvmPayloadAuthorization = z.infer<typeof ExactEvmPayloadAuthorizationSchema>;
|
|
70
|
+
declare const PermitEvmPayloadAuthorizationSchema: z.ZodObject<{
|
|
71
|
+
owner: z.ZodString;
|
|
72
|
+
spender: z.ZodString;
|
|
73
|
+
value: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
74
|
+
deadline: z.ZodEffects<z.ZodString, string, string>;
|
|
75
|
+
nonce: z.ZodEffects<z.ZodString, string, string>;
|
|
76
|
+
}, "strip", z.ZodTypeAny, {
|
|
77
|
+
value: string;
|
|
78
|
+
nonce: string;
|
|
79
|
+
owner: string;
|
|
80
|
+
spender: string;
|
|
81
|
+
deadline: string;
|
|
82
|
+
}, {
|
|
83
|
+
value: string;
|
|
84
|
+
nonce: string;
|
|
85
|
+
owner: string;
|
|
86
|
+
spender: string;
|
|
87
|
+
deadline: string;
|
|
88
|
+
}>;
|
|
89
|
+
type PermitEvmPayloadAuthorization = z.infer<typeof PermitEvmPayloadAuthorizationSchema>;
|
|
90
|
+
declare const Permit2EvmPayloadAuthorizationSchema: z.ZodObject<{
|
|
91
|
+
owner: z.ZodString;
|
|
92
|
+
spender: z.ZodString;
|
|
93
|
+
token: z.ZodString;
|
|
94
|
+
amount: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
95
|
+
deadline: z.ZodEffects<z.ZodString, string, string>;
|
|
96
|
+
nonce: z.ZodEffects<z.ZodString, string, string>;
|
|
97
|
+
to: z.ZodOptional<z.ZodString>;
|
|
98
|
+
}, "strip", z.ZodTypeAny, {
|
|
99
|
+
nonce: string;
|
|
100
|
+
owner: string;
|
|
101
|
+
spender: string;
|
|
102
|
+
deadline: string;
|
|
103
|
+
amount: string;
|
|
104
|
+
token: string;
|
|
105
|
+
to?: string | undefined;
|
|
106
|
+
}, {
|
|
107
|
+
nonce: string;
|
|
108
|
+
owner: string;
|
|
109
|
+
spender: string;
|
|
110
|
+
deadline: string;
|
|
111
|
+
amount: string;
|
|
112
|
+
token: string;
|
|
113
|
+
to?: string | undefined;
|
|
114
|
+
}>;
|
|
115
|
+
type Permit2EvmPayloadAuthorization = z.infer<typeof Permit2EvmPayloadAuthorizationSchema>;
|
|
116
|
+
declare const ExactEvmPayloadSchema: z.ZodDiscriminatedUnion<"authorizationType", [z.ZodObject<{
|
|
117
|
+
authorizationType: z.ZodLiteral<"eip3009">;
|
|
118
|
+
signature: z.ZodString;
|
|
119
|
+
authorization: z.ZodObject<{
|
|
120
|
+
from: z.ZodString;
|
|
121
|
+
to: z.ZodString;
|
|
122
|
+
value: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
123
|
+
validAfter: z.ZodEffects<z.ZodString, string, string>;
|
|
124
|
+
validBefore: z.ZodEffects<z.ZodString, string, string>;
|
|
125
|
+
nonce: z.ZodString;
|
|
126
|
+
}, "strip", z.ZodTypeAny, {
|
|
127
|
+
from: string;
|
|
128
|
+
to: string;
|
|
129
|
+
value: string;
|
|
130
|
+
validAfter: string;
|
|
131
|
+
validBefore: string;
|
|
132
|
+
nonce: string;
|
|
133
|
+
}, {
|
|
134
|
+
from: string;
|
|
135
|
+
to: string;
|
|
136
|
+
value: string;
|
|
137
|
+
validAfter: string;
|
|
138
|
+
validBefore: string;
|
|
139
|
+
nonce: string;
|
|
140
|
+
}>;
|
|
141
|
+
}, "strip", z.ZodTypeAny, {
|
|
142
|
+
signature: string;
|
|
143
|
+
authorization: {
|
|
144
|
+
from: string;
|
|
145
|
+
to: string;
|
|
146
|
+
value: string;
|
|
147
|
+
validAfter: string;
|
|
148
|
+
validBefore: string;
|
|
149
|
+
nonce: string;
|
|
150
|
+
};
|
|
151
|
+
authorizationType: "eip3009";
|
|
152
|
+
}, {
|
|
153
|
+
signature: string;
|
|
154
|
+
authorization: {
|
|
155
|
+
from: string;
|
|
156
|
+
to: string;
|
|
157
|
+
value: string;
|
|
158
|
+
validAfter: string;
|
|
159
|
+
validBefore: string;
|
|
160
|
+
nonce: string;
|
|
161
|
+
};
|
|
162
|
+
authorizationType: "eip3009";
|
|
163
|
+
}>, z.ZodObject<{
|
|
164
|
+
authorizationType: z.ZodLiteral<"permit">;
|
|
165
|
+
signature: z.ZodString;
|
|
166
|
+
authorization: z.ZodObject<{
|
|
167
|
+
owner: z.ZodString;
|
|
168
|
+
spender: z.ZodString;
|
|
169
|
+
value: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
170
|
+
deadline: z.ZodEffects<z.ZodString, string, string>;
|
|
171
|
+
nonce: z.ZodEffects<z.ZodString, string, string>;
|
|
172
|
+
}, "strip", z.ZodTypeAny, {
|
|
173
|
+
value: string;
|
|
174
|
+
nonce: string;
|
|
175
|
+
owner: string;
|
|
176
|
+
spender: string;
|
|
177
|
+
deadline: string;
|
|
178
|
+
}, {
|
|
179
|
+
value: string;
|
|
180
|
+
nonce: string;
|
|
181
|
+
owner: string;
|
|
182
|
+
spender: string;
|
|
183
|
+
deadline: string;
|
|
184
|
+
}>;
|
|
185
|
+
}, "strip", z.ZodTypeAny, {
|
|
186
|
+
signature: string;
|
|
187
|
+
authorization: {
|
|
188
|
+
value: string;
|
|
189
|
+
nonce: string;
|
|
190
|
+
owner: string;
|
|
191
|
+
spender: string;
|
|
192
|
+
deadline: string;
|
|
193
|
+
};
|
|
194
|
+
authorizationType: "permit";
|
|
195
|
+
}, {
|
|
196
|
+
signature: string;
|
|
197
|
+
authorization: {
|
|
198
|
+
value: string;
|
|
199
|
+
nonce: string;
|
|
200
|
+
owner: string;
|
|
201
|
+
spender: string;
|
|
202
|
+
deadline: string;
|
|
203
|
+
};
|
|
204
|
+
authorizationType: "permit";
|
|
205
|
+
}>, z.ZodObject<{
|
|
206
|
+
authorizationType: z.ZodLiteral<"permit2">;
|
|
207
|
+
signature: z.ZodString;
|
|
208
|
+
authorization: z.ZodObject<{
|
|
209
|
+
owner: z.ZodString;
|
|
210
|
+
spender: z.ZodString;
|
|
211
|
+
token: z.ZodString;
|
|
212
|
+
amount: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
213
|
+
deadline: z.ZodEffects<z.ZodString, string, string>;
|
|
214
|
+
nonce: z.ZodEffects<z.ZodString, string, string>;
|
|
215
|
+
to: z.ZodOptional<z.ZodString>;
|
|
216
|
+
}, "strip", z.ZodTypeAny, {
|
|
217
|
+
nonce: string;
|
|
218
|
+
owner: string;
|
|
219
|
+
spender: string;
|
|
220
|
+
deadline: string;
|
|
221
|
+
amount: string;
|
|
222
|
+
token: string;
|
|
223
|
+
to?: string | undefined;
|
|
224
|
+
}, {
|
|
225
|
+
nonce: string;
|
|
226
|
+
owner: string;
|
|
227
|
+
spender: string;
|
|
228
|
+
deadline: string;
|
|
229
|
+
amount: string;
|
|
230
|
+
token: string;
|
|
231
|
+
to?: string | undefined;
|
|
232
|
+
}>;
|
|
233
|
+
}, "strip", z.ZodTypeAny, {
|
|
234
|
+
signature: string;
|
|
235
|
+
authorization: {
|
|
236
|
+
nonce: string;
|
|
237
|
+
owner: string;
|
|
238
|
+
spender: string;
|
|
239
|
+
deadline: string;
|
|
240
|
+
amount: string;
|
|
241
|
+
token: string;
|
|
242
|
+
to?: string | undefined;
|
|
243
|
+
};
|
|
244
|
+
authorizationType: "permit2";
|
|
245
|
+
}, {
|
|
246
|
+
signature: string;
|
|
247
|
+
authorization: {
|
|
248
|
+
nonce: string;
|
|
249
|
+
owner: string;
|
|
250
|
+
spender: string;
|
|
251
|
+
deadline: string;
|
|
252
|
+
amount: string;
|
|
253
|
+
token: string;
|
|
254
|
+
to?: string | undefined;
|
|
255
|
+
};
|
|
256
|
+
authorizationType: "permit2";
|
|
257
|
+
}>]>;
|
|
258
|
+
type ExactEvmPayload = z.infer<typeof ExactEvmPayloadSchema>;
|
|
259
|
+
declare const ExactSvmPayloadSchema: z.ZodObject<{
|
|
260
|
+
transaction: z.ZodString;
|
|
261
|
+
}, "strip", z.ZodTypeAny, {
|
|
262
|
+
transaction: string;
|
|
263
|
+
}, {
|
|
264
|
+
transaction: string;
|
|
265
|
+
}>;
|
|
266
|
+
type ExactSvmPayload = z.infer<typeof ExactSvmPayloadSchema>;
|
|
267
|
+
declare const PaymentPayloadSchema: z.ZodObject<{
|
|
268
|
+
x402Version: z.ZodEffects<z.ZodNumber, number, number>;
|
|
269
|
+
scheme: z.ZodEnum<["exact"]>;
|
|
270
|
+
network: z.ZodEnum<["base-sepolia", "base", "avalanche-fuji", "avalanche", "iotex", "solana-devnet", "solana", "sei", "sei-testnet", "polygon", "polygon-amoy", "peaq", "bsc", "bsc-testnet"]>;
|
|
271
|
+
payload: z.ZodUnion<[z.ZodDiscriminatedUnion<"authorizationType", [z.ZodObject<{
|
|
272
|
+
authorizationType: z.ZodLiteral<"eip3009">;
|
|
273
|
+
signature: z.ZodString;
|
|
274
|
+
authorization: z.ZodObject<{
|
|
275
|
+
from: z.ZodString;
|
|
276
|
+
to: z.ZodString;
|
|
277
|
+
value: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
278
|
+
validAfter: z.ZodEffects<z.ZodString, string, string>;
|
|
279
|
+
validBefore: z.ZodEffects<z.ZodString, string, string>;
|
|
280
|
+
nonce: z.ZodString;
|
|
281
|
+
}, "strip", z.ZodTypeAny, {
|
|
282
|
+
from: string;
|
|
283
|
+
to: string;
|
|
284
|
+
value: string;
|
|
285
|
+
validAfter: string;
|
|
286
|
+
validBefore: string;
|
|
287
|
+
nonce: string;
|
|
288
|
+
}, {
|
|
289
|
+
from: string;
|
|
290
|
+
to: string;
|
|
291
|
+
value: string;
|
|
292
|
+
validAfter: string;
|
|
293
|
+
validBefore: string;
|
|
294
|
+
nonce: string;
|
|
295
|
+
}>;
|
|
296
|
+
}, "strip", z.ZodTypeAny, {
|
|
297
|
+
signature: string;
|
|
298
|
+
authorization: {
|
|
299
|
+
from: string;
|
|
300
|
+
to: string;
|
|
301
|
+
value: string;
|
|
302
|
+
validAfter: string;
|
|
303
|
+
validBefore: string;
|
|
304
|
+
nonce: string;
|
|
305
|
+
};
|
|
306
|
+
authorizationType: "eip3009";
|
|
307
|
+
}, {
|
|
308
|
+
signature: string;
|
|
309
|
+
authorization: {
|
|
310
|
+
from: string;
|
|
311
|
+
to: string;
|
|
312
|
+
value: string;
|
|
313
|
+
validAfter: string;
|
|
314
|
+
validBefore: string;
|
|
315
|
+
nonce: string;
|
|
316
|
+
};
|
|
317
|
+
authorizationType: "eip3009";
|
|
318
|
+
}>, z.ZodObject<{
|
|
319
|
+
authorizationType: z.ZodLiteral<"permit">;
|
|
320
|
+
signature: z.ZodString;
|
|
321
|
+
authorization: z.ZodObject<{
|
|
322
|
+
owner: z.ZodString;
|
|
323
|
+
spender: z.ZodString;
|
|
324
|
+
value: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
325
|
+
deadline: z.ZodEffects<z.ZodString, string, string>;
|
|
326
|
+
nonce: z.ZodEffects<z.ZodString, string, string>;
|
|
327
|
+
}, "strip", z.ZodTypeAny, {
|
|
328
|
+
value: string;
|
|
329
|
+
nonce: string;
|
|
330
|
+
owner: string;
|
|
331
|
+
spender: string;
|
|
332
|
+
deadline: string;
|
|
333
|
+
}, {
|
|
334
|
+
value: string;
|
|
335
|
+
nonce: string;
|
|
336
|
+
owner: string;
|
|
337
|
+
spender: string;
|
|
338
|
+
deadline: string;
|
|
339
|
+
}>;
|
|
340
|
+
}, "strip", z.ZodTypeAny, {
|
|
341
|
+
signature: string;
|
|
342
|
+
authorization: {
|
|
343
|
+
value: string;
|
|
344
|
+
nonce: string;
|
|
345
|
+
owner: string;
|
|
346
|
+
spender: string;
|
|
347
|
+
deadline: string;
|
|
348
|
+
};
|
|
349
|
+
authorizationType: "permit";
|
|
350
|
+
}, {
|
|
351
|
+
signature: string;
|
|
352
|
+
authorization: {
|
|
353
|
+
value: string;
|
|
354
|
+
nonce: string;
|
|
355
|
+
owner: string;
|
|
356
|
+
spender: string;
|
|
357
|
+
deadline: string;
|
|
358
|
+
};
|
|
359
|
+
authorizationType: "permit";
|
|
360
|
+
}>, z.ZodObject<{
|
|
361
|
+
authorizationType: z.ZodLiteral<"permit2">;
|
|
362
|
+
signature: z.ZodString;
|
|
363
|
+
authorization: z.ZodObject<{
|
|
364
|
+
owner: z.ZodString;
|
|
365
|
+
spender: z.ZodString;
|
|
366
|
+
token: z.ZodString;
|
|
367
|
+
amount: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
368
|
+
deadline: z.ZodEffects<z.ZodString, string, string>;
|
|
369
|
+
nonce: z.ZodEffects<z.ZodString, string, string>;
|
|
370
|
+
to: z.ZodOptional<z.ZodString>;
|
|
371
|
+
}, "strip", z.ZodTypeAny, {
|
|
372
|
+
nonce: string;
|
|
373
|
+
owner: string;
|
|
374
|
+
spender: string;
|
|
375
|
+
deadline: string;
|
|
376
|
+
amount: string;
|
|
377
|
+
token: string;
|
|
378
|
+
to?: string | undefined;
|
|
379
|
+
}, {
|
|
380
|
+
nonce: string;
|
|
381
|
+
owner: string;
|
|
382
|
+
spender: string;
|
|
383
|
+
deadline: string;
|
|
384
|
+
amount: string;
|
|
385
|
+
token: string;
|
|
386
|
+
to?: string | undefined;
|
|
387
|
+
}>;
|
|
388
|
+
}, "strip", z.ZodTypeAny, {
|
|
389
|
+
signature: string;
|
|
390
|
+
authorization: {
|
|
391
|
+
nonce: string;
|
|
392
|
+
owner: string;
|
|
393
|
+
spender: string;
|
|
394
|
+
deadline: string;
|
|
395
|
+
amount: string;
|
|
396
|
+
token: string;
|
|
397
|
+
to?: string | undefined;
|
|
398
|
+
};
|
|
399
|
+
authorizationType: "permit2";
|
|
400
|
+
}, {
|
|
401
|
+
signature: string;
|
|
402
|
+
authorization: {
|
|
403
|
+
nonce: string;
|
|
404
|
+
owner: string;
|
|
405
|
+
spender: string;
|
|
406
|
+
deadline: string;
|
|
407
|
+
amount: string;
|
|
408
|
+
token: string;
|
|
409
|
+
to?: string | undefined;
|
|
410
|
+
};
|
|
411
|
+
authorizationType: "permit2";
|
|
412
|
+
}>]>, z.ZodObject<{
|
|
413
|
+
transaction: z.ZodString;
|
|
414
|
+
}, "strip", z.ZodTypeAny, {
|
|
415
|
+
transaction: string;
|
|
416
|
+
}, {
|
|
417
|
+
transaction: string;
|
|
418
|
+
}>]>;
|
|
419
|
+
}, "strip", z.ZodTypeAny, {
|
|
420
|
+
scheme: "exact";
|
|
421
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
422
|
+
x402Version: number;
|
|
423
|
+
payload: {
|
|
424
|
+
signature: string;
|
|
425
|
+
authorization: {
|
|
426
|
+
from: string;
|
|
427
|
+
to: string;
|
|
428
|
+
value: string;
|
|
429
|
+
validAfter: string;
|
|
430
|
+
validBefore: string;
|
|
431
|
+
nonce: string;
|
|
432
|
+
};
|
|
433
|
+
authorizationType: "eip3009";
|
|
434
|
+
} | {
|
|
435
|
+
signature: string;
|
|
436
|
+
authorization: {
|
|
437
|
+
value: string;
|
|
438
|
+
nonce: string;
|
|
439
|
+
owner: string;
|
|
440
|
+
spender: string;
|
|
441
|
+
deadline: string;
|
|
442
|
+
};
|
|
443
|
+
authorizationType: "permit";
|
|
444
|
+
} | {
|
|
445
|
+
signature: string;
|
|
446
|
+
authorization: {
|
|
447
|
+
nonce: string;
|
|
448
|
+
owner: string;
|
|
449
|
+
spender: string;
|
|
450
|
+
deadline: string;
|
|
451
|
+
amount: string;
|
|
452
|
+
token: string;
|
|
453
|
+
to?: string | undefined;
|
|
454
|
+
};
|
|
455
|
+
authorizationType: "permit2";
|
|
456
|
+
} | {
|
|
457
|
+
transaction: string;
|
|
458
|
+
};
|
|
459
|
+
}, {
|
|
460
|
+
scheme: "exact";
|
|
461
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
462
|
+
x402Version: number;
|
|
463
|
+
payload: {
|
|
464
|
+
signature: string;
|
|
465
|
+
authorization: {
|
|
466
|
+
from: string;
|
|
467
|
+
to: string;
|
|
468
|
+
value: string;
|
|
469
|
+
validAfter: string;
|
|
470
|
+
validBefore: string;
|
|
471
|
+
nonce: string;
|
|
472
|
+
};
|
|
473
|
+
authorizationType: "eip3009";
|
|
474
|
+
} | {
|
|
475
|
+
signature: string;
|
|
476
|
+
authorization: {
|
|
477
|
+
value: string;
|
|
478
|
+
nonce: string;
|
|
479
|
+
owner: string;
|
|
480
|
+
spender: string;
|
|
481
|
+
deadline: string;
|
|
482
|
+
};
|
|
483
|
+
authorizationType: "permit";
|
|
484
|
+
} | {
|
|
485
|
+
signature: string;
|
|
486
|
+
authorization: {
|
|
487
|
+
nonce: string;
|
|
488
|
+
owner: string;
|
|
489
|
+
spender: string;
|
|
490
|
+
deadline: string;
|
|
491
|
+
amount: string;
|
|
492
|
+
token: string;
|
|
493
|
+
to?: string | undefined;
|
|
494
|
+
};
|
|
495
|
+
authorizationType: "permit2";
|
|
496
|
+
} | {
|
|
497
|
+
transaction: string;
|
|
498
|
+
};
|
|
499
|
+
}>;
|
|
500
|
+
type PaymentPayload = z.infer<typeof PaymentPayloadSchema>;
|
|
501
|
+
type EvmPaymentPayload<T extends "eip3009" | "permit" | "permit2"> = Omit<PaymentPayload, "payload"> & {
|
|
502
|
+
payload: {
|
|
503
|
+
authorizationType: T;
|
|
504
|
+
signature: `0x${string}`;
|
|
505
|
+
authorization: T extends "eip3009" ? z.infer<typeof ExactEvmPayloadAuthorizationSchema> : T extends "permit" ? z.infer<typeof PermitEvmPayloadAuthorizationSchema> : z.infer<typeof Permit2EvmPayloadAuthorizationSchema>;
|
|
506
|
+
};
|
|
507
|
+
};
|
|
508
|
+
type UnsignedEvmPaymentPayload<T extends "eip3009" | "permit" | "permit2"> = Omit<PaymentPayload, "payload"> & {
|
|
509
|
+
payload: {
|
|
510
|
+
authorizationType: T;
|
|
511
|
+
signature: undefined;
|
|
512
|
+
authorization: T extends "eip3009" ? z.infer<typeof ExactEvmPayloadAuthorizationSchema> : T extends "permit" ? Omit<z.infer<typeof PermitEvmPayloadAuthorizationSchema>, "nonce"> & {
|
|
513
|
+
nonce?: string;
|
|
514
|
+
} : Omit<z.infer<typeof Permit2EvmPayloadAuthorizationSchema>, "nonce"> & {
|
|
515
|
+
nonce?: string;
|
|
516
|
+
};
|
|
517
|
+
};
|
|
518
|
+
};
|
|
519
|
+
type Eip3009PaymentPayload = EvmPaymentPayload<"eip3009">;
|
|
520
|
+
type UnsignedEip3009PaymentPayload = UnsignedEvmPaymentPayload<"eip3009">;
|
|
521
|
+
type PermitPaymentPayload = EvmPaymentPayload<"permit">;
|
|
522
|
+
type UnsignedPermitPaymentPayload = UnsignedEvmPaymentPayload<"permit">;
|
|
523
|
+
type Permit2PaymentPayload = EvmPaymentPayload<"permit2">;
|
|
524
|
+
type UnsignedPermit2PaymentPayload = UnsignedEvmPaymentPayload<"permit2">;
|
|
525
|
+
declare const x402ResponseSchema: z.ZodObject<{
|
|
526
|
+
x402Version: z.ZodEffects<z.ZodNumber, number, number>;
|
|
527
|
+
error: z.ZodOptional<z.ZodEnum<["insufficient_funds", "invalid_exact_evm_payload_authorization_valid_after", "invalid_exact_evm_payload_authorization_valid_before", "invalid_exact_evm_payload_authorization_value", "invalid_exact_evm_payload_signature", "invalid_exact_evm_payload_recipient_mismatch", "invalid_exact_svm_payload_transaction", "invalid_exact_svm_payload_transaction_amount_mismatch", "invalid_exact_svm_payload_transaction_create_ata_instruction", "invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_payee", "invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_asset", "invalid_exact_svm_payload_transaction_instructions", "invalid_exact_svm_payload_transaction_instructions_length", "invalid_exact_svm_payload_transaction_instructions_compute_limit_instruction", "invalid_exact_svm_payload_transaction_instructions_compute_price_instruction", "invalid_exact_svm_payload_transaction_instructions_compute_price_instruction_too_high", "invalid_exact_svm_payload_transaction_instruction_not_spl_token_transfer_checked", "invalid_exact_svm_payload_transaction_instruction_not_token_2022_transfer_checked", "invalid_exact_svm_payload_transaction_not_a_transfer_instruction", "invalid_exact_svm_payload_transaction_receiver_ata_not_found", "invalid_exact_svm_payload_transaction_sender_ata_not_found", "invalid_exact_svm_payload_transaction_simulation_failed", "invalid_exact_svm_payload_transaction_transfer_to_incorrect_ata", "invalid_network", "invalid_payload", "invalid_payment_requirements", "invalid_scheme", "invalid_payment", "payment_expired", "unsupported_scheme", "invalid_x402_version", "invalid_transaction_state", "settle_exact_svm_block_height_exceeded", "settle_exact_svm_transaction_confirmation_timed_out", "unexpected_settle_error", "unexpected_verify_error", "unsupported_authorization_type", "invalid_authorization_type", "invalid_permit_signature", "invalid_permit2_signature", "invalid_permit2_witness_signature", "witness_recipient_mismatch", "permit_expired", "permit2_expired", "permit2_not_approved", "invalid_token_address", "invalid_spender_address", "token_mismatch", "insufficient_payment_amount", "insufficient_token_balance", "transaction_failed", "settlement_failed"]>>;
|
|
528
|
+
accepts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
529
|
+
scheme: z.ZodEnum<["exact"]>;
|
|
530
|
+
network: z.ZodEnum<["base-sepolia", "base", "avalanche-fuji", "avalanche", "iotex", "solana-devnet", "solana", "sei", "sei-testnet", "polygon", "polygon-amoy", "peaq", "bsc", "bsc-testnet"]>;
|
|
531
|
+
maxAmountRequired: z.ZodEffects<z.ZodString, string, string>;
|
|
532
|
+
resource: z.ZodString;
|
|
533
|
+
description: z.ZodString;
|
|
534
|
+
mimeType: z.ZodString;
|
|
535
|
+
outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
536
|
+
payTo: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
537
|
+
maxTimeoutSeconds: z.ZodNumber;
|
|
538
|
+
asset: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
539
|
+
paymentType: z.ZodOptional<z.ZodEnum<["eip3009", "permit", "permit2"]>>;
|
|
540
|
+
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
541
|
+
}, "strip", z.ZodTypeAny, {
|
|
542
|
+
scheme: "exact";
|
|
543
|
+
description: string;
|
|
544
|
+
asset: string;
|
|
545
|
+
maxAmountRequired: string;
|
|
546
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
547
|
+
resource: string;
|
|
548
|
+
mimeType: string;
|
|
549
|
+
payTo: string;
|
|
550
|
+
maxTimeoutSeconds: number;
|
|
551
|
+
outputSchema?: Record<string, any> | undefined;
|
|
552
|
+
paymentType?: "permit" | "eip3009" | "permit2" | undefined;
|
|
553
|
+
extra?: Record<string, any> | undefined;
|
|
554
|
+
}, {
|
|
555
|
+
scheme: "exact";
|
|
556
|
+
description: string;
|
|
557
|
+
asset: string;
|
|
558
|
+
maxAmountRequired: string;
|
|
559
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
560
|
+
resource: string;
|
|
561
|
+
mimeType: string;
|
|
562
|
+
payTo: string;
|
|
563
|
+
maxTimeoutSeconds: number;
|
|
564
|
+
outputSchema?: Record<string, any> | undefined;
|
|
565
|
+
paymentType?: "permit" | "eip3009" | "permit2" | undefined;
|
|
566
|
+
extra?: Record<string, any> | undefined;
|
|
567
|
+
}>, "many">>;
|
|
568
|
+
payer: z.ZodOptional<z.ZodString>;
|
|
569
|
+
}, "strip", z.ZodTypeAny, {
|
|
570
|
+
x402Version: number;
|
|
571
|
+
error?: "invalid_exact_svm_payload_transaction" | "insufficient_funds" | "invalid_exact_evm_payload_authorization_valid_after" | "invalid_exact_evm_payload_authorization_valid_before" | "invalid_exact_evm_payload_authorization_value" | "invalid_exact_evm_payload_signature" | "invalid_exact_evm_payload_recipient_mismatch" | "invalid_exact_svm_payload_transaction_amount_mismatch" | "invalid_exact_svm_payload_transaction_create_ata_instruction" | "invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_payee" | "invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_asset" | "invalid_exact_svm_payload_transaction_instructions" | "invalid_exact_svm_payload_transaction_instructions_length" | "invalid_exact_svm_payload_transaction_instructions_compute_limit_instruction" | "invalid_exact_svm_payload_transaction_instructions_compute_price_instruction" | "invalid_exact_svm_payload_transaction_instructions_compute_price_instruction_too_high" | "invalid_exact_svm_payload_transaction_instruction_not_spl_token_transfer_checked" | "invalid_exact_svm_payload_transaction_instruction_not_token_2022_transfer_checked" | "invalid_exact_svm_payload_transaction_not_a_transfer_instruction" | "invalid_exact_svm_payload_transaction_receiver_ata_not_found" | "invalid_exact_svm_payload_transaction_sender_ata_not_found" | "invalid_exact_svm_payload_transaction_simulation_failed" | "invalid_exact_svm_payload_transaction_transfer_to_incorrect_ata" | "invalid_network" | "invalid_payload" | "invalid_payment_requirements" | "invalid_scheme" | "invalid_payment" | "payment_expired" | "unsupported_scheme" | "invalid_x402_version" | "invalid_transaction_state" | "settle_exact_svm_block_height_exceeded" | "settle_exact_svm_transaction_confirmation_timed_out" | "unexpected_settle_error" | "unexpected_verify_error" | "unsupported_authorization_type" | "invalid_authorization_type" | "invalid_permit_signature" | "invalid_permit2_signature" | "invalid_permit2_witness_signature" | "witness_recipient_mismatch" | "permit_expired" | "permit2_expired" | "permit2_not_approved" | "invalid_token_address" | "invalid_spender_address" | "token_mismatch" | "insufficient_payment_amount" | "insufficient_token_balance" | "transaction_failed" | "settlement_failed" | undefined;
|
|
572
|
+
payer?: string | undefined;
|
|
573
|
+
accepts?: {
|
|
574
|
+
scheme: "exact";
|
|
575
|
+
description: string;
|
|
576
|
+
asset: string;
|
|
577
|
+
maxAmountRequired: string;
|
|
578
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
579
|
+
resource: string;
|
|
580
|
+
mimeType: string;
|
|
581
|
+
payTo: string;
|
|
582
|
+
maxTimeoutSeconds: number;
|
|
583
|
+
outputSchema?: Record<string, any> | undefined;
|
|
584
|
+
paymentType?: "permit" | "eip3009" | "permit2" | undefined;
|
|
585
|
+
extra?: Record<string, any> | undefined;
|
|
586
|
+
}[] | undefined;
|
|
587
|
+
}, {
|
|
588
|
+
x402Version: number;
|
|
589
|
+
error?: "invalid_exact_svm_payload_transaction" | "insufficient_funds" | "invalid_exact_evm_payload_authorization_valid_after" | "invalid_exact_evm_payload_authorization_valid_before" | "invalid_exact_evm_payload_authorization_value" | "invalid_exact_evm_payload_signature" | "invalid_exact_evm_payload_recipient_mismatch" | "invalid_exact_svm_payload_transaction_amount_mismatch" | "invalid_exact_svm_payload_transaction_create_ata_instruction" | "invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_payee" | "invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_asset" | "invalid_exact_svm_payload_transaction_instructions" | "invalid_exact_svm_payload_transaction_instructions_length" | "invalid_exact_svm_payload_transaction_instructions_compute_limit_instruction" | "invalid_exact_svm_payload_transaction_instructions_compute_price_instruction" | "invalid_exact_svm_payload_transaction_instructions_compute_price_instruction_too_high" | "invalid_exact_svm_payload_transaction_instruction_not_spl_token_transfer_checked" | "invalid_exact_svm_payload_transaction_instruction_not_token_2022_transfer_checked" | "invalid_exact_svm_payload_transaction_not_a_transfer_instruction" | "invalid_exact_svm_payload_transaction_receiver_ata_not_found" | "invalid_exact_svm_payload_transaction_sender_ata_not_found" | "invalid_exact_svm_payload_transaction_simulation_failed" | "invalid_exact_svm_payload_transaction_transfer_to_incorrect_ata" | "invalid_network" | "invalid_payload" | "invalid_payment_requirements" | "invalid_scheme" | "invalid_payment" | "payment_expired" | "unsupported_scheme" | "invalid_x402_version" | "invalid_transaction_state" | "settle_exact_svm_block_height_exceeded" | "settle_exact_svm_transaction_confirmation_timed_out" | "unexpected_settle_error" | "unexpected_verify_error" | "unsupported_authorization_type" | "invalid_authorization_type" | "invalid_permit_signature" | "invalid_permit2_signature" | "invalid_permit2_witness_signature" | "witness_recipient_mismatch" | "permit_expired" | "permit2_expired" | "permit2_not_approved" | "invalid_token_address" | "invalid_spender_address" | "token_mismatch" | "insufficient_payment_amount" | "insufficient_token_balance" | "transaction_failed" | "settlement_failed" | undefined;
|
|
590
|
+
payer?: string | undefined;
|
|
591
|
+
accepts?: {
|
|
592
|
+
scheme: "exact";
|
|
593
|
+
description: string;
|
|
594
|
+
asset: string;
|
|
595
|
+
maxAmountRequired: string;
|
|
596
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
597
|
+
resource: string;
|
|
598
|
+
mimeType: string;
|
|
599
|
+
payTo: string;
|
|
600
|
+
maxTimeoutSeconds: number;
|
|
601
|
+
outputSchema?: Record<string, any> | undefined;
|
|
602
|
+
paymentType?: "permit" | "eip3009" | "permit2" | undefined;
|
|
603
|
+
extra?: Record<string, any> | undefined;
|
|
604
|
+
}[] | undefined;
|
|
605
|
+
}>;
|
|
606
|
+
type x402Response = z.infer<typeof x402ResponseSchema>;
|
|
607
|
+
declare const HTTPVerbsSchema: z.ZodEnum<["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS", "HEAD"]>;
|
|
608
|
+
type HTTPVerbs = z.infer<typeof HTTPVerbsSchema>;
|
|
609
|
+
declare const HTTPRequestStructureSchema: z.ZodObject<{
|
|
610
|
+
type: z.ZodLiteral<"http">;
|
|
611
|
+
method: z.ZodEnum<["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS", "HEAD"]>;
|
|
612
|
+
queryParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
613
|
+
bodyType: z.ZodOptional<z.ZodEnum<["json", "form-data", "multipart-form-data", "text", "binary"]>>;
|
|
614
|
+
bodyFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
615
|
+
headerFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
616
|
+
}, "strip", z.ZodTypeAny, {
|
|
617
|
+
method: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | "OPTIONS" | "HEAD";
|
|
618
|
+
type: "http";
|
|
619
|
+
queryParams?: Record<string, string> | undefined;
|
|
620
|
+
bodyType?: "binary" | "json" | "form-data" | "multipart-form-data" | "text" | undefined;
|
|
621
|
+
bodyFields?: Record<string, any> | undefined;
|
|
622
|
+
headerFields?: Record<string, any> | undefined;
|
|
623
|
+
}, {
|
|
624
|
+
method: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | "OPTIONS" | "HEAD";
|
|
625
|
+
type: "http";
|
|
626
|
+
queryParams?: Record<string, string> | undefined;
|
|
627
|
+
bodyType?: "binary" | "json" | "form-data" | "multipart-form-data" | "text" | undefined;
|
|
628
|
+
bodyFields?: Record<string, any> | undefined;
|
|
629
|
+
headerFields?: Record<string, any> | undefined;
|
|
630
|
+
}>;
|
|
631
|
+
declare const RequestStructureSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
632
|
+
type: z.ZodLiteral<"http">;
|
|
633
|
+
method: z.ZodEnum<["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS", "HEAD"]>;
|
|
634
|
+
queryParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
635
|
+
bodyType: z.ZodOptional<z.ZodEnum<["json", "form-data", "multipart-form-data", "text", "binary"]>>;
|
|
636
|
+
bodyFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
637
|
+
headerFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
638
|
+
}, "strip", z.ZodTypeAny, {
|
|
639
|
+
method: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | "OPTIONS" | "HEAD";
|
|
640
|
+
type: "http";
|
|
641
|
+
queryParams?: Record<string, string> | undefined;
|
|
642
|
+
bodyType?: "binary" | "json" | "form-data" | "multipart-form-data" | "text" | undefined;
|
|
643
|
+
bodyFields?: Record<string, any> | undefined;
|
|
644
|
+
headerFields?: Record<string, any> | undefined;
|
|
645
|
+
}, {
|
|
646
|
+
method: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | "OPTIONS" | "HEAD";
|
|
647
|
+
type: "http";
|
|
648
|
+
queryParams?: Record<string, string> | undefined;
|
|
649
|
+
bodyType?: "binary" | "json" | "form-data" | "multipart-form-data" | "text" | undefined;
|
|
650
|
+
bodyFields?: Record<string, any> | undefined;
|
|
651
|
+
headerFields?: Record<string, any> | undefined;
|
|
652
|
+
}>]>;
|
|
653
|
+
type HTTPRequestStructure = z.infer<typeof HTTPRequestStructureSchema>;
|
|
654
|
+
type RequestStructure = z.infer<typeof RequestStructureSchema>;
|
|
655
|
+
declare const DiscoveredResourceSchema: z.ZodObject<{
|
|
656
|
+
resource: z.ZodString;
|
|
657
|
+
type: z.ZodEnum<["http"]>;
|
|
658
|
+
x402Version: z.ZodEffects<z.ZodNumber, number, number>;
|
|
659
|
+
accepts: z.ZodArray<z.ZodObject<{
|
|
660
|
+
scheme: z.ZodEnum<["exact"]>;
|
|
661
|
+
network: z.ZodEnum<["base-sepolia", "base", "avalanche-fuji", "avalanche", "iotex", "solana-devnet", "solana", "sei", "sei-testnet", "polygon", "polygon-amoy", "peaq", "bsc", "bsc-testnet"]>;
|
|
662
|
+
maxAmountRequired: z.ZodEffects<z.ZodString, string, string>;
|
|
663
|
+
resource: z.ZodString;
|
|
664
|
+
description: z.ZodString;
|
|
665
|
+
mimeType: z.ZodString;
|
|
666
|
+
outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
667
|
+
payTo: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
668
|
+
maxTimeoutSeconds: z.ZodNumber;
|
|
669
|
+
asset: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
670
|
+
paymentType: z.ZodOptional<z.ZodEnum<["eip3009", "permit", "permit2"]>>;
|
|
671
|
+
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
672
|
+
}, "strip", z.ZodTypeAny, {
|
|
673
|
+
scheme: "exact";
|
|
674
|
+
description: string;
|
|
675
|
+
asset: string;
|
|
676
|
+
maxAmountRequired: string;
|
|
677
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
678
|
+
resource: string;
|
|
679
|
+
mimeType: string;
|
|
680
|
+
payTo: string;
|
|
681
|
+
maxTimeoutSeconds: number;
|
|
682
|
+
outputSchema?: Record<string, any> | undefined;
|
|
683
|
+
paymentType?: "permit" | "eip3009" | "permit2" | undefined;
|
|
684
|
+
extra?: Record<string, any> | undefined;
|
|
685
|
+
}, {
|
|
686
|
+
scheme: "exact";
|
|
687
|
+
description: string;
|
|
688
|
+
asset: string;
|
|
689
|
+
maxAmountRequired: string;
|
|
690
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
691
|
+
resource: string;
|
|
692
|
+
mimeType: string;
|
|
693
|
+
payTo: string;
|
|
694
|
+
maxTimeoutSeconds: number;
|
|
695
|
+
outputSchema?: Record<string, any> | undefined;
|
|
696
|
+
paymentType?: "permit" | "eip3009" | "permit2" | undefined;
|
|
697
|
+
extra?: Record<string, any> | undefined;
|
|
698
|
+
}>, "many">;
|
|
699
|
+
lastUpdated: z.ZodDate;
|
|
700
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
701
|
+
}, "strip", z.ZodTypeAny, {
|
|
702
|
+
type: "http";
|
|
703
|
+
resource: string;
|
|
704
|
+
x402Version: number;
|
|
705
|
+
accepts: {
|
|
706
|
+
scheme: "exact";
|
|
707
|
+
description: string;
|
|
708
|
+
asset: string;
|
|
709
|
+
maxAmountRequired: string;
|
|
710
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
711
|
+
resource: string;
|
|
712
|
+
mimeType: string;
|
|
713
|
+
payTo: string;
|
|
714
|
+
maxTimeoutSeconds: number;
|
|
715
|
+
outputSchema?: Record<string, any> | undefined;
|
|
716
|
+
paymentType?: "permit" | "eip3009" | "permit2" | undefined;
|
|
717
|
+
extra?: Record<string, any> | undefined;
|
|
718
|
+
}[];
|
|
719
|
+
lastUpdated: Date;
|
|
720
|
+
metadata?: Record<string, any> | undefined;
|
|
721
|
+
}, {
|
|
722
|
+
type: "http";
|
|
723
|
+
resource: string;
|
|
724
|
+
x402Version: number;
|
|
725
|
+
accepts: {
|
|
726
|
+
scheme: "exact";
|
|
727
|
+
description: string;
|
|
728
|
+
asset: string;
|
|
729
|
+
maxAmountRequired: string;
|
|
730
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
731
|
+
resource: string;
|
|
732
|
+
mimeType: string;
|
|
733
|
+
payTo: string;
|
|
734
|
+
maxTimeoutSeconds: number;
|
|
735
|
+
outputSchema?: Record<string, any> | undefined;
|
|
736
|
+
paymentType?: "permit" | "eip3009" | "permit2" | undefined;
|
|
737
|
+
extra?: Record<string, any> | undefined;
|
|
738
|
+
}[];
|
|
739
|
+
lastUpdated: Date;
|
|
740
|
+
metadata?: Record<string, any> | undefined;
|
|
741
|
+
}>;
|
|
742
|
+
type DiscoveredResource = z.infer<typeof DiscoveredResourceSchema>;
|
|
743
|
+
declare const SettleRequestSchema: z.ZodObject<{
|
|
744
|
+
paymentPayload: z.ZodObject<{
|
|
745
|
+
x402Version: z.ZodEffects<z.ZodNumber, number, number>;
|
|
746
|
+
scheme: z.ZodEnum<["exact"]>;
|
|
747
|
+
network: z.ZodEnum<["base-sepolia", "base", "avalanche-fuji", "avalanche", "iotex", "solana-devnet", "solana", "sei", "sei-testnet", "polygon", "polygon-amoy", "peaq", "bsc", "bsc-testnet"]>;
|
|
748
|
+
payload: z.ZodUnion<[z.ZodDiscriminatedUnion<"authorizationType", [z.ZodObject<{
|
|
749
|
+
authorizationType: z.ZodLiteral<"eip3009">;
|
|
750
|
+
signature: z.ZodString;
|
|
751
|
+
authorization: z.ZodObject<{
|
|
752
|
+
from: z.ZodString;
|
|
753
|
+
to: z.ZodString;
|
|
754
|
+
value: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
755
|
+
validAfter: z.ZodEffects<z.ZodString, string, string>;
|
|
756
|
+
validBefore: z.ZodEffects<z.ZodString, string, string>;
|
|
757
|
+
nonce: z.ZodString;
|
|
758
|
+
}, "strip", z.ZodTypeAny, {
|
|
759
|
+
from: string;
|
|
760
|
+
to: string;
|
|
761
|
+
value: string;
|
|
762
|
+
validAfter: string;
|
|
763
|
+
validBefore: string;
|
|
764
|
+
nonce: string;
|
|
765
|
+
}, {
|
|
766
|
+
from: string;
|
|
767
|
+
to: string;
|
|
768
|
+
value: string;
|
|
769
|
+
validAfter: string;
|
|
770
|
+
validBefore: string;
|
|
771
|
+
nonce: string;
|
|
772
|
+
}>;
|
|
773
|
+
}, "strip", z.ZodTypeAny, {
|
|
774
|
+
signature: string;
|
|
775
|
+
authorization: {
|
|
776
|
+
from: string;
|
|
777
|
+
to: string;
|
|
778
|
+
value: string;
|
|
779
|
+
validAfter: string;
|
|
780
|
+
validBefore: string;
|
|
781
|
+
nonce: string;
|
|
782
|
+
};
|
|
783
|
+
authorizationType: "eip3009";
|
|
784
|
+
}, {
|
|
785
|
+
signature: string;
|
|
786
|
+
authorization: {
|
|
787
|
+
from: string;
|
|
788
|
+
to: string;
|
|
789
|
+
value: string;
|
|
790
|
+
validAfter: string;
|
|
791
|
+
validBefore: string;
|
|
792
|
+
nonce: string;
|
|
793
|
+
};
|
|
794
|
+
authorizationType: "eip3009";
|
|
795
|
+
}>, z.ZodObject<{
|
|
796
|
+
authorizationType: z.ZodLiteral<"permit">;
|
|
797
|
+
signature: z.ZodString;
|
|
798
|
+
authorization: z.ZodObject<{
|
|
799
|
+
owner: z.ZodString;
|
|
800
|
+
spender: z.ZodString;
|
|
801
|
+
value: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
802
|
+
deadline: z.ZodEffects<z.ZodString, string, string>;
|
|
803
|
+
nonce: z.ZodEffects<z.ZodString, string, string>;
|
|
804
|
+
}, "strip", z.ZodTypeAny, {
|
|
805
|
+
value: string;
|
|
806
|
+
nonce: string;
|
|
807
|
+
owner: string;
|
|
808
|
+
spender: string;
|
|
809
|
+
deadline: string;
|
|
810
|
+
}, {
|
|
811
|
+
value: string;
|
|
812
|
+
nonce: string;
|
|
813
|
+
owner: string;
|
|
814
|
+
spender: string;
|
|
815
|
+
deadline: string;
|
|
816
|
+
}>;
|
|
817
|
+
}, "strip", z.ZodTypeAny, {
|
|
818
|
+
signature: string;
|
|
819
|
+
authorization: {
|
|
820
|
+
value: string;
|
|
821
|
+
nonce: string;
|
|
822
|
+
owner: string;
|
|
823
|
+
spender: string;
|
|
824
|
+
deadline: string;
|
|
825
|
+
};
|
|
826
|
+
authorizationType: "permit";
|
|
827
|
+
}, {
|
|
828
|
+
signature: string;
|
|
829
|
+
authorization: {
|
|
830
|
+
value: string;
|
|
831
|
+
nonce: string;
|
|
832
|
+
owner: string;
|
|
833
|
+
spender: string;
|
|
834
|
+
deadline: string;
|
|
835
|
+
};
|
|
836
|
+
authorizationType: "permit";
|
|
837
|
+
}>, z.ZodObject<{
|
|
838
|
+
authorizationType: z.ZodLiteral<"permit2">;
|
|
839
|
+
signature: z.ZodString;
|
|
840
|
+
authorization: z.ZodObject<{
|
|
841
|
+
owner: z.ZodString;
|
|
842
|
+
spender: z.ZodString;
|
|
843
|
+
token: z.ZodString;
|
|
844
|
+
amount: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
845
|
+
deadline: z.ZodEffects<z.ZodString, string, string>;
|
|
846
|
+
nonce: z.ZodEffects<z.ZodString, string, string>;
|
|
847
|
+
to: z.ZodOptional<z.ZodString>;
|
|
848
|
+
}, "strip", z.ZodTypeAny, {
|
|
849
|
+
nonce: string;
|
|
850
|
+
owner: string;
|
|
851
|
+
spender: string;
|
|
852
|
+
deadline: string;
|
|
853
|
+
amount: string;
|
|
854
|
+
token: string;
|
|
855
|
+
to?: string | undefined;
|
|
856
|
+
}, {
|
|
857
|
+
nonce: string;
|
|
858
|
+
owner: string;
|
|
859
|
+
spender: string;
|
|
860
|
+
deadline: string;
|
|
861
|
+
amount: string;
|
|
862
|
+
token: string;
|
|
863
|
+
to?: string | undefined;
|
|
864
|
+
}>;
|
|
865
|
+
}, "strip", z.ZodTypeAny, {
|
|
866
|
+
signature: string;
|
|
867
|
+
authorization: {
|
|
868
|
+
nonce: string;
|
|
869
|
+
owner: string;
|
|
870
|
+
spender: string;
|
|
871
|
+
deadline: string;
|
|
872
|
+
amount: string;
|
|
873
|
+
token: string;
|
|
874
|
+
to?: string | undefined;
|
|
875
|
+
};
|
|
876
|
+
authorizationType: "permit2";
|
|
877
|
+
}, {
|
|
878
|
+
signature: string;
|
|
879
|
+
authorization: {
|
|
880
|
+
nonce: string;
|
|
881
|
+
owner: string;
|
|
882
|
+
spender: string;
|
|
883
|
+
deadline: string;
|
|
884
|
+
amount: string;
|
|
885
|
+
token: string;
|
|
886
|
+
to?: string | undefined;
|
|
887
|
+
};
|
|
888
|
+
authorizationType: "permit2";
|
|
889
|
+
}>]>, z.ZodObject<{
|
|
890
|
+
transaction: z.ZodString;
|
|
891
|
+
}, "strip", z.ZodTypeAny, {
|
|
892
|
+
transaction: string;
|
|
893
|
+
}, {
|
|
894
|
+
transaction: string;
|
|
895
|
+
}>]>;
|
|
896
|
+
}, "strip", z.ZodTypeAny, {
|
|
897
|
+
scheme: "exact";
|
|
898
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
899
|
+
x402Version: number;
|
|
900
|
+
payload: {
|
|
901
|
+
signature: string;
|
|
902
|
+
authorization: {
|
|
903
|
+
from: string;
|
|
904
|
+
to: string;
|
|
905
|
+
value: string;
|
|
906
|
+
validAfter: string;
|
|
907
|
+
validBefore: string;
|
|
908
|
+
nonce: string;
|
|
909
|
+
};
|
|
910
|
+
authorizationType: "eip3009";
|
|
911
|
+
} | {
|
|
912
|
+
signature: string;
|
|
913
|
+
authorization: {
|
|
914
|
+
value: string;
|
|
915
|
+
nonce: string;
|
|
916
|
+
owner: string;
|
|
917
|
+
spender: string;
|
|
918
|
+
deadline: string;
|
|
919
|
+
};
|
|
920
|
+
authorizationType: "permit";
|
|
921
|
+
} | {
|
|
922
|
+
signature: string;
|
|
923
|
+
authorization: {
|
|
924
|
+
nonce: string;
|
|
925
|
+
owner: string;
|
|
926
|
+
spender: string;
|
|
927
|
+
deadline: string;
|
|
928
|
+
amount: string;
|
|
929
|
+
token: string;
|
|
930
|
+
to?: string | undefined;
|
|
931
|
+
};
|
|
932
|
+
authorizationType: "permit2";
|
|
933
|
+
} | {
|
|
934
|
+
transaction: string;
|
|
935
|
+
};
|
|
936
|
+
}, {
|
|
937
|
+
scheme: "exact";
|
|
938
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
939
|
+
x402Version: number;
|
|
940
|
+
payload: {
|
|
941
|
+
signature: string;
|
|
942
|
+
authorization: {
|
|
943
|
+
from: string;
|
|
944
|
+
to: string;
|
|
945
|
+
value: string;
|
|
946
|
+
validAfter: string;
|
|
947
|
+
validBefore: string;
|
|
948
|
+
nonce: string;
|
|
949
|
+
};
|
|
950
|
+
authorizationType: "eip3009";
|
|
951
|
+
} | {
|
|
952
|
+
signature: string;
|
|
953
|
+
authorization: {
|
|
954
|
+
value: string;
|
|
955
|
+
nonce: string;
|
|
956
|
+
owner: string;
|
|
957
|
+
spender: string;
|
|
958
|
+
deadline: string;
|
|
959
|
+
};
|
|
960
|
+
authorizationType: "permit";
|
|
961
|
+
} | {
|
|
962
|
+
signature: string;
|
|
963
|
+
authorization: {
|
|
964
|
+
nonce: string;
|
|
965
|
+
owner: string;
|
|
966
|
+
spender: string;
|
|
967
|
+
deadline: string;
|
|
968
|
+
amount: string;
|
|
969
|
+
token: string;
|
|
970
|
+
to?: string | undefined;
|
|
971
|
+
};
|
|
972
|
+
authorizationType: "permit2";
|
|
973
|
+
} | {
|
|
974
|
+
transaction: string;
|
|
975
|
+
};
|
|
976
|
+
}>;
|
|
977
|
+
paymentRequirements: z.ZodObject<{
|
|
978
|
+
scheme: z.ZodEnum<["exact"]>;
|
|
979
|
+
network: z.ZodEnum<["base-sepolia", "base", "avalanche-fuji", "avalanche", "iotex", "solana-devnet", "solana", "sei", "sei-testnet", "polygon", "polygon-amoy", "peaq", "bsc", "bsc-testnet"]>;
|
|
980
|
+
maxAmountRequired: z.ZodEffects<z.ZodString, string, string>;
|
|
981
|
+
resource: z.ZodString;
|
|
982
|
+
description: z.ZodString;
|
|
983
|
+
mimeType: z.ZodString;
|
|
984
|
+
outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
985
|
+
payTo: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
986
|
+
maxTimeoutSeconds: z.ZodNumber;
|
|
987
|
+
asset: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
988
|
+
paymentType: z.ZodOptional<z.ZodEnum<["eip3009", "permit", "permit2"]>>;
|
|
989
|
+
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
990
|
+
}, "strip", z.ZodTypeAny, {
|
|
991
|
+
scheme: "exact";
|
|
992
|
+
description: string;
|
|
993
|
+
asset: string;
|
|
994
|
+
maxAmountRequired: string;
|
|
995
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
996
|
+
resource: string;
|
|
997
|
+
mimeType: string;
|
|
998
|
+
payTo: string;
|
|
999
|
+
maxTimeoutSeconds: number;
|
|
1000
|
+
outputSchema?: Record<string, any> | undefined;
|
|
1001
|
+
paymentType?: "permit" | "eip3009" | "permit2" | undefined;
|
|
1002
|
+
extra?: Record<string, any> | undefined;
|
|
1003
|
+
}, {
|
|
1004
|
+
scheme: "exact";
|
|
1005
|
+
description: string;
|
|
1006
|
+
asset: string;
|
|
1007
|
+
maxAmountRequired: string;
|
|
1008
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
1009
|
+
resource: string;
|
|
1010
|
+
mimeType: string;
|
|
1011
|
+
payTo: string;
|
|
1012
|
+
maxTimeoutSeconds: number;
|
|
1013
|
+
outputSchema?: Record<string, any> | undefined;
|
|
1014
|
+
paymentType?: "permit" | "eip3009" | "permit2" | undefined;
|
|
1015
|
+
extra?: Record<string, any> | undefined;
|
|
1016
|
+
}>;
|
|
1017
|
+
}, "strip", z.ZodTypeAny, {
|
|
1018
|
+
paymentPayload: {
|
|
1019
|
+
scheme: "exact";
|
|
1020
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
1021
|
+
x402Version: number;
|
|
1022
|
+
payload: {
|
|
1023
|
+
signature: string;
|
|
1024
|
+
authorization: {
|
|
1025
|
+
from: string;
|
|
1026
|
+
to: string;
|
|
1027
|
+
value: string;
|
|
1028
|
+
validAfter: string;
|
|
1029
|
+
validBefore: string;
|
|
1030
|
+
nonce: string;
|
|
1031
|
+
};
|
|
1032
|
+
authorizationType: "eip3009";
|
|
1033
|
+
} | {
|
|
1034
|
+
signature: string;
|
|
1035
|
+
authorization: {
|
|
1036
|
+
value: string;
|
|
1037
|
+
nonce: string;
|
|
1038
|
+
owner: string;
|
|
1039
|
+
spender: string;
|
|
1040
|
+
deadline: string;
|
|
1041
|
+
};
|
|
1042
|
+
authorizationType: "permit";
|
|
1043
|
+
} | {
|
|
1044
|
+
signature: string;
|
|
1045
|
+
authorization: {
|
|
1046
|
+
nonce: string;
|
|
1047
|
+
owner: string;
|
|
1048
|
+
spender: string;
|
|
1049
|
+
deadline: string;
|
|
1050
|
+
amount: string;
|
|
1051
|
+
token: string;
|
|
1052
|
+
to?: string | undefined;
|
|
1053
|
+
};
|
|
1054
|
+
authorizationType: "permit2";
|
|
1055
|
+
} | {
|
|
1056
|
+
transaction: string;
|
|
1057
|
+
};
|
|
1058
|
+
};
|
|
1059
|
+
paymentRequirements: {
|
|
1060
|
+
scheme: "exact";
|
|
1061
|
+
description: string;
|
|
1062
|
+
asset: string;
|
|
1063
|
+
maxAmountRequired: string;
|
|
1064
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
1065
|
+
resource: string;
|
|
1066
|
+
mimeType: string;
|
|
1067
|
+
payTo: string;
|
|
1068
|
+
maxTimeoutSeconds: number;
|
|
1069
|
+
outputSchema?: Record<string, any> | undefined;
|
|
1070
|
+
paymentType?: "permit" | "eip3009" | "permit2" | undefined;
|
|
1071
|
+
extra?: Record<string, any> | undefined;
|
|
1072
|
+
};
|
|
1073
|
+
}, {
|
|
1074
|
+
paymentPayload: {
|
|
1075
|
+
scheme: "exact";
|
|
1076
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
1077
|
+
x402Version: number;
|
|
1078
|
+
payload: {
|
|
1079
|
+
signature: string;
|
|
1080
|
+
authorization: {
|
|
1081
|
+
from: string;
|
|
1082
|
+
to: string;
|
|
1083
|
+
value: string;
|
|
1084
|
+
validAfter: string;
|
|
1085
|
+
validBefore: string;
|
|
1086
|
+
nonce: string;
|
|
1087
|
+
};
|
|
1088
|
+
authorizationType: "eip3009";
|
|
1089
|
+
} | {
|
|
1090
|
+
signature: string;
|
|
1091
|
+
authorization: {
|
|
1092
|
+
value: string;
|
|
1093
|
+
nonce: string;
|
|
1094
|
+
owner: string;
|
|
1095
|
+
spender: string;
|
|
1096
|
+
deadline: string;
|
|
1097
|
+
};
|
|
1098
|
+
authorizationType: "permit";
|
|
1099
|
+
} | {
|
|
1100
|
+
signature: string;
|
|
1101
|
+
authorization: {
|
|
1102
|
+
nonce: string;
|
|
1103
|
+
owner: string;
|
|
1104
|
+
spender: string;
|
|
1105
|
+
deadline: string;
|
|
1106
|
+
amount: string;
|
|
1107
|
+
token: string;
|
|
1108
|
+
to?: string | undefined;
|
|
1109
|
+
};
|
|
1110
|
+
authorizationType: "permit2";
|
|
1111
|
+
} | {
|
|
1112
|
+
transaction: string;
|
|
1113
|
+
};
|
|
1114
|
+
};
|
|
1115
|
+
paymentRequirements: {
|
|
1116
|
+
scheme: "exact";
|
|
1117
|
+
description: string;
|
|
1118
|
+
asset: string;
|
|
1119
|
+
maxAmountRequired: string;
|
|
1120
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
1121
|
+
resource: string;
|
|
1122
|
+
mimeType: string;
|
|
1123
|
+
payTo: string;
|
|
1124
|
+
maxTimeoutSeconds: number;
|
|
1125
|
+
outputSchema?: Record<string, any> | undefined;
|
|
1126
|
+
paymentType?: "permit" | "eip3009" | "permit2" | undefined;
|
|
1127
|
+
extra?: Record<string, any> | undefined;
|
|
1128
|
+
};
|
|
1129
|
+
}>;
|
|
1130
|
+
type SettleRequest = z.infer<typeof SettleRequestSchema>;
|
|
1131
|
+
declare const VerifyRequestSchema: z.ZodObject<{
|
|
1132
|
+
paymentPayload: z.ZodObject<{
|
|
1133
|
+
x402Version: z.ZodEffects<z.ZodNumber, number, number>;
|
|
1134
|
+
scheme: z.ZodEnum<["exact"]>;
|
|
1135
|
+
network: z.ZodEnum<["base-sepolia", "base", "avalanche-fuji", "avalanche", "iotex", "solana-devnet", "solana", "sei", "sei-testnet", "polygon", "polygon-amoy", "peaq", "bsc", "bsc-testnet"]>;
|
|
1136
|
+
payload: z.ZodUnion<[z.ZodDiscriminatedUnion<"authorizationType", [z.ZodObject<{
|
|
1137
|
+
authorizationType: z.ZodLiteral<"eip3009">;
|
|
1138
|
+
signature: z.ZodString;
|
|
1139
|
+
authorization: z.ZodObject<{
|
|
1140
|
+
from: z.ZodString;
|
|
1141
|
+
to: z.ZodString;
|
|
1142
|
+
value: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
1143
|
+
validAfter: z.ZodEffects<z.ZodString, string, string>;
|
|
1144
|
+
validBefore: z.ZodEffects<z.ZodString, string, string>;
|
|
1145
|
+
nonce: z.ZodString;
|
|
1146
|
+
}, "strip", z.ZodTypeAny, {
|
|
1147
|
+
from: string;
|
|
1148
|
+
to: string;
|
|
1149
|
+
value: string;
|
|
1150
|
+
validAfter: string;
|
|
1151
|
+
validBefore: string;
|
|
1152
|
+
nonce: string;
|
|
1153
|
+
}, {
|
|
1154
|
+
from: string;
|
|
1155
|
+
to: string;
|
|
1156
|
+
value: string;
|
|
1157
|
+
validAfter: string;
|
|
1158
|
+
validBefore: string;
|
|
1159
|
+
nonce: string;
|
|
1160
|
+
}>;
|
|
1161
|
+
}, "strip", z.ZodTypeAny, {
|
|
1162
|
+
signature: string;
|
|
1163
|
+
authorization: {
|
|
1164
|
+
from: string;
|
|
1165
|
+
to: string;
|
|
1166
|
+
value: string;
|
|
1167
|
+
validAfter: string;
|
|
1168
|
+
validBefore: string;
|
|
1169
|
+
nonce: string;
|
|
1170
|
+
};
|
|
1171
|
+
authorizationType: "eip3009";
|
|
1172
|
+
}, {
|
|
1173
|
+
signature: string;
|
|
1174
|
+
authorization: {
|
|
1175
|
+
from: string;
|
|
1176
|
+
to: string;
|
|
1177
|
+
value: string;
|
|
1178
|
+
validAfter: string;
|
|
1179
|
+
validBefore: string;
|
|
1180
|
+
nonce: string;
|
|
1181
|
+
};
|
|
1182
|
+
authorizationType: "eip3009";
|
|
1183
|
+
}>, z.ZodObject<{
|
|
1184
|
+
authorizationType: z.ZodLiteral<"permit">;
|
|
1185
|
+
signature: z.ZodString;
|
|
1186
|
+
authorization: z.ZodObject<{
|
|
1187
|
+
owner: z.ZodString;
|
|
1188
|
+
spender: z.ZodString;
|
|
1189
|
+
value: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
1190
|
+
deadline: z.ZodEffects<z.ZodString, string, string>;
|
|
1191
|
+
nonce: z.ZodEffects<z.ZodString, string, string>;
|
|
1192
|
+
}, "strip", z.ZodTypeAny, {
|
|
1193
|
+
value: string;
|
|
1194
|
+
nonce: string;
|
|
1195
|
+
owner: string;
|
|
1196
|
+
spender: string;
|
|
1197
|
+
deadline: string;
|
|
1198
|
+
}, {
|
|
1199
|
+
value: string;
|
|
1200
|
+
nonce: string;
|
|
1201
|
+
owner: string;
|
|
1202
|
+
spender: string;
|
|
1203
|
+
deadline: string;
|
|
1204
|
+
}>;
|
|
1205
|
+
}, "strip", z.ZodTypeAny, {
|
|
1206
|
+
signature: string;
|
|
1207
|
+
authorization: {
|
|
1208
|
+
value: string;
|
|
1209
|
+
nonce: string;
|
|
1210
|
+
owner: string;
|
|
1211
|
+
spender: string;
|
|
1212
|
+
deadline: string;
|
|
1213
|
+
};
|
|
1214
|
+
authorizationType: "permit";
|
|
1215
|
+
}, {
|
|
1216
|
+
signature: string;
|
|
1217
|
+
authorization: {
|
|
1218
|
+
value: string;
|
|
1219
|
+
nonce: string;
|
|
1220
|
+
owner: string;
|
|
1221
|
+
spender: string;
|
|
1222
|
+
deadline: string;
|
|
1223
|
+
};
|
|
1224
|
+
authorizationType: "permit";
|
|
1225
|
+
}>, z.ZodObject<{
|
|
1226
|
+
authorizationType: z.ZodLiteral<"permit2">;
|
|
1227
|
+
signature: z.ZodString;
|
|
1228
|
+
authorization: z.ZodObject<{
|
|
1229
|
+
owner: z.ZodString;
|
|
1230
|
+
spender: z.ZodString;
|
|
1231
|
+
token: z.ZodString;
|
|
1232
|
+
amount: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
1233
|
+
deadline: z.ZodEffects<z.ZodString, string, string>;
|
|
1234
|
+
nonce: z.ZodEffects<z.ZodString, string, string>;
|
|
1235
|
+
to: z.ZodOptional<z.ZodString>;
|
|
1236
|
+
}, "strip", z.ZodTypeAny, {
|
|
1237
|
+
nonce: string;
|
|
1238
|
+
owner: string;
|
|
1239
|
+
spender: string;
|
|
1240
|
+
deadline: string;
|
|
1241
|
+
amount: string;
|
|
1242
|
+
token: string;
|
|
1243
|
+
to?: string | undefined;
|
|
1244
|
+
}, {
|
|
1245
|
+
nonce: string;
|
|
1246
|
+
owner: string;
|
|
1247
|
+
spender: string;
|
|
1248
|
+
deadline: string;
|
|
1249
|
+
amount: string;
|
|
1250
|
+
token: string;
|
|
1251
|
+
to?: string | undefined;
|
|
1252
|
+
}>;
|
|
1253
|
+
}, "strip", z.ZodTypeAny, {
|
|
1254
|
+
signature: string;
|
|
1255
|
+
authorization: {
|
|
1256
|
+
nonce: string;
|
|
1257
|
+
owner: string;
|
|
1258
|
+
spender: string;
|
|
1259
|
+
deadline: string;
|
|
1260
|
+
amount: string;
|
|
1261
|
+
token: string;
|
|
1262
|
+
to?: string | undefined;
|
|
1263
|
+
};
|
|
1264
|
+
authorizationType: "permit2";
|
|
1265
|
+
}, {
|
|
1266
|
+
signature: string;
|
|
1267
|
+
authorization: {
|
|
1268
|
+
nonce: string;
|
|
1269
|
+
owner: string;
|
|
1270
|
+
spender: string;
|
|
1271
|
+
deadline: string;
|
|
1272
|
+
amount: string;
|
|
1273
|
+
token: string;
|
|
1274
|
+
to?: string | undefined;
|
|
1275
|
+
};
|
|
1276
|
+
authorizationType: "permit2";
|
|
1277
|
+
}>]>, z.ZodObject<{
|
|
1278
|
+
transaction: z.ZodString;
|
|
1279
|
+
}, "strip", z.ZodTypeAny, {
|
|
1280
|
+
transaction: string;
|
|
1281
|
+
}, {
|
|
1282
|
+
transaction: string;
|
|
1283
|
+
}>]>;
|
|
1284
|
+
}, "strip", z.ZodTypeAny, {
|
|
1285
|
+
scheme: "exact";
|
|
1286
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
1287
|
+
x402Version: number;
|
|
1288
|
+
payload: {
|
|
1289
|
+
signature: string;
|
|
1290
|
+
authorization: {
|
|
1291
|
+
from: string;
|
|
1292
|
+
to: string;
|
|
1293
|
+
value: string;
|
|
1294
|
+
validAfter: string;
|
|
1295
|
+
validBefore: string;
|
|
1296
|
+
nonce: string;
|
|
1297
|
+
};
|
|
1298
|
+
authorizationType: "eip3009";
|
|
1299
|
+
} | {
|
|
1300
|
+
signature: string;
|
|
1301
|
+
authorization: {
|
|
1302
|
+
value: string;
|
|
1303
|
+
nonce: string;
|
|
1304
|
+
owner: string;
|
|
1305
|
+
spender: string;
|
|
1306
|
+
deadline: string;
|
|
1307
|
+
};
|
|
1308
|
+
authorizationType: "permit";
|
|
1309
|
+
} | {
|
|
1310
|
+
signature: string;
|
|
1311
|
+
authorization: {
|
|
1312
|
+
nonce: string;
|
|
1313
|
+
owner: string;
|
|
1314
|
+
spender: string;
|
|
1315
|
+
deadline: string;
|
|
1316
|
+
amount: string;
|
|
1317
|
+
token: string;
|
|
1318
|
+
to?: string | undefined;
|
|
1319
|
+
};
|
|
1320
|
+
authorizationType: "permit2";
|
|
1321
|
+
} | {
|
|
1322
|
+
transaction: string;
|
|
1323
|
+
};
|
|
1324
|
+
}, {
|
|
1325
|
+
scheme: "exact";
|
|
1326
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
1327
|
+
x402Version: number;
|
|
1328
|
+
payload: {
|
|
1329
|
+
signature: string;
|
|
1330
|
+
authorization: {
|
|
1331
|
+
from: string;
|
|
1332
|
+
to: string;
|
|
1333
|
+
value: string;
|
|
1334
|
+
validAfter: string;
|
|
1335
|
+
validBefore: string;
|
|
1336
|
+
nonce: string;
|
|
1337
|
+
};
|
|
1338
|
+
authorizationType: "eip3009";
|
|
1339
|
+
} | {
|
|
1340
|
+
signature: string;
|
|
1341
|
+
authorization: {
|
|
1342
|
+
value: string;
|
|
1343
|
+
nonce: string;
|
|
1344
|
+
owner: string;
|
|
1345
|
+
spender: string;
|
|
1346
|
+
deadline: string;
|
|
1347
|
+
};
|
|
1348
|
+
authorizationType: "permit";
|
|
1349
|
+
} | {
|
|
1350
|
+
signature: string;
|
|
1351
|
+
authorization: {
|
|
1352
|
+
nonce: string;
|
|
1353
|
+
owner: string;
|
|
1354
|
+
spender: string;
|
|
1355
|
+
deadline: string;
|
|
1356
|
+
amount: string;
|
|
1357
|
+
token: string;
|
|
1358
|
+
to?: string | undefined;
|
|
1359
|
+
};
|
|
1360
|
+
authorizationType: "permit2";
|
|
1361
|
+
} | {
|
|
1362
|
+
transaction: string;
|
|
1363
|
+
};
|
|
1364
|
+
}>;
|
|
1365
|
+
paymentRequirements: z.ZodObject<{
|
|
1366
|
+
scheme: z.ZodEnum<["exact"]>;
|
|
1367
|
+
network: z.ZodEnum<["base-sepolia", "base", "avalanche-fuji", "avalanche", "iotex", "solana-devnet", "solana", "sei", "sei-testnet", "polygon", "polygon-amoy", "peaq", "bsc", "bsc-testnet"]>;
|
|
1368
|
+
maxAmountRequired: z.ZodEffects<z.ZodString, string, string>;
|
|
1369
|
+
resource: z.ZodString;
|
|
1370
|
+
description: z.ZodString;
|
|
1371
|
+
mimeType: z.ZodString;
|
|
1372
|
+
outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1373
|
+
payTo: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
1374
|
+
maxTimeoutSeconds: z.ZodNumber;
|
|
1375
|
+
asset: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
1376
|
+
paymentType: z.ZodOptional<z.ZodEnum<["eip3009", "permit", "permit2"]>>;
|
|
1377
|
+
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1378
|
+
}, "strip", z.ZodTypeAny, {
|
|
1379
|
+
scheme: "exact";
|
|
1380
|
+
description: string;
|
|
1381
|
+
asset: string;
|
|
1382
|
+
maxAmountRequired: string;
|
|
1383
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
1384
|
+
resource: string;
|
|
1385
|
+
mimeType: string;
|
|
1386
|
+
payTo: string;
|
|
1387
|
+
maxTimeoutSeconds: number;
|
|
1388
|
+
outputSchema?: Record<string, any> | undefined;
|
|
1389
|
+
paymentType?: "permit" | "eip3009" | "permit2" | undefined;
|
|
1390
|
+
extra?: Record<string, any> | undefined;
|
|
1391
|
+
}, {
|
|
1392
|
+
scheme: "exact";
|
|
1393
|
+
description: string;
|
|
1394
|
+
asset: string;
|
|
1395
|
+
maxAmountRequired: string;
|
|
1396
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
1397
|
+
resource: string;
|
|
1398
|
+
mimeType: string;
|
|
1399
|
+
payTo: string;
|
|
1400
|
+
maxTimeoutSeconds: number;
|
|
1401
|
+
outputSchema?: Record<string, any> | undefined;
|
|
1402
|
+
paymentType?: "permit" | "eip3009" | "permit2" | undefined;
|
|
1403
|
+
extra?: Record<string, any> | undefined;
|
|
1404
|
+
}>;
|
|
1405
|
+
}, "strip", z.ZodTypeAny, {
|
|
1406
|
+
paymentPayload: {
|
|
1407
|
+
scheme: "exact";
|
|
1408
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
1409
|
+
x402Version: number;
|
|
1410
|
+
payload: {
|
|
1411
|
+
signature: string;
|
|
1412
|
+
authorization: {
|
|
1413
|
+
from: string;
|
|
1414
|
+
to: string;
|
|
1415
|
+
value: string;
|
|
1416
|
+
validAfter: string;
|
|
1417
|
+
validBefore: string;
|
|
1418
|
+
nonce: string;
|
|
1419
|
+
};
|
|
1420
|
+
authorizationType: "eip3009";
|
|
1421
|
+
} | {
|
|
1422
|
+
signature: string;
|
|
1423
|
+
authorization: {
|
|
1424
|
+
value: string;
|
|
1425
|
+
nonce: string;
|
|
1426
|
+
owner: string;
|
|
1427
|
+
spender: string;
|
|
1428
|
+
deadline: string;
|
|
1429
|
+
};
|
|
1430
|
+
authorizationType: "permit";
|
|
1431
|
+
} | {
|
|
1432
|
+
signature: string;
|
|
1433
|
+
authorization: {
|
|
1434
|
+
nonce: string;
|
|
1435
|
+
owner: string;
|
|
1436
|
+
spender: string;
|
|
1437
|
+
deadline: string;
|
|
1438
|
+
amount: string;
|
|
1439
|
+
token: string;
|
|
1440
|
+
to?: string | undefined;
|
|
1441
|
+
};
|
|
1442
|
+
authorizationType: "permit2";
|
|
1443
|
+
} | {
|
|
1444
|
+
transaction: string;
|
|
1445
|
+
};
|
|
1446
|
+
};
|
|
1447
|
+
paymentRequirements: {
|
|
1448
|
+
scheme: "exact";
|
|
1449
|
+
description: string;
|
|
1450
|
+
asset: string;
|
|
1451
|
+
maxAmountRequired: string;
|
|
1452
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
1453
|
+
resource: string;
|
|
1454
|
+
mimeType: string;
|
|
1455
|
+
payTo: string;
|
|
1456
|
+
maxTimeoutSeconds: number;
|
|
1457
|
+
outputSchema?: Record<string, any> | undefined;
|
|
1458
|
+
paymentType?: "permit" | "eip3009" | "permit2" | undefined;
|
|
1459
|
+
extra?: Record<string, any> | undefined;
|
|
1460
|
+
};
|
|
1461
|
+
}, {
|
|
1462
|
+
paymentPayload: {
|
|
1463
|
+
scheme: "exact";
|
|
1464
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
1465
|
+
x402Version: number;
|
|
1466
|
+
payload: {
|
|
1467
|
+
signature: string;
|
|
1468
|
+
authorization: {
|
|
1469
|
+
from: string;
|
|
1470
|
+
to: string;
|
|
1471
|
+
value: string;
|
|
1472
|
+
validAfter: string;
|
|
1473
|
+
validBefore: string;
|
|
1474
|
+
nonce: string;
|
|
1475
|
+
};
|
|
1476
|
+
authorizationType: "eip3009";
|
|
1477
|
+
} | {
|
|
1478
|
+
signature: string;
|
|
1479
|
+
authorization: {
|
|
1480
|
+
value: string;
|
|
1481
|
+
nonce: string;
|
|
1482
|
+
owner: string;
|
|
1483
|
+
spender: string;
|
|
1484
|
+
deadline: string;
|
|
1485
|
+
};
|
|
1486
|
+
authorizationType: "permit";
|
|
1487
|
+
} | {
|
|
1488
|
+
signature: string;
|
|
1489
|
+
authorization: {
|
|
1490
|
+
nonce: string;
|
|
1491
|
+
owner: string;
|
|
1492
|
+
spender: string;
|
|
1493
|
+
deadline: string;
|
|
1494
|
+
amount: string;
|
|
1495
|
+
token: string;
|
|
1496
|
+
to?: string | undefined;
|
|
1497
|
+
};
|
|
1498
|
+
authorizationType: "permit2";
|
|
1499
|
+
} | {
|
|
1500
|
+
transaction: string;
|
|
1501
|
+
};
|
|
1502
|
+
};
|
|
1503
|
+
paymentRequirements: {
|
|
1504
|
+
scheme: "exact";
|
|
1505
|
+
description: string;
|
|
1506
|
+
asset: string;
|
|
1507
|
+
maxAmountRequired: string;
|
|
1508
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
1509
|
+
resource: string;
|
|
1510
|
+
mimeType: string;
|
|
1511
|
+
payTo: string;
|
|
1512
|
+
maxTimeoutSeconds: number;
|
|
1513
|
+
outputSchema?: Record<string, any> | undefined;
|
|
1514
|
+
paymentType?: "permit" | "eip3009" | "permit2" | undefined;
|
|
1515
|
+
extra?: Record<string, any> | undefined;
|
|
1516
|
+
};
|
|
1517
|
+
}>;
|
|
1518
|
+
type VerifyRequest = z.infer<typeof VerifyRequestSchema>;
|
|
1519
|
+
declare const VerifyResponseSchema: z.ZodObject<{
|
|
1520
|
+
isValid: z.ZodBoolean;
|
|
1521
|
+
invalidReason: z.ZodOptional<z.ZodEnum<["insufficient_funds", "invalid_exact_evm_payload_authorization_valid_after", "invalid_exact_evm_payload_authorization_valid_before", "invalid_exact_evm_payload_authorization_value", "invalid_exact_evm_payload_signature", "invalid_exact_evm_payload_recipient_mismatch", "invalid_exact_svm_payload_transaction", "invalid_exact_svm_payload_transaction_amount_mismatch", "invalid_exact_svm_payload_transaction_create_ata_instruction", "invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_payee", "invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_asset", "invalid_exact_svm_payload_transaction_instructions", "invalid_exact_svm_payload_transaction_instructions_length", "invalid_exact_svm_payload_transaction_instructions_compute_limit_instruction", "invalid_exact_svm_payload_transaction_instructions_compute_price_instruction", "invalid_exact_svm_payload_transaction_instructions_compute_price_instruction_too_high", "invalid_exact_svm_payload_transaction_instruction_not_spl_token_transfer_checked", "invalid_exact_svm_payload_transaction_instruction_not_token_2022_transfer_checked", "invalid_exact_svm_payload_transaction_not_a_transfer_instruction", "invalid_exact_svm_payload_transaction_receiver_ata_not_found", "invalid_exact_svm_payload_transaction_sender_ata_not_found", "invalid_exact_svm_payload_transaction_simulation_failed", "invalid_exact_svm_payload_transaction_transfer_to_incorrect_ata", "invalid_network", "invalid_payload", "invalid_payment_requirements", "invalid_scheme", "invalid_payment", "payment_expired", "unsupported_scheme", "invalid_x402_version", "invalid_transaction_state", "settle_exact_svm_block_height_exceeded", "settle_exact_svm_transaction_confirmation_timed_out", "unexpected_settle_error", "unexpected_verify_error", "unsupported_authorization_type", "invalid_authorization_type", "invalid_permit_signature", "invalid_permit2_signature", "invalid_permit2_witness_signature", "witness_recipient_mismatch", "permit_expired", "permit2_expired", "permit2_not_approved", "invalid_token_address", "invalid_spender_address", "token_mismatch", "insufficient_payment_amount", "insufficient_token_balance", "transaction_failed", "settlement_failed"]>>;
|
|
1522
|
+
payer: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
|
|
1523
|
+
}, "strip", z.ZodTypeAny, {
|
|
1524
|
+
isValid: boolean;
|
|
1525
|
+
payer?: string | undefined;
|
|
1526
|
+
invalidReason?: "invalid_exact_svm_payload_transaction" | "insufficient_funds" | "invalid_exact_evm_payload_authorization_valid_after" | "invalid_exact_evm_payload_authorization_valid_before" | "invalid_exact_evm_payload_authorization_value" | "invalid_exact_evm_payload_signature" | "invalid_exact_evm_payload_recipient_mismatch" | "invalid_exact_svm_payload_transaction_amount_mismatch" | "invalid_exact_svm_payload_transaction_create_ata_instruction" | "invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_payee" | "invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_asset" | "invalid_exact_svm_payload_transaction_instructions" | "invalid_exact_svm_payload_transaction_instructions_length" | "invalid_exact_svm_payload_transaction_instructions_compute_limit_instruction" | "invalid_exact_svm_payload_transaction_instructions_compute_price_instruction" | "invalid_exact_svm_payload_transaction_instructions_compute_price_instruction_too_high" | "invalid_exact_svm_payload_transaction_instruction_not_spl_token_transfer_checked" | "invalid_exact_svm_payload_transaction_instruction_not_token_2022_transfer_checked" | "invalid_exact_svm_payload_transaction_not_a_transfer_instruction" | "invalid_exact_svm_payload_transaction_receiver_ata_not_found" | "invalid_exact_svm_payload_transaction_sender_ata_not_found" | "invalid_exact_svm_payload_transaction_simulation_failed" | "invalid_exact_svm_payload_transaction_transfer_to_incorrect_ata" | "invalid_network" | "invalid_payload" | "invalid_payment_requirements" | "invalid_scheme" | "invalid_payment" | "payment_expired" | "unsupported_scheme" | "invalid_x402_version" | "invalid_transaction_state" | "settle_exact_svm_block_height_exceeded" | "settle_exact_svm_transaction_confirmation_timed_out" | "unexpected_settle_error" | "unexpected_verify_error" | "unsupported_authorization_type" | "invalid_authorization_type" | "invalid_permit_signature" | "invalid_permit2_signature" | "invalid_permit2_witness_signature" | "witness_recipient_mismatch" | "permit_expired" | "permit2_expired" | "permit2_not_approved" | "invalid_token_address" | "invalid_spender_address" | "token_mismatch" | "insufficient_payment_amount" | "insufficient_token_balance" | "transaction_failed" | "settlement_failed" | undefined;
|
|
1527
|
+
}, {
|
|
1528
|
+
isValid: boolean;
|
|
1529
|
+
payer?: string | undefined;
|
|
1530
|
+
invalidReason?: "invalid_exact_svm_payload_transaction" | "insufficient_funds" | "invalid_exact_evm_payload_authorization_valid_after" | "invalid_exact_evm_payload_authorization_valid_before" | "invalid_exact_evm_payload_authorization_value" | "invalid_exact_evm_payload_signature" | "invalid_exact_evm_payload_recipient_mismatch" | "invalid_exact_svm_payload_transaction_amount_mismatch" | "invalid_exact_svm_payload_transaction_create_ata_instruction" | "invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_payee" | "invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_asset" | "invalid_exact_svm_payload_transaction_instructions" | "invalid_exact_svm_payload_transaction_instructions_length" | "invalid_exact_svm_payload_transaction_instructions_compute_limit_instruction" | "invalid_exact_svm_payload_transaction_instructions_compute_price_instruction" | "invalid_exact_svm_payload_transaction_instructions_compute_price_instruction_too_high" | "invalid_exact_svm_payload_transaction_instruction_not_spl_token_transfer_checked" | "invalid_exact_svm_payload_transaction_instruction_not_token_2022_transfer_checked" | "invalid_exact_svm_payload_transaction_not_a_transfer_instruction" | "invalid_exact_svm_payload_transaction_receiver_ata_not_found" | "invalid_exact_svm_payload_transaction_sender_ata_not_found" | "invalid_exact_svm_payload_transaction_simulation_failed" | "invalid_exact_svm_payload_transaction_transfer_to_incorrect_ata" | "invalid_network" | "invalid_payload" | "invalid_payment_requirements" | "invalid_scheme" | "invalid_payment" | "payment_expired" | "unsupported_scheme" | "invalid_x402_version" | "invalid_transaction_state" | "settle_exact_svm_block_height_exceeded" | "settle_exact_svm_transaction_confirmation_timed_out" | "unexpected_settle_error" | "unexpected_verify_error" | "unsupported_authorization_type" | "invalid_authorization_type" | "invalid_permit_signature" | "invalid_permit2_signature" | "invalid_permit2_witness_signature" | "witness_recipient_mismatch" | "permit_expired" | "permit2_expired" | "permit2_not_approved" | "invalid_token_address" | "invalid_spender_address" | "token_mismatch" | "insufficient_payment_amount" | "insufficient_token_balance" | "transaction_failed" | "settlement_failed" | undefined;
|
|
1531
|
+
}>;
|
|
1532
|
+
type VerifyResponse = z.infer<typeof VerifyResponseSchema>;
|
|
1533
|
+
declare const SettleResponseSchema: z.ZodObject<{
|
|
1534
|
+
success: z.ZodBoolean;
|
|
1535
|
+
errorReason: z.ZodOptional<z.ZodEnum<["insufficient_funds", "invalid_exact_evm_payload_authorization_valid_after", "invalid_exact_evm_payload_authorization_valid_before", "invalid_exact_evm_payload_authorization_value", "invalid_exact_evm_payload_signature", "invalid_exact_evm_payload_recipient_mismatch", "invalid_exact_svm_payload_transaction", "invalid_exact_svm_payload_transaction_amount_mismatch", "invalid_exact_svm_payload_transaction_create_ata_instruction", "invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_payee", "invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_asset", "invalid_exact_svm_payload_transaction_instructions", "invalid_exact_svm_payload_transaction_instructions_length", "invalid_exact_svm_payload_transaction_instructions_compute_limit_instruction", "invalid_exact_svm_payload_transaction_instructions_compute_price_instruction", "invalid_exact_svm_payload_transaction_instructions_compute_price_instruction_too_high", "invalid_exact_svm_payload_transaction_instruction_not_spl_token_transfer_checked", "invalid_exact_svm_payload_transaction_instruction_not_token_2022_transfer_checked", "invalid_exact_svm_payload_transaction_not_a_transfer_instruction", "invalid_exact_svm_payload_transaction_receiver_ata_not_found", "invalid_exact_svm_payload_transaction_sender_ata_not_found", "invalid_exact_svm_payload_transaction_simulation_failed", "invalid_exact_svm_payload_transaction_transfer_to_incorrect_ata", "invalid_network", "invalid_payload", "invalid_payment_requirements", "invalid_scheme", "invalid_payment", "payment_expired", "unsupported_scheme", "invalid_x402_version", "invalid_transaction_state", "settle_exact_svm_block_height_exceeded", "settle_exact_svm_transaction_confirmation_timed_out", "unexpected_settle_error", "unexpected_verify_error", "unsupported_authorization_type", "invalid_authorization_type", "invalid_permit_signature", "invalid_permit2_signature", "invalid_permit2_witness_signature", "witness_recipient_mismatch", "permit_expired", "permit2_expired", "permit2_not_approved", "invalid_token_address", "invalid_spender_address", "token_mismatch", "insufficient_payment_amount", "insufficient_token_balance", "transaction_failed", "settlement_failed"]>>;
|
|
1536
|
+
payer: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
|
|
1537
|
+
transaction: z.ZodString;
|
|
1538
|
+
network: z.ZodEnum<["base-sepolia", "base", "avalanche-fuji", "avalanche", "iotex", "solana-devnet", "solana", "sei", "sei-testnet", "polygon", "polygon-amoy", "peaq", "bsc", "bsc-testnet"]>;
|
|
1539
|
+
}, "strip", z.ZodTypeAny, {
|
|
1540
|
+
transaction: string;
|
|
1541
|
+
success: boolean;
|
|
1542
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
1543
|
+
payer?: string | undefined;
|
|
1544
|
+
errorReason?: "invalid_exact_svm_payload_transaction" | "insufficient_funds" | "invalid_exact_evm_payload_authorization_valid_after" | "invalid_exact_evm_payload_authorization_valid_before" | "invalid_exact_evm_payload_authorization_value" | "invalid_exact_evm_payload_signature" | "invalid_exact_evm_payload_recipient_mismatch" | "invalid_exact_svm_payload_transaction_amount_mismatch" | "invalid_exact_svm_payload_transaction_create_ata_instruction" | "invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_payee" | "invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_asset" | "invalid_exact_svm_payload_transaction_instructions" | "invalid_exact_svm_payload_transaction_instructions_length" | "invalid_exact_svm_payload_transaction_instructions_compute_limit_instruction" | "invalid_exact_svm_payload_transaction_instructions_compute_price_instruction" | "invalid_exact_svm_payload_transaction_instructions_compute_price_instruction_too_high" | "invalid_exact_svm_payload_transaction_instruction_not_spl_token_transfer_checked" | "invalid_exact_svm_payload_transaction_instruction_not_token_2022_transfer_checked" | "invalid_exact_svm_payload_transaction_not_a_transfer_instruction" | "invalid_exact_svm_payload_transaction_receiver_ata_not_found" | "invalid_exact_svm_payload_transaction_sender_ata_not_found" | "invalid_exact_svm_payload_transaction_simulation_failed" | "invalid_exact_svm_payload_transaction_transfer_to_incorrect_ata" | "invalid_network" | "invalid_payload" | "invalid_payment_requirements" | "invalid_scheme" | "invalid_payment" | "payment_expired" | "unsupported_scheme" | "invalid_x402_version" | "invalid_transaction_state" | "settle_exact_svm_block_height_exceeded" | "settle_exact_svm_transaction_confirmation_timed_out" | "unexpected_settle_error" | "unexpected_verify_error" | "unsupported_authorization_type" | "invalid_authorization_type" | "invalid_permit_signature" | "invalid_permit2_signature" | "invalid_permit2_witness_signature" | "witness_recipient_mismatch" | "permit_expired" | "permit2_expired" | "permit2_not_approved" | "invalid_token_address" | "invalid_spender_address" | "token_mismatch" | "insufficient_payment_amount" | "insufficient_token_balance" | "transaction_failed" | "settlement_failed" | undefined;
|
|
1545
|
+
}, {
|
|
1546
|
+
transaction: string;
|
|
1547
|
+
success: boolean;
|
|
1548
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
1549
|
+
payer?: string | undefined;
|
|
1550
|
+
errorReason?: "invalid_exact_svm_payload_transaction" | "insufficient_funds" | "invalid_exact_evm_payload_authorization_valid_after" | "invalid_exact_evm_payload_authorization_valid_before" | "invalid_exact_evm_payload_authorization_value" | "invalid_exact_evm_payload_signature" | "invalid_exact_evm_payload_recipient_mismatch" | "invalid_exact_svm_payload_transaction_amount_mismatch" | "invalid_exact_svm_payload_transaction_create_ata_instruction" | "invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_payee" | "invalid_exact_svm_payload_transaction_create_ata_instruction_incorrect_asset" | "invalid_exact_svm_payload_transaction_instructions" | "invalid_exact_svm_payload_transaction_instructions_length" | "invalid_exact_svm_payload_transaction_instructions_compute_limit_instruction" | "invalid_exact_svm_payload_transaction_instructions_compute_price_instruction" | "invalid_exact_svm_payload_transaction_instructions_compute_price_instruction_too_high" | "invalid_exact_svm_payload_transaction_instruction_not_spl_token_transfer_checked" | "invalid_exact_svm_payload_transaction_instruction_not_token_2022_transfer_checked" | "invalid_exact_svm_payload_transaction_not_a_transfer_instruction" | "invalid_exact_svm_payload_transaction_receiver_ata_not_found" | "invalid_exact_svm_payload_transaction_sender_ata_not_found" | "invalid_exact_svm_payload_transaction_simulation_failed" | "invalid_exact_svm_payload_transaction_transfer_to_incorrect_ata" | "invalid_network" | "invalid_payload" | "invalid_payment_requirements" | "invalid_scheme" | "invalid_payment" | "payment_expired" | "unsupported_scheme" | "invalid_x402_version" | "invalid_transaction_state" | "settle_exact_svm_block_height_exceeded" | "settle_exact_svm_transaction_confirmation_timed_out" | "unexpected_settle_error" | "unexpected_verify_error" | "unsupported_authorization_type" | "invalid_authorization_type" | "invalid_permit_signature" | "invalid_permit2_signature" | "invalid_permit2_witness_signature" | "witness_recipient_mismatch" | "permit_expired" | "permit2_expired" | "permit2_not_approved" | "invalid_token_address" | "invalid_spender_address" | "token_mismatch" | "insufficient_payment_amount" | "insufficient_token_balance" | "transaction_failed" | "settlement_failed" | undefined;
|
|
1551
|
+
}>;
|
|
1552
|
+
type SettleResponse = z.infer<typeof SettleResponseSchema>;
|
|
1553
|
+
declare const ListDiscoveryResourcesRequestSchema: z.ZodObject<{
|
|
1554
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1555
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
1556
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
1557
|
+
}, "strip", z.ZodTypeAny, {
|
|
1558
|
+
type?: string | undefined;
|
|
1559
|
+
limit?: number | undefined;
|
|
1560
|
+
offset?: number | undefined;
|
|
1561
|
+
}, {
|
|
1562
|
+
type?: string | undefined;
|
|
1563
|
+
limit?: number | undefined;
|
|
1564
|
+
offset?: number | undefined;
|
|
1565
|
+
}>;
|
|
1566
|
+
type ListDiscoveryResourcesRequest = z.infer<typeof ListDiscoveryResourcesRequestSchema>;
|
|
1567
|
+
declare const ListDiscoveryResourcesResponseSchema: z.ZodObject<{
|
|
1568
|
+
x402Version: z.ZodEffects<z.ZodNumber, number, number>;
|
|
1569
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1570
|
+
resource: z.ZodString;
|
|
1571
|
+
type: z.ZodEnum<["http"]>;
|
|
1572
|
+
x402Version: z.ZodEffects<z.ZodNumber, number, number>;
|
|
1573
|
+
accepts: z.ZodArray<z.ZodObject<{
|
|
1574
|
+
scheme: z.ZodEnum<["exact"]>;
|
|
1575
|
+
network: z.ZodEnum<["base-sepolia", "base", "avalanche-fuji", "avalanche", "iotex", "solana-devnet", "solana", "sei", "sei-testnet", "polygon", "polygon-amoy", "peaq", "bsc", "bsc-testnet"]>;
|
|
1576
|
+
maxAmountRequired: z.ZodEffects<z.ZodString, string, string>;
|
|
1577
|
+
resource: z.ZodString;
|
|
1578
|
+
description: z.ZodString;
|
|
1579
|
+
mimeType: z.ZodString;
|
|
1580
|
+
outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1581
|
+
payTo: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
1582
|
+
maxTimeoutSeconds: z.ZodNumber;
|
|
1583
|
+
asset: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
1584
|
+
paymentType: z.ZodOptional<z.ZodEnum<["eip3009", "permit", "permit2"]>>;
|
|
1585
|
+
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1586
|
+
}, "strip", z.ZodTypeAny, {
|
|
1587
|
+
scheme: "exact";
|
|
1588
|
+
description: string;
|
|
1589
|
+
asset: string;
|
|
1590
|
+
maxAmountRequired: string;
|
|
1591
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
1592
|
+
resource: string;
|
|
1593
|
+
mimeType: string;
|
|
1594
|
+
payTo: string;
|
|
1595
|
+
maxTimeoutSeconds: number;
|
|
1596
|
+
outputSchema?: Record<string, any> | undefined;
|
|
1597
|
+
paymentType?: "permit" | "eip3009" | "permit2" | undefined;
|
|
1598
|
+
extra?: Record<string, any> | undefined;
|
|
1599
|
+
}, {
|
|
1600
|
+
scheme: "exact";
|
|
1601
|
+
description: string;
|
|
1602
|
+
asset: string;
|
|
1603
|
+
maxAmountRequired: string;
|
|
1604
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
1605
|
+
resource: string;
|
|
1606
|
+
mimeType: string;
|
|
1607
|
+
payTo: string;
|
|
1608
|
+
maxTimeoutSeconds: number;
|
|
1609
|
+
outputSchema?: Record<string, any> | undefined;
|
|
1610
|
+
paymentType?: "permit" | "eip3009" | "permit2" | undefined;
|
|
1611
|
+
extra?: Record<string, any> | undefined;
|
|
1612
|
+
}>, "many">;
|
|
1613
|
+
lastUpdated: z.ZodDate;
|
|
1614
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1615
|
+
}, "strip", z.ZodTypeAny, {
|
|
1616
|
+
type: "http";
|
|
1617
|
+
resource: string;
|
|
1618
|
+
x402Version: number;
|
|
1619
|
+
accepts: {
|
|
1620
|
+
scheme: "exact";
|
|
1621
|
+
description: string;
|
|
1622
|
+
asset: string;
|
|
1623
|
+
maxAmountRequired: string;
|
|
1624
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
1625
|
+
resource: string;
|
|
1626
|
+
mimeType: string;
|
|
1627
|
+
payTo: string;
|
|
1628
|
+
maxTimeoutSeconds: number;
|
|
1629
|
+
outputSchema?: Record<string, any> | undefined;
|
|
1630
|
+
paymentType?: "permit" | "eip3009" | "permit2" | undefined;
|
|
1631
|
+
extra?: Record<string, any> | undefined;
|
|
1632
|
+
}[];
|
|
1633
|
+
lastUpdated: Date;
|
|
1634
|
+
metadata?: Record<string, any> | undefined;
|
|
1635
|
+
}, {
|
|
1636
|
+
type: "http";
|
|
1637
|
+
resource: string;
|
|
1638
|
+
x402Version: number;
|
|
1639
|
+
accepts: {
|
|
1640
|
+
scheme: "exact";
|
|
1641
|
+
description: string;
|
|
1642
|
+
asset: string;
|
|
1643
|
+
maxAmountRequired: string;
|
|
1644
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
1645
|
+
resource: string;
|
|
1646
|
+
mimeType: string;
|
|
1647
|
+
payTo: string;
|
|
1648
|
+
maxTimeoutSeconds: number;
|
|
1649
|
+
outputSchema?: Record<string, any> | undefined;
|
|
1650
|
+
paymentType?: "permit" | "eip3009" | "permit2" | undefined;
|
|
1651
|
+
extra?: Record<string, any> | undefined;
|
|
1652
|
+
}[];
|
|
1653
|
+
lastUpdated: Date;
|
|
1654
|
+
metadata?: Record<string, any> | undefined;
|
|
1655
|
+
}>, "many">;
|
|
1656
|
+
pagination: z.ZodObject<{
|
|
1657
|
+
limit: z.ZodNumber;
|
|
1658
|
+
offset: z.ZodNumber;
|
|
1659
|
+
total: z.ZodNumber;
|
|
1660
|
+
}, "strip", z.ZodTypeAny, {
|
|
1661
|
+
limit: number;
|
|
1662
|
+
offset: number;
|
|
1663
|
+
total: number;
|
|
1664
|
+
}, {
|
|
1665
|
+
limit: number;
|
|
1666
|
+
offset: number;
|
|
1667
|
+
total: number;
|
|
1668
|
+
}>;
|
|
1669
|
+
}, "strip", z.ZodTypeAny, {
|
|
1670
|
+
x402Version: number;
|
|
1671
|
+
items: {
|
|
1672
|
+
type: "http";
|
|
1673
|
+
resource: string;
|
|
1674
|
+
x402Version: number;
|
|
1675
|
+
accepts: {
|
|
1676
|
+
scheme: "exact";
|
|
1677
|
+
description: string;
|
|
1678
|
+
asset: string;
|
|
1679
|
+
maxAmountRequired: string;
|
|
1680
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
1681
|
+
resource: string;
|
|
1682
|
+
mimeType: string;
|
|
1683
|
+
payTo: string;
|
|
1684
|
+
maxTimeoutSeconds: number;
|
|
1685
|
+
outputSchema?: Record<string, any> | undefined;
|
|
1686
|
+
paymentType?: "permit" | "eip3009" | "permit2" | undefined;
|
|
1687
|
+
extra?: Record<string, any> | undefined;
|
|
1688
|
+
}[];
|
|
1689
|
+
lastUpdated: Date;
|
|
1690
|
+
metadata?: Record<string, any> | undefined;
|
|
1691
|
+
}[];
|
|
1692
|
+
pagination: {
|
|
1693
|
+
limit: number;
|
|
1694
|
+
offset: number;
|
|
1695
|
+
total: number;
|
|
1696
|
+
};
|
|
1697
|
+
}, {
|
|
1698
|
+
x402Version: number;
|
|
1699
|
+
items: {
|
|
1700
|
+
type: "http";
|
|
1701
|
+
resource: string;
|
|
1702
|
+
x402Version: number;
|
|
1703
|
+
accepts: {
|
|
1704
|
+
scheme: "exact";
|
|
1705
|
+
description: string;
|
|
1706
|
+
asset: string;
|
|
1707
|
+
maxAmountRequired: string;
|
|
1708
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
1709
|
+
resource: string;
|
|
1710
|
+
mimeType: string;
|
|
1711
|
+
payTo: string;
|
|
1712
|
+
maxTimeoutSeconds: number;
|
|
1713
|
+
outputSchema?: Record<string, any> | undefined;
|
|
1714
|
+
paymentType?: "permit" | "eip3009" | "permit2" | undefined;
|
|
1715
|
+
extra?: Record<string, any> | undefined;
|
|
1716
|
+
}[];
|
|
1717
|
+
lastUpdated: Date;
|
|
1718
|
+
metadata?: Record<string, any> | undefined;
|
|
1719
|
+
}[];
|
|
1720
|
+
pagination: {
|
|
1721
|
+
limit: number;
|
|
1722
|
+
offset: number;
|
|
1723
|
+
total: number;
|
|
1724
|
+
};
|
|
1725
|
+
}>;
|
|
1726
|
+
type ListDiscoveryResourcesResponse = z.infer<typeof ListDiscoveryResourcesResponseSchema>;
|
|
1727
|
+
declare const SupportedPaymentKindSchema: z.ZodObject<{
|
|
1728
|
+
x402Version: z.ZodEffects<z.ZodNumber, number, number>;
|
|
1729
|
+
scheme: z.ZodEnum<["exact"]>;
|
|
1730
|
+
network: z.ZodEnum<["base-sepolia", "base", "avalanche-fuji", "avalanche", "iotex", "solana-devnet", "solana", "sei", "sei-testnet", "polygon", "polygon-amoy", "peaq", "bsc", "bsc-testnet"]>;
|
|
1731
|
+
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1732
|
+
}, "strip", z.ZodTypeAny, {
|
|
1733
|
+
scheme: "exact";
|
|
1734
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
1735
|
+
x402Version: number;
|
|
1736
|
+
extra?: Record<string, any> | undefined;
|
|
1737
|
+
}, {
|
|
1738
|
+
scheme: "exact";
|
|
1739
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
1740
|
+
x402Version: number;
|
|
1741
|
+
extra?: Record<string, any> | undefined;
|
|
1742
|
+
}>;
|
|
1743
|
+
type SupportedPaymentKind = z.infer<typeof SupportedPaymentKindSchema>;
|
|
1744
|
+
declare const SupportedPaymentKindsResponseSchema: z.ZodObject<{
|
|
1745
|
+
kinds: z.ZodArray<z.ZodObject<{
|
|
1746
|
+
x402Version: z.ZodEffects<z.ZodNumber, number, number>;
|
|
1747
|
+
scheme: z.ZodEnum<["exact"]>;
|
|
1748
|
+
network: z.ZodEnum<["base-sepolia", "base", "avalanche-fuji", "avalanche", "iotex", "solana-devnet", "solana", "sei", "sei-testnet", "polygon", "polygon-amoy", "peaq", "bsc", "bsc-testnet"]>;
|
|
1749
|
+
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1750
|
+
}, "strip", z.ZodTypeAny, {
|
|
1751
|
+
scheme: "exact";
|
|
1752
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
1753
|
+
x402Version: number;
|
|
1754
|
+
extra?: Record<string, any> | undefined;
|
|
1755
|
+
}, {
|
|
1756
|
+
scheme: "exact";
|
|
1757
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
1758
|
+
x402Version: number;
|
|
1759
|
+
extra?: Record<string, any> | undefined;
|
|
1760
|
+
}>, "many">;
|
|
1761
|
+
}, "strip", z.ZodTypeAny, {
|
|
1762
|
+
kinds: {
|
|
1763
|
+
scheme: "exact";
|
|
1764
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
1765
|
+
x402Version: number;
|
|
1766
|
+
extra?: Record<string, any> | undefined;
|
|
1767
|
+
}[];
|
|
1768
|
+
}, {
|
|
1769
|
+
kinds: {
|
|
1770
|
+
scheme: "exact";
|
|
1771
|
+
network: "base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "bsc" | "bsc-testnet" | "solana-devnet" | "solana";
|
|
1772
|
+
x402Version: number;
|
|
1773
|
+
extra?: Record<string, any> | undefined;
|
|
1774
|
+
}[];
|
|
1775
|
+
}>;
|
|
1776
|
+
type SupportedPaymentKindsResponse = z.infer<typeof SupportedPaymentKindsResponseSchema>;
|
|
1777
|
+
|
|
1778
|
+
export { type RequestStructure as A, type DiscoveredResource as B, SettleRequestSchema as C, DiscoveredResourceSchema as D, type ExactSvmPayload as E, type SettleRequest as F, type VerifyRequest as G, type HTTPVerbs as H, VerifyResponseSchema as I, type VerifyResponse as J, SettleResponseSchema as K, ListDiscoveryResourcesRequestSchema as L, type ListDiscoveryResourcesRequest as M, ListDiscoveryResourcesResponseSchema as N, type ListDiscoveryResourcesResponse as O, type PaymentRequirements as P, SupportedPaymentKindSchema as Q, RequestStructureSchema as R, type SettleResponse as S, type SupportedPaymentKind as T, type UnsignedEvmPaymentPayload as U, VerifyRequestSchema as V, SupportedPaymentKindsResponseSchema as W, type SupportedPaymentKindsResponse as X, type PaymentPayload as a, ErrorReasons as b, PaymentRequirementsSchema as c, ExactEvmPayloadAuthorizationSchema as d, type ExactEvmPayloadAuthorization as e, PermitEvmPayloadAuthorizationSchema as f, type PermitEvmPayloadAuthorization as g, Permit2EvmPayloadAuthorizationSchema as h, type Permit2EvmPayloadAuthorization as i, ExactEvmPayloadSchema as j, type ExactEvmPayload as k, ExactSvmPayloadSchema as l, PaymentPayloadSchema as m, type EvmPaymentPayload as n, type Eip3009PaymentPayload as o, type UnsignedEip3009PaymentPayload as p, type PermitPaymentPayload as q, type UnsignedPermitPaymentPayload as r, schemes as s, type Permit2PaymentPayload as t, type UnsignedPermit2PaymentPayload as u, x402ResponseSchema as v, type x402Response as w, x402Versions as x, HTTPRequestStructureSchema as y, type HTTPRequestStructure as z };
|