@droplinked_inc/web3 3.0.1 → 4.0.0
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/types.d.ts +91 -497
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +21 -20
- package/dist/types.js.map +1 -1
- package/dist/zod-compat.d.ts +20 -0
- package/dist/zod-compat.d.ts.map +1 -0
- package/dist/zod-compat.js +32 -0
- package/dist/zod-compat.js.map +1 -0
- package/package.json +6 -6
package/dist/types.d.ts
CHANGED
|
@@ -75,25 +75,25 @@ export declare enum TokenStandard {
|
|
|
75
75
|
ERC721 = "ERC721",
|
|
76
76
|
ERC1155 = "ERC1155"
|
|
77
77
|
}
|
|
78
|
-
export declare const ChainSchema: z.
|
|
79
|
-
export declare const NetworkSchema: z.
|
|
80
|
-
export declare const ChainWalletSchema: z.
|
|
81
|
-
export declare const PaymentTokensSchema: z.
|
|
82
|
-
export declare const Web3ActionsSchema: z.
|
|
83
|
-
export declare const TokenStandardSchema: z.
|
|
84
|
-
export declare const ProductTypeSchema: z.
|
|
78
|
+
export declare const ChainSchema: z.ZodEnum<typeof Chain>;
|
|
79
|
+
export declare const NetworkSchema: z.ZodEnum<typeof Network>;
|
|
80
|
+
export declare const ChainWalletSchema: z.ZodEnum<typeof ChainWallet>;
|
|
81
|
+
export declare const PaymentTokensSchema: z.ZodEnum<typeof PaymentTokens>;
|
|
82
|
+
export declare const Web3ActionsSchema: z.ZodEnum<typeof Web3Actions>;
|
|
83
|
+
export declare const TokenStandardSchema: z.ZodEnum<typeof TokenStandard>;
|
|
84
|
+
export declare const ProductTypeSchema: z.ZodEnum<typeof ProductType>;
|
|
85
85
|
/**
|
|
86
86
|
* Lowercase 0x-prefixed 40-hex-char EVM address.
|
|
87
87
|
* Validation is by regex AND EIP-55 checksum tolerance (any case input,
|
|
88
88
|
* we normalize to lowercase).
|
|
89
89
|
*/
|
|
90
|
-
export declare const EvmAddressSchema: z.
|
|
90
|
+
export declare const EvmAddressSchema: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
91
91
|
export type EvmAddress = Address;
|
|
92
|
-
export declare const HexStringSchema: z.
|
|
92
|
+
export declare const HexStringSchema: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
93
93
|
export declare const TxHashSchema: z.ZodString;
|
|
94
|
-
export declare const Bytes32Schema: z.
|
|
94
|
+
export declare const Bytes32Schema: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
95
95
|
/** Accept bigint, integer number, or numeric string; coerce to bigint. */
|
|
96
|
-
export declare const Uint256Schema: z.
|
|
96
|
+
export declare const Uint256Schema: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodTransform<bigint, string | number | bigint>>;
|
|
97
97
|
export type Uint256 = bigint;
|
|
98
98
|
export declare const ZERO_ADDRESS: Address;
|
|
99
99
|
export declare const DeployShopInputSchema: z.ZodObject<{
|
|
@@ -101,119 +101,49 @@ export declare const DeployShopInputSchema: z.ZodObject<{
|
|
|
101
101
|
shopAddress: z.ZodString;
|
|
102
102
|
shopLogo: z.ZodString;
|
|
103
103
|
shopDescription: z.ZodString;
|
|
104
|
-
},
|
|
105
|
-
shopName: string;
|
|
106
|
-
shopAddress: string;
|
|
107
|
-
shopLogo: string;
|
|
108
|
-
shopDescription: string;
|
|
109
|
-
}, {
|
|
110
|
-
shopName: string;
|
|
111
|
-
shopAddress: string;
|
|
112
|
-
shopLogo: string;
|
|
113
|
-
shopDescription: string;
|
|
114
|
-
}>;
|
|
104
|
+
}, z.core.$strip>;
|
|
115
105
|
export type DeployShopInput = z.infer<typeof DeployShopInputSchema>;
|
|
116
106
|
export declare const DeployShopResponseSchema: z.ZodObject<{
|
|
117
|
-
deployedShopAddress: z.
|
|
118
|
-
deployedNFTAddress: z.
|
|
107
|
+
deployedShopAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
108
|
+
deployedNFTAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
119
109
|
transactionHash: z.ZodString;
|
|
120
|
-
},
|
|
121
|
-
deployedShopAddress: `0x${string}`;
|
|
122
|
-
deployedNFTAddress: `0x${string}`;
|
|
123
|
-
transactionHash: string;
|
|
124
|
-
}, {
|
|
125
|
-
deployedShopAddress: string;
|
|
126
|
-
deployedNFTAddress: string;
|
|
127
|
-
transactionHash: string;
|
|
128
|
-
}>;
|
|
110
|
+
}, z.core.$strip>;
|
|
129
111
|
export type DeployShopResponse = z.infer<typeof DeployShopResponseSchema>;
|
|
130
112
|
export declare const ProductDetailsSchema: z.ZodObject<{
|
|
131
113
|
productTitle: z.ZodString;
|
|
132
114
|
description: z.ZodString;
|
|
133
115
|
commission: z.ZodNumber;
|
|
134
|
-
type: z.
|
|
116
|
+
type: z.ZodEnum<typeof ProductType>;
|
|
135
117
|
acceptsManageWallet: z.ZodBoolean;
|
|
136
118
|
royalty: z.ZodNumber;
|
|
137
|
-
},
|
|
138
|
-
type: ProductType;
|
|
139
|
-
productTitle: string;
|
|
140
|
-
description: string;
|
|
141
|
-
commission: number;
|
|
142
|
-
acceptsManageWallet: boolean;
|
|
143
|
-
royalty: number;
|
|
144
|
-
}, {
|
|
145
|
-
type: ProductType;
|
|
146
|
-
productTitle: string;
|
|
147
|
-
description: string;
|
|
148
|
-
commission: number;
|
|
149
|
-
acceptsManageWallet: boolean;
|
|
150
|
-
royalty: number;
|
|
151
|
-
}>;
|
|
119
|
+
}, z.core.$strip>;
|
|
152
120
|
export type IProductDetails = z.infer<typeof ProductDetailsSchema>;
|
|
153
121
|
export declare const SKUDetailsSchema: z.ZodObject<{
|
|
154
122
|
skuProperties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
155
123
|
imageUrl: z.ZodString;
|
|
156
124
|
amount: z.ZodNumber;
|
|
157
125
|
skuID: z.ZodString;
|
|
158
|
-
},
|
|
159
|
-
skuProperties: Record<string, unknown>;
|
|
160
|
-
imageUrl: string;
|
|
161
|
-
amount: number;
|
|
162
|
-
skuID: string;
|
|
163
|
-
}, {
|
|
164
|
-
skuProperties: Record<string, unknown>;
|
|
165
|
-
imageUrl: string;
|
|
166
|
-
amount: number;
|
|
167
|
-
skuID: string;
|
|
168
|
-
}>;
|
|
126
|
+
}, z.core.$strip>;
|
|
169
127
|
export type ISKUDetails = z.infer<typeof SKUDetailsSchema>;
|
|
170
128
|
export declare const RecordResponseSchema: z.ZodObject<{
|
|
171
129
|
transactionHash: z.ZodString;
|
|
172
|
-
productId: z.ZodOptional<z.
|
|
173
|
-
amountRecorded: z.ZodOptional<z.
|
|
130
|
+
productId: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodTransform<bigint, string | number | bigint>>>;
|
|
131
|
+
amountRecorded: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodTransform<bigint, string | number | bigint>>>;
|
|
174
132
|
transactionId: z.ZodString;
|
|
175
|
-
},
|
|
176
|
-
transactionHash: string;
|
|
177
|
-
transactionId: string;
|
|
178
|
-
productId?: bigint | undefined;
|
|
179
|
-
amountRecorded?: bigint | undefined;
|
|
180
|
-
}, {
|
|
181
|
-
transactionHash: string;
|
|
182
|
-
transactionId: string;
|
|
183
|
-
productId?: string | number | bigint | undefined;
|
|
184
|
-
amountRecorded?: string | number | bigint | undefined;
|
|
185
|
-
}>;
|
|
133
|
+
}, z.core.$strip>;
|
|
186
134
|
export type RecordResponse = z.infer<typeof RecordResponseSchema>;
|
|
187
135
|
export declare const PurchaseDataSchema: z.ZodObject<{
|
|
188
|
-
id: z.
|
|
189
|
-
amount: z.
|
|
136
|
+
id: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodTransform<bigint, string | number | bigint>>;
|
|
137
|
+
amount: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodTransform<bigint, string | number | bigint>>;
|
|
190
138
|
isAffiliate: z.ZodBoolean;
|
|
191
|
-
shopAddress: z.
|
|
192
|
-
},
|
|
193
|
-
shopAddress: `0x${string}`;
|
|
194
|
-
amount: bigint;
|
|
195
|
-
id: bigint;
|
|
196
|
-
isAffiliate: boolean;
|
|
197
|
-
}, {
|
|
198
|
-
shopAddress: string;
|
|
199
|
-
amount: string | number | bigint;
|
|
200
|
-
id: string | number | bigint;
|
|
201
|
-
isAffiliate: boolean;
|
|
202
|
-
}>;
|
|
139
|
+
shopAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
140
|
+
}, z.core.$strip>;
|
|
203
141
|
export type PurchaseData = z.infer<typeof PurchaseDataSchema>;
|
|
204
142
|
export declare const PurchaseConfirmationItemSchema: z.ZodObject<{
|
|
205
143
|
amount: z.ZodNumber;
|
|
206
144
|
productId: z.ZodString;
|
|
207
145
|
nullifier: z.ZodString;
|
|
208
|
-
},
|
|
209
|
-
amount: number;
|
|
210
|
-
productId: string;
|
|
211
|
-
nullifier: string;
|
|
212
|
-
}, {
|
|
213
|
-
amount: number;
|
|
214
|
-
productId: string;
|
|
215
|
-
nullifier: string;
|
|
216
|
-
}>;
|
|
146
|
+
}, z.core.$strip>;
|
|
217
147
|
export type PurchaseConfirmationItem = z.infer<typeof PurchaseConfirmationItemSchema>;
|
|
218
148
|
export declare const PurchaseSignatureSchema: z.ZodObject<{
|
|
219
149
|
signature: z.ZodString;
|
|
@@ -221,45 +151,13 @@ export declare const PurchaseSignatureSchema: z.ZodObject<{
|
|
|
221
151
|
amount: z.ZodNumber;
|
|
222
152
|
productId: z.ZodString;
|
|
223
153
|
nullifier: z.ZodString;
|
|
224
|
-
},
|
|
225
|
-
amount: number;
|
|
226
|
-
productId: string;
|
|
227
|
-
nullifier: string;
|
|
228
|
-
}, {
|
|
229
|
-
amount: number;
|
|
230
|
-
productId: string;
|
|
231
|
-
nullifier: string;
|
|
232
|
-
}>, "many">;
|
|
154
|
+
}, z.core.$strip>>;
|
|
233
155
|
chainId: z.ZodNumber;
|
|
234
|
-
verifyingContract: z.
|
|
235
|
-
shopAddress: z.
|
|
236
|
-
nonce: z.
|
|
237
|
-
deadline: z.
|
|
238
|
-
},
|
|
239
|
-
shopAddress: `0x${string}`;
|
|
240
|
-
signature: string;
|
|
241
|
-
purchaseData: {
|
|
242
|
-
amount: number;
|
|
243
|
-
productId: string;
|
|
244
|
-
nullifier: string;
|
|
245
|
-
}[];
|
|
246
|
-
chainId: number;
|
|
247
|
-
verifyingContract: `0x${string}`;
|
|
248
|
-
nonce: bigint;
|
|
249
|
-
deadline: bigint;
|
|
250
|
-
}, {
|
|
251
|
-
shopAddress: string;
|
|
252
|
-
signature: string;
|
|
253
|
-
purchaseData: {
|
|
254
|
-
amount: number;
|
|
255
|
-
productId: string;
|
|
256
|
-
nullifier: string;
|
|
257
|
-
}[];
|
|
258
|
-
chainId: number;
|
|
259
|
-
verifyingContract: string;
|
|
260
|
-
nonce: string | number | bigint;
|
|
261
|
-
deadline: string | number | bigint;
|
|
262
|
-
}>;
|
|
156
|
+
verifyingContract: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
157
|
+
shopAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
158
|
+
nonce: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodTransform<bigint, string | number | bigint>>;
|
|
159
|
+
deadline: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodTransform<bigint, string | number | bigint>>;
|
|
160
|
+
}, z.core.$strip>;
|
|
263
161
|
export type PurchaseSignature = z.infer<typeof PurchaseSignatureSchema>;
|
|
264
162
|
export declare const ClaimNFTInputsSchema: z.ZodObject<{
|
|
265
163
|
signature: z.ZodObject<{
|
|
@@ -268,419 +166,115 @@ export declare const ClaimNFTInputsSchema: z.ZodObject<{
|
|
|
268
166
|
amount: z.ZodNumber;
|
|
269
167
|
productId: z.ZodString;
|
|
270
168
|
nullifier: z.ZodString;
|
|
271
|
-
},
|
|
272
|
-
amount: number;
|
|
273
|
-
productId: string;
|
|
274
|
-
nullifier: string;
|
|
275
|
-
}, {
|
|
276
|
-
amount: number;
|
|
277
|
-
productId: string;
|
|
278
|
-
nullifier: string;
|
|
279
|
-
}>, "many">;
|
|
169
|
+
}, z.core.$strip>>;
|
|
280
170
|
chainId: z.ZodNumber;
|
|
281
|
-
verifyingContract: z.
|
|
282
|
-
shopAddress: z.
|
|
283
|
-
nonce: z.
|
|
284
|
-
deadline: z.
|
|
285
|
-
},
|
|
286
|
-
|
|
287
|
-
signature: string;
|
|
288
|
-
purchaseData: {
|
|
289
|
-
amount: number;
|
|
290
|
-
productId: string;
|
|
291
|
-
nullifier: string;
|
|
292
|
-
}[];
|
|
293
|
-
chainId: number;
|
|
294
|
-
verifyingContract: `0x${string}`;
|
|
295
|
-
nonce: bigint;
|
|
296
|
-
deadline: bigint;
|
|
297
|
-
}, {
|
|
298
|
-
shopAddress: string;
|
|
299
|
-
signature: string;
|
|
300
|
-
purchaseData: {
|
|
301
|
-
amount: number;
|
|
302
|
-
productId: string;
|
|
303
|
-
nullifier: string;
|
|
304
|
-
}[];
|
|
305
|
-
chainId: number;
|
|
306
|
-
verifyingContract: string;
|
|
307
|
-
nonce: string | number | bigint;
|
|
308
|
-
deadline: string | number | bigint;
|
|
309
|
-
}>;
|
|
310
|
-
}, "strip", z.ZodTypeAny, {
|
|
311
|
-
signature: {
|
|
312
|
-
shopAddress: `0x${string}`;
|
|
313
|
-
signature: string;
|
|
314
|
-
purchaseData: {
|
|
315
|
-
amount: number;
|
|
316
|
-
productId: string;
|
|
317
|
-
nullifier: string;
|
|
318
|
-
}[];
|
|
319
|
-
chainId: number;
|
|
320
|
-
verifyingContract: `0x${string}`;
|
|
321
|
-
nonce: bigint;
|
|
322
|
-
deadline: bigint;
|
|
323
|
-
};
|
|
324
|
-
}, {
|
|
325
|
-
signature: {
|
|
326
|
-
shopAddress: string;
|
|
327
|
-
signature: string;
|
|
328
|
-
purchaseData: {
|
|
329
|
-
amount: number;
|
|
330
|
-
productId: string;
|
|
331
|
-
nullifier: string;
|
|
332
|
-
}[];
|
|
333
|
-
chainId: number;
|
|
334
|
-
verifyingContract: string;
|
|
335
|
-
nonce: string | number | bigint;
|
|
336
|
-
deadline: string | number | bigint;
|
|
337
|
-
};
|
|
338
|
-
}>;
|
|
171
|
+
verifyingContract: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
172
|
+
shopAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
173
|
+
nonce: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodTransform<bigint, string | number | bigint>>;
|
|
174
|
+
deadline: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodTransform<bigint, string | number | bigint>>;
|
|
175
|
+
}, z.core.$strip>;
|
|
176
|
+
}, z.core.$strip>;
|
|
339
177
|
export type ClaimNFTInputs = z.infer<typeof ClaimNFTInputsSchema>;
|
|
340
178
|
export declare const CartItemSchema: z.ZodObject<{
|
|
341
179
|
id: z.ZodNumber;
|
|
342
180
|
amount: z.ZodNumber;
|
|
343
181
|
isAffiliate: z.ZodBoolean;
|
|
344
|
-
shopAddress: z.
|
|
345
|
-
},
|
|
346
|
-
shopAddress: `0x${string}`;
|
|
347
|
-
amount: number;
|
|
348
|
-
id: number;
|
|
349
|
-
isAffiliate: boolean;
|
|
350
|
-
}, {
|
|
351
|
-
shopAddress: string;
|
|
352
|
-
amount: number;
|
|
353
|
-
id: number;
|
|
354
|
-
isAffiliate: boolean;
|
|
355
|
-
}>;
|
|
182
|
+
shopAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
183
|
+
}, z.core.$strip>;
|
|
356
184
|
export type CartItem = z.infer<typeof CartItemSchema>;
|
|
357
|
-
export declare const ChainPaymentSchema: z.
|
|
185
|
+
export declare const ChainPaymentSchema: z.ZodObject<{
|
|
358
186
|
chainLinkRoundId: z.ZodOptional<z.ZodString>;
|
|
359
|
-
totalPrice: z.
|
|
360
|
-
tbdValues: z.ZodArray<z.
|
|
361
|
-
tbdReceivers: z.ZodArray<z.
|
|
362
|
-
tokenAddress: z.ZodOptional<z.
|
|
187
|
+
totalPrice: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodTransform<bigint, string | number | bigint>>;
|
|
188
|
+
tbdValues: z.ZodArray<z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodTransform<bigint, string | number | bigint>>>;
|
|
189
|
+
tbdReceivers: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>;
|
|
190
|
+
tokenAddress: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>;
|
|
363
191
|
cartItems: z.ZodArray<z.ZodObject<{
|
|
364
192
|
id: z.ZodNumber;
|
|
365
193
|
amount: z.ZodNumber;
|
|
366
194
|
isAffiliate: z.ZodBoolean;
|
|
367
|
-
shopAddress: z.
|
|
368
|
-
},
|
|
369
|
-
shopAddress: `0x${string}`;
|
|
370
|
-
amount: number;
|
|
371
|
-
id: number;
|
|
372
|
-
isAffiliate: boolean;
|
|
373
|
-
}, {
|
|
374
|
-
shopAddress: string;
|
|
375
|
-
amount: number;
|
|
376
|
-
id: number;
|
|
377
|
-
isAffiliate: boolean;
|
|
378
|
-
}>, "many">;
|
|
195
|
+
shopAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
196
|
+
}, z.core.$strip>>;
|
|
379
197
|
memo: z.ZodString;
|
|
380
|
-
},
|
|
381
|
-
totalPrice: bigint;
|
|
382
|
-
tbdValues: bigint[];
|
|
383
|
-
tbdReceivers: `0x${string}`[];
|
|
384
|
-
cartItems: {
|
|
385
|
-
shopAddress: `0x${string}`;
|
|
386
|
-
amount: number;
|
|
387
|
-
id: number;
|
|
388
|
-
isAffiliate: boolean;
|
|
389
|
-
}[];
|
|
390
|
-
memo: string;
|
|
391
|
-
chainLinkRoundId?: string | undefined;
|
|
392
|
-
tokenAddress?: `0x${string}` | undefined;
|
|
393
|
-
}, {
|
|
394
|
-
totalPrice: string | number | bigint;
|
|
395
|
-
tbdValues: (string | number | bigint)[];
|
|
396
|
-
tbdReceivers: string[];
|
|
397
|
-
cartItems: {
|
|
398
|
-
shopAddress: string;
|
|
399
|
-
amount: number;
|
|
400
|
-
id: number;
|
|
401
|
-
isAffiliate: boolean;
|
|
402
|
-
}[];
|
|
403
|
-
memo: string;
|
|
404
|
-
chainLinkRoundId?: string | undefined;
|
|
405
|
-
tokenAddress?: string | undefined;
|
|
406
|
-
}>, {
|
|
407
|
-
totalPrice: bigint;
|
|
408
|
-
tbdValues: bigint[];
|
|
409
|
-
tbdReceivers: `0x${string}`[];
|
|
410
|
-
cartItems: {
|
|
411
|
-
shopAddress: `0x${string}`;
|
|
412
|
-
amount: number;
|
|
413
|
-
id: number;
|
|
414
|
-
isAffiliate: boolean;
|
|
415
|
-
}[];
|
|
416
|
-
memo: string;
|
|
417
|
-
chainLinkRoundId?: string | undefined;
|
|
418
|
-
tokenAddress?: `0x${string}` | undefined;
|
|
419
|
-
}, {
|
|
420
|
-
totalPrice: string | number | bigint;
|
|
421
|
-
tbdValues: (string | number | bigint)[];
|
|
422
|
-
tbdReceivers: string[];
|
|
423
|
-
cartItems: {
|
|
424
|
-
shopAddress: string;
|
|
425
|
-
amount: number;
|
|
426
|
-
id: number;
|
|
427
|
-
isAffiliate: boolean;
|
|
428
|
-
}[];
|
|
429
|
-
memo: string;
|
|
430
|
-
chainLinkRoundId?: string | undefined;
|
|
431
|
-
tokenAddress?: string | undefined;
|
|
432
|
-
}>;
|
|
198
|
+
}, z.core.$strip>;
|
|
433
199
|
export type IChainPayment = z.infer<typeof ChainPaymentSchema>;
|
|
434
200
|
export declare const AirdropReceiverSchema: z.ZodObject<{
|
|
435
|
-
receiver: z.
|
|
436
|
-
amount: z.
|
|
437
|
-
},
|
|
438
|
-
amount: bigint;
|
|
439
|
-
receiver: `0x${string}`;
|
|
440
|
-
}, {
|
|
441
|
-
amount: string | number | bigint;
|
|
442
|
-
receiver: string;
|
|
443
|
-
}>;
|
|
201
|
+
receiver: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
202
|
+
amount: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodTransform<bigint, string | number | bigint>>;
|
|
203
|
+
}, z.core.$strip>;
|
|
444
204
|
export type AirdropReceiver = z.infer<typeof AirdropReceiverSchema>;
|
|
445
205
|
export declare const Erc20AirdropSchema: z.ZodObject<{
|
|
446
206
|
type: z.ZodLiteral<TokenStandard.ERC20>;
|
|
447
|
-
tokenAddress: z.
|
|
207
|
+
tokenAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
448
208
|
receivers: z.ZodArray<z.ZodObject<{
|
|
449
|
-
receiver: z.
|
|
450
|
-
amount: z.
|
|
451
|
-
},
|
|
452
|
-
amount: bigint;
|
|
453
|
-
receiver: `0x${string}`;
|
|
454
|
-
}, {
|
|
455
|
-
amount: string | number | bigint;
|
|
456
|
-
receiver: string;
|
|
457
|
-
}>, "many">;
|
|
209
|
+
receiver: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
210
|
+
amount: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodTransform<bigint, string | number | bigint>>;
|
|
211
|
+
}, z.core.$strip>>;
|
|
458
212
|
airdropId: z.ZodString;
|
|
459
213
|
chunkSize: z.ZodOptional<z.ZodNumber>;
|
|
460
|
-
},
|
|
461
|
-
type: TokenStandard.ERC20;
|
|
462
|
-
tokenAddress: `0x${string}`;
|
|
463
|
-
receivers: {
|
|
464
|
-
amount: bigint;
|
|
465
|
-
receiver: `0x${string}`;
|
|
466
|
-
}[];
|
|
467
|
-
airdropId: string;
|
|
468
|
-
chunkSize?: number | undefined;
|
|
469
|
-
}, {
|
|
470
|
-
type: TokenStandard.ERC20;
|
|
471
|
-
tokenAddress: string;
|
|
472
|
-
receivers: {
|
|
473
|
-
amount: string | number | bigint;
|
|
474
|
-
receiver: string;
|
|
475
|
-
}[];
|
|
476
|
-
airdropId: string;
|
|
477
|
-
chunkSize?: number | undefined;
|
|
478
|
-
}>;
|
|
214
|
+
}, z.core.$strip>;
|
|
479
215
|
export declare const Erc721AirdropSchema: z.ZodObject<{
|
|
480
216
|
type: z.ZodLiteral<TokenStandard.ERC721>;
|
|
481
|
-
tokenAddress: z.
|
|
217
|
+
tokenAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
482
218
|
receivers: z.ZodArray<z.ZodObject<{
|
|
483
|
-
receiver: z.
|
|
484
|
-
amount: z.
|
|
485
|
-
},
|
|
486
|
-
amount: bigint;
|
|
487
|
-
receiver: `0x${string}`;
|
|
488
|
-
}, {
|
|
489
|
-
amount: string | number | bigint;
|
|
490
|
-
receiver: string;
|
|
491
|
-
}>, "many">;
|
|
219
|
+
receiver: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
220
|
+
amount: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodTransform<bigint, string | number | bigint>>;
|
|
221
|
+
}, z.core.$strip>>;
|
|
492
222
|
airdropId: z.ZodString;
|
|
493
223
|
chunkSize: z.ZodOptional<z.ZodNumber>;
|
|
494
|
-
},
|
|
495
|
-
type: TokenStandard.ERC721;
|
|
496
|
-
tokenAddress: `0x${string}`;
|
|
497
|
-
receivers: {
|
|
498
|
-
amount: bigint;
|
|
499
|
-
receiver: `0x${string}`;
|
|
500
|
-
}[];
|
|
501
|
-
airdropId: string;
|
|
502
|
-
chunkSize?: number | undefined;
|
|
503
|
-
}, {
|
|
504
|
-
type: TokenStandard.ERC721;
|
|
505
|
-
tokenAddress: string;
|
|
506
|
-
receivers: {
|
|
507
|
-
amount: string | number | bigint;
|
|
508
|
-
receiver: string;
|
|
509
|
-
}[];
|
|
510
|
-
airdropId: string;
|
|
511
|
-
chunkSize?: number | undefined;
|
|
512
|
-
}>;
|
|
224
|
+
}, z.core.$strip>;
|
|
513
225
|
export declare const Erc1155AirdropSchema: z.ZodObject<{
|
|
514
226
|
type: z.ZodLiteral<TokenStandard.ERC1155>;
|
|
515
|
-
tokenAddress: z.
|
|
516
|
-
tokenId: z.
|
|
227
|
+
tokenAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
228
|
+
tokenId: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodTransform<bigint, string | number | bigint>>;
|
|
517
229
|
receivers: z.ZodArray<z.ZodObject<{
|
|
518
|
-
receiver: z.
|
|
519
|
-
amount: z.
|
|
520
|
-
},
|
|
521
|
-
amount: bigint;
|
|
522
|
-
receiver: `0x${string}`;
|
|
523
|
-
}, {
|
|
524
|
-
amount: string | number | bigint;
|
|
525
|
-
receiver: string;
|
|
526
|
-
}>, "many">;
|
|
230
|
+
receiver: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
231
|
+
amount: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodTransform<bigint, string | number | bigint>>;
|
|
232
|
+
}, z.core.$strip>>;
|
|
527
233
|
airdropId: z.ZodString;
|
|
528
234
|
chunkSize: z.ZodOptional<z.ZodNumber>;
|
|
529
|
-
},
|
|
530
|
-
|
|
531
|
-
tokenAddress: `0x${string}`;
|
|
532
|
-
receivers: {
|
|
533
|
-
amount: bigint;
|
|
534
|
-
receiver: `0x${string}`;
|
|
535
|
-
}[];
|
|
536
|
-
airdropId: string;
|
|
537
|
-
tokenId: bigint;
|
|
538
|
-
chunkSize?: number | undefined;
|
|
539
|
-
}, {
|
|
540
|
-
type: TokenStandard.ERC1155;
|
|
541
|
-
tokenAddress: string;
|
|
542
|
-
receivers: {
|
|
543
|
-
amount: string | number | bigint;
|
|
544
|
-
receiver: string;
|
|
545
|
-
}[];
|
|
546
|
-
airdropId: string;
|
|
547
|
-
tokenId: string | number | bigint;
|
|
548
|
-
chunkSize?: number | undefined;
|
|
549
|
-
}>;
|
|
550
|
-
export declare const ITokenDetailsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
235
|
+
}, z.core.$strip>;
|
|
236
|
+
export declare const ITokenDetailsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
551
237
|
type: z.ZodLiteral<TokenStandard.ERC20>;
|
|
552
|
-
tokenAddress: z.
|
|
238
|
+
tokenAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
553
239
|
receivers: z.ZodArray<z.ZodObject<{
|
|
554
|
-
receiver: z.
|
|
555
|
-
amount: z.
|
|
556
|
-
},
|
|
557
|
-
amount: bigint;
|
|
558
|
-
receiver: `0x${string}`;
|
|
559
|
-
}, {
|
|
560
|
-
amount: string | number | bigint;
|
|
561
|
-
receiver: string;
|
|
562
|
-
}>, "many">;
|
|
240
|
+
receiver: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
241
|
+
amount: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodTransform<bigint, string | number | bigint>>;
|
|
242
|
+
}, z.core.$strip>>;
|
|
563
243
|
airdropId: z.ZodString;
|
|
564
244
|
chunkSize: z.ZodOptional<z.ZodNumber>;
|
|
565
|
-
},
|
|
566
|
-
type: TokenStandard.ERC20;
|
|
567
|
-
tokenAddress: `0x${string}`;
|
|
568
|
-
receivers: {
|
|
569
|
-
amount: bigint;
|
|
570
|
-
receiver: `0x${string}`;
|
|
571
|
-
}[];
|
|
572
|
-
airdropId: string;
|
|
573
|
-
chunkSize?: number | undefined;
|
|
574
|
-
}, {
|
|
575
|
-
type: TokenStandard.ERC20;
|
|
576
|
-
tokenAddress: string;
|
|
577
|
-
receivers: {
|
|
578
|
-
amount: string | number | bigint;
|
|
579
|
-
receiver: string;
|
|
580
|
-
}[];
|
|
581
|
-
airdropId: string;
|
|
582
|
-
chunkSize?: number | undefined;
|
|
583
|
-
}>, z.ZodObject<{
|
|
245
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
584
246
|
type: z.ZodLiteral<TokenStandard.ERC721>;
|
|
585
|
-
tokenAddress: z.
|
|
247
|
+
tokenAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
586
248
|
receivers: z.ZodArray<z.ZodObject<{
|
|
587
|
-
receiver: z.
|
|
588
|
-
amount: z.
|
|
589
|
-
},
|
|
590
|
-
amount: bigint;
|
|
591
|
-
receiver: `0x${string}`;
|
|
592
|
-
}, {
|
|
593
|
-
amount: string | number | bigint;
|
|
594
|
-
receiver: string;
|
|
595
|
-
}>, "many">;
|
|
249
|
+
receiver: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
250
|
+
amount: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodTransform<bigint, string | number | bigint>>;
|
|
251
|
+
}, z.core.$strip>>;
|
|
596
252
|
airdropId: z.ZodString;
|
|
597
253
|
chunkSize: z.ZodOptional<z.ZodNumber>;
|
|
598
|
-
},
|
|
599
|
-
type: TokenStandard.ERC721;
|
|
600
|
-
tokenAddress: `0x${string}`;
|
|
601
|
-
receivers: {
|
|
602
|
-
amount: bigint;
|
|
603
|
-
receiver: `0x${string}`;
|
|
604
|
-
}[];
|
|
605
|
-
airdropId: string;
|
|
606
|
-
chunkSize?: number | undefined;
|
|
607
|
-
}, {
|
|
608
|
-
type: TokenStandard.ERC721;
|
|
609
|
-
tokenAddress: string;
|
|
610
|
-
receivers: {
|
|
611
|
-
amount: string | number | bigint;
|
|
612
|
-
receiver: string;
|
|
613
|
-
}[];
|
|
614
|
-
airdropId: string;
|
|
615
|
-
chunkSize?: number | undefined;
|
|
616
|
-
}>, z.ZodObject<{
|
|
254
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
617
255
|
type: z.ZodLiteral<TokenStandard.ERC1155>;
|
|
618
|
-
tokenAddress: z.
|
|
619
|
-
tokenId: z.
|
|
256
|
+
tokenAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
257
|
+
tokenId: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodTransform<bigint, string | number | bigint>>;
|
|
620
258
|
receivers: z.ZodArray<z.ZodObject<{
|
|
621
|
-
receiver: z.
|
|
622
|
-
amount: z.
|
|
623
|
-
},
|
|
624
|
-
amount: bigint;
|
|
625
|
-
receiver: `0x${string}`;
|
|
626
|
-
}, {
|
|
627
|
-
amount: string | number | bigint;
|
|
628
|
-
receiver: string;
|
|
629
|
-
}>, "many">;
|
|
259
|
+
receiver: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
260
|
+
amount: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodTransform<bigint, string | number | bigint>>;
|
|
261
|
+
}, z.core.$strip>>;
|
|
630
262
|
airdropId: z.ZodString;
|
|
631
263
|
chunkSize: z.ZodOptional<z.ZodNumber>;
|
|
632
|
-
},
|
|
633
|
-
type: TokenStandard.ERC1155;
|
|
634
|
-
tokenAddress: `0x${string}`;
|
|
635
|
-
receivers: {
|
|
636
|
-
amount: bigint;
|
|
637
|
-
receiver: `0x${string}`;
|
|
638
|
-
}[];
|
|
639
|
-
airdropId: string;
|
|
640
|
-
tokenId: bigint;
|
|
641
|
-
chunkSize?: number | undefined;
|
|
642
|
-
}, {
|
|
643
|
-
type: TokenStandard.ERC1155;
|
|
644
|
-
tokenAddress: string;
|
|
645
|
-
receivers: {
|
|
646
|
-
amount: string | number | bigint;
|
|
647
|
-
receiver: string;
|
|
648
|
-
}[];
|
|
649
|
-
airdropId: string;
|
|
650
|
-
tokenId: string | number | bigint;
|
|
651
|
-
chunkSize?: number | undefined;
|
|
652
|
-
}>]>;
|
|
264
|
+
}, z.core.$strip>], "type">;
|
|
653
265
|
export type ITokenDetails = z.infer<typeof ITokenDetailsSchema>;
|
|
654
266
|
export declare const LoginResultSchema: z.ZodObject<{
|
|
655
|
-
address: z.
|
|
267
|
+
address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
656
268
|
signature: z.ZodString;
|
|
657
|
-
nonce: z.
|
|
269
|
+
nonce: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodTransform<bigint, string | number | bigint>>;
|
|
658
270
|
date: z.ZodString;
|
|
659
|
-
},
|
|
660
|
-
date: string;
|
|
661
|
-
signature: string;
|
|
662
|
-
nonce: bigint;
|
|
663
|
-
address: `0x${string}`;
|
|
664
|
-
}, {
|
|
665
|
-
date: string;
|
|
666
|
-
signature: string;
|
|
667
|
-
nonce: string | number | bigint;
|
|
668
|
-
address: string;
|
|
669
|
-
}>;
|
|
271
|
+
}, z.core.$strip>;
|
|
670
272
|
export type ILoginResult = z.infer<typeof LoginResultSchema>;
|
|
671
273
|
export declare const PaymentInputsSchema: z.ZodObject<{
|
|
672
274
|
cartID: z.ZodString;
|
|
673
|
-
paymentToken: z.
|
|
674
|
-
paymentType: z.
|
|
675
|
-
},
|
|
676
|
-
cartID: string;
|
|
677
|
-
paymentToken: PaymentTokens;
|
|
678
|
-
paymentType: Chain;
|
|
679
|
-
}, {
|
|
680
|
-
cartID: string;
|
|
681
|
-
paymentToken: PaymentTokens;
|
|
682
|
-
paymentType: Chain;
|
|
683
|
-
}>;
|
|
275
|
+
paymentToken: z.ZodEnum<typeof PaymentTokens>;
|
|
276
|
+
paymentType: z.ZodEnum<typeof Chain>;
|
|
277
|
+
}, z.core.$strip>;
|
|
684
278
|
export type IPaymentInputs = z.infer<typeof PaymentInputsSchema>;
|
|
685
279
|
export interface PrivilegedActionAck {
|
|
686
280
|
/**
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,OAAO,EAAO,MAAM,MAAM,CAAC;AAMzC;;;GAGG;AACH,oBAAY,KAAK;IACf,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB;;;;;OAKG;IACH,WAAW,gBAAgB;CAC5B;AAED,oBAAY,OAAO;IACjB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,GAAG,QAAQ;CACZ;AAED,oBAAY,WAAW;IACrB,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,eAAe,oBAAoB;CACpC;AAED,oBAAY,aAAa;IACvB,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,GAAG,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AI;CAGd"}
|
package/dist/types.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* a trust boundary is z.parse()'d before use. No `any`.
|
|
7
7
|
*/
|
|
8
8
|
import { z } from 'zod';
|
|
9
|
+
import { integer, urlString } from './zod-compat.js';
|
|
9
10
|
/* -------------------------------------------------------------------------- */
|
|
10
11
|
/* Re-exported chain enums */
|
|
11
12
|
/* -------------------------------------------------------------------------- */
|
|
@@ -86,13 +87,13 @@ export var TokenStandard;
|
|
|
86
87
|
TokenStandard["ERC721"] = "ERC721";
|
|
87
88
|
TokenStandard["ERC1155"] = "ERC1155";
|
|
88
89
|
})(TokenStandard || (TokenStandard = {}));
|
|
89
|
-
export const ChainSchema = z.
|
|
90
|
-
export const NetworkSchema = z.
|
|
91
|
-
export const ChainWalletSchema = z.
|
|
92
|
-
export const PaymentTokensSchema = z.
|
|
93
|
-
export const Web3ActionsSchema = z.
|
|
94
|
-
export const TokenStandardSchema = z.
|
|
95
|
-
export const ProductTypeSchema = z.
|
|
90
|
+
export const ChainSchema = z.enum(Chain);
|
|
91
|
+
export const NetworkSchema = z.enum(Network);
|
|
92
|
+
export const ChainWalletSchema = z.enum(ChainWallet);
|
|
93
|
+
export const PaymentTokensSchema = z.enum(PaymentTokens);
|
|
94
|
+
export const Web3ActionsSchema = z.enum(Web3Actions);
|
|
95
|
+
export const TokenStandardSchema = z.enum(TokenStandard);
|
|
96
|
+
export const ProductTypeSchema = z.enum(ProductType);
|
|
96
97
|
/* -------------------------------------------------------------------------- */
|
|
97
98
|
/* EVM primitives */
|
|
98
99
|
/* -------------------------------------------------------------------------- */
|
|
@@ -118,7 +119,7 @@ export const Bytes32Schema = z
|
|
|
118
119
|
.transform((s) => s.toLowerCase());
|
|
119
120
|
/** Accept bigint, integer number, or numeric string; coerce to bigint. */
|
|
120
121
|
export const Uint256Schema = z
|
|
121
|
-
.union([z.bigint(),
|
|
122
|
+
.union([z.bigint(), integer().nonnegative(), z.string().regex(/^[0-9]+$/u)])
|
|
122
123
|
.transform((v) => {
|
|
123
124
|
if (typeof v === 'bigint')
|
|
124
125
|
return v;
|
|
@@ -145,15 +146,15 @@ export const DeployShopResponseSchema = z.object({
|
|
|
145
146
|
export const ProductDetailsSchema = z.object({
|
|
146
147
|
productTitle: z.string().min(1).max(256),
|
|
147
148
|
description: z.string().max(4096),
|
|
148
|
-
commission:
|
|
149
|
+
commission: integer().min(0).max(10000),
|
|
149
150
|
type: ProductTypeSchema,
|
|
150
151
|
acceptsManageWallet: z.boolean(),
|
|
151
|
-
royalty:
|
|
152
|
+
royalty: integer().min(0).max(10000),
|
|
152
153
|
});
|
|
153
154
|
export const SKUDetailsSchema = z.object({
|
|
154
|
-
skuProperties: z.record(z.unknown()),
|
|
155
|
-
imageUrl:
|
|
156
|
-
amount:
|
|
155
|
+
skuProperties: z.record(z.string(), z.unknown()),
|
|
156
|
+
imageUrl: urlString().max(2048),
|
|
157
|
+
amount: integer().nonnegative(),
|
|
157
158
|
skuID: z.string().min(1).max(128),
|
|
158
159
|
});
|
|
159
160
|
export const RecordResponseSchema = z.object({
|
|
@@ -169,7 +170,7 @@ export const PurchaseDataSchema = z.object({
|
|
|
169
170
|
shopAddress: EvmAddressSchema,
|
|
170
171
|
});
|
|
171
172
|
export const PurchaseConfirmationItemSchema = z.object({
|
|
172
|
-
amount:
|
|
173
|
+
amount: integer().positive(),
|
|
173
174
|
productId: z.string().min(1),
|
|
174
175
|
nullifier: z.string().regex(/^0x[a-fA-F0-9]+$/u, 'nullifier must be 0x-hex'),
|
|
175
176
|
});
|
|
@@ -179,7 +180,7 @@ export const PurchaseSignatureSchema = z.object({
|
|
|
179
180
|
// EIP-712 binding: included in the signed typed-data domain.
|
|
180
181
|
// Required for the new package; the v5.0.2 ABI accepted bare bytes blobs
|
|
181
182
|
// with no domain binding — this is one of the key hardening deltas.
|
|
182
|
-
chainId:
|
|
183
|
+
chainId: integer().positive(),
|
|
183
184
|
verifyingContract: EvmAddressSchema,
|
|
184
185
|
// Pinned shop address; embedded in the signed message body. Carried on
|
|
185
186
|
// the wire so the verifier can reconstruct the identical typed-data
|
|
@@ -195,8 +196,8 @@ export const ClaimNFTInputsSchema = z.object({
|
|
|
195
196
|
});
|
|
196
197
|
/* ---- chain-payment ---- */
|
|
197
198
|
export const CartItemSchema = z.object({
|
|
198
|
-
id:
|
|
199
|
-
amount:
|
|
199
|
+
id: integer().nonnegative(),
|
|
200
|
+
amount: integer().positive(),
|
|
200
201
|
isAffiliate: z.boolean(),
|
|
201
202
|
shopAddress: EvmAddressSchema,
|
|
202
203
|
});
|
|
@@ -219,14 +220,14 @@ export const Erc20AirdropSchema = z.object({
|
|
|
219
220
|
tokenAddress: EvmAddressSchema,
|
|
220
221
|
receivers: z.array(AirdropReceiverSchema).min(1).max(10000),
|
|
221
222
|
airdropId: z.string().min(1),
|
|
222
|
-
chunkSize:
|
|
223
|
+
chunkSize: integer().positive().max(500).optional(),
|
|
223
224
|
});
|
|
224
225
|
export const Erc721AirdropSchema = z.object({
|
|
225
226
|
type: z.literal(TokenStandard.ERC721),
|
|
226
227
|
tokenAddress: EvmAddressSchema,
|
|
227
228
|
receivers: z.array(AirdropReceiverSchema).min(1).max(10000),
|
|
228
229
|
airdropId: z.string().min(1),
|
|
229
|
-
chunkSize:
|
|
230
|
+
chunkSize: integer().positive().max(500).optional(),
|
|
230
231
|
});
|
|
231
232
|
export const Erc1155AirdropSchema = z.object({
|
|
232
233
|
type: z.literal(TokenStandard.ERC1155),
|
|
@@ -234,7 +235,7 @@ export const Erc1155AirdropSchema = z.object({
|
|
|
234
235
|
tokenId: Uint256Schema,
|
|
235
236
|
receivers: z.array(AirdropReceiverSchema).min(1).max(10000),
|
|
236
237
|
airdropId: z.string().min(1),
|
|
237
|
-
chunkSize:
|
|
238
|
+
chunkSize: integer().positive().max(500).optional(),
|
|
238
239
|
});
|
|
239
240
|
export const ITokenDetailsSchema = z.discriminatedUnion('type', [
|
|
240
241
|
Erc20AirdropSchema,
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGrD,gFAAgF;AAChF,iFAAiF;AACjF,gFAAgF;AAEhF;;;GAGG;AACH,MAAM,CAAN,IAAY,KAiBX;AAjBD,WAAY,KAAK;IACf,4BAAmB,CAAA;IACnB,4BAAmB,CAAA;IACnB,sBAAa,CAAA;IACb,wBAAe,CAAA;IACf,oBAAW,CAAA;IACX,0BAAiB,CAAA;IACjB,8BAAqB,CAAA;IACrB,wBAAe,CAAA;IACf,8BAAqB,CAAA;IACrB;;;;;OAKG;IACH,oCAA2B,CAAA;AAC7B,CAAC,EAjBW,KAAK,KAAL,KAAK,QAiBhB;AAED,MAAM,CAAN,IAAY,OAIX;AAJD,WAAY,OAAO;IACjB,8BAAmB,CAAA;IACnB,8BAAmB,CAAA;IACnB,sBAAW,CAAA;AACb,CAAC,EAJW,OAAO,KAAP,OAAO,QAIlB;AAED,MAAM,CAAN,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,oCAAqB,CAAA;IACrB,oCAAqB,CAAA;IACrB,kCAAmB,CAAA;IACnB,kDAAmC,CAAA;AACrC,CAAC,EALW,WAAW,KAAX,WAAW,QAKtB;AAED,MAAM,CAAN,IAAY,aAOX;AAPD,WAAY,aAAa;IACvB,4BAAW,CAAA;IACX,8BAAa,CAAA;IACb,8BAAa,CAAA;IACb,4BAAW,CAAA;IACX,gCAAe,CAAA;IACf,4BAAW,CAAA;AACb,CAAC,EAPW,aAAa,KAAb,a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CAAC,MAAM,CAAC;IAC1C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAClC,YAAY,EAAE,mBAAmB;IACjC,WAAW,EAAE,WAAW;CACzB,CAAC,CAAC;AAuBH,MAAM,OAAO,YAAY;IACvB,OAAO,CAAC,QAAgB;QACtB,mBAAmB;IACrB,CAAC;IACD,OAAO,CAAC,QAAgB;QACtB,mBAAmB;IACrB,CAAC;IACD,KAAK,CAAC,QAAgB;QACpB,mBAAmB;IACrB,CAAC;IACD,KAAK;QACH,mBAAmB;IACrB,CAAC;CACF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Behaviour-preserving schema primitives for the zod 3 -> zod 4 migration.
|
|
3
|
+
*
|
|
4
|
+
* zod 4 narrowed two zod 3 checks that this package's schemas relied on.
|
|
5
|
+
* Each helper restores the zod 3 acceptance set and output exactly:
|
|
6
|
+
*
|
|
7
|
+
* - `.int()` — zod 4 also rejects integers beyond `Number.MAX_SAFE_INTEGER`;
|
|
8
|
+
* zod 3 accepted any integer (e.g. `1e18` wei passed as a JS number to
|
|
9
|
+
* `Uint256Schema`).
|
|
10
|
+
* - `.url()` — zod 4 trims and strips tab/newline from the parsed value;
|
|
11
|
+
* zod 3 validated with `new URL()` and returned the input untouched.
|
|
12
|
+
*
|
|
13
|
+
* Internal: not re-exported from the package entry point.
|
|
14
|
+
*/
|
|
15
|
+
import { z } from 'zod';
|
|
16
|
+
/** Any integer, as zod 3's `z.number().int()` accepted. */
|
|
17
|
+
export declare function integer(): z.ZodNumber;
|
|
18
|
+
/** Any string `new URL()` accepts, returned unmodified (zod 3 `.url()`). */
|
|
19
|
+
export declare function urlString(): z.ZodString;
|
|
20
|
+
//# sourceMappingURL=zod-compat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zod-compat.d.ts","sourceRoot":"","sources":["../src/zod-compat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,2DAA2D;AAC3D,wBAAgB,OAAO,gBAEtB;AAED,4EAA4E;AAC5E,wBAAgB,SAAS,gBAYxB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Behaviour-preserving schema primitives for the zod 3 -> zod 4 migration.
|
|
3
|
+
*
|
|
4
|
+
* zod 4 narrowed two zod 3 checks that this package's schemas relied on.
|
|
5
|
+
* Each helper restores the zod 3 acceptance set and output exactly:
|
|
6
|
+
*
|
|
7
|
+
* - `.int()` — zod 4 also rejects integers beyond `Number.MAX_SAFE_INTEGER`;
|
|
8
|
+
* zod 3 accepted any integer (e.g. `1e18` wei passed as a JS number to
|
|
9
|
+
* `Uint256Schema`).
|
|
10
|
+
* - `.url()` — zod 4 trims and strips tab/newline from the parsed value;
|
|
11
|
+
* zod 3 validated with `new URL()` and returned the input untouched.
|
|
12
|
+
*
|
|
13
|
+
* Internal: not re-exported from the package entry point.
|
|
14
|
+
*/
|
|
15
|
+
import { z } from 'zod';
|
|
16
|
+
/** Any integer, as zod 3's `z.number().int()` accepted. */
|
|
17
|
+
export function integer() {
|
|
18
|
+
return z.number().refine(Number.isInteger, { error: 'Expected integer, received float' });
|
|
19
|
+
}
|
|
20
|
+
/** Any string `new URL()` accepts, returned unmodified (zod 3 `.url()`). */
|
|
21
|
+
export function urlString() {
|
|
22
|
+
return z.string().refine((s) => {
|
|
23
|
+
try {
|
|
24
|
+
new URL(s);
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
}, { error: 'Invalid url' });
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=zod-compat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zod-compat.js","sourceRoot":"","sources":["../src/zod-compat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,2DAA2D;AAC3D,MAAM,UAAU,OAAO;IACrB,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,kCAAkC,EAAE,CAAC,CAAC;AAC5F,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,SAAS;IACvB,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CACtB,CAAC,CAAC,EAAE,EAAE;QACJ,IAAI,CAAC;YACH,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC;YACX,OAAO,IAAI,CAAC;QACd,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC,EACD,EAAE,KAAK,EAAE,aAAa,EAAE,CACzB,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@droplinked_inc/web3",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Per-shop EVM contract interactions for droplinked (shop deploy, product record, purchase signing, claim, airdrop). Hardened rebuild — replaces the hostile-published droplinked-web3@5.0.2 by k3rn3lpanic.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -21,19 +21,19 @@
|
|
|
21
21
|
"sideEffects": false,
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"viem": "^2.21.0",
|
|
24
|
-
"zod": "^
|
|
24
|
+
"zod": "^4.6.7"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@droplinked_inc/wallet-connection": "0.
|
|
28
|
-
"@droplinked_inc/web3-kit": "
|
|
27
|
+
"@droplinked_inc/wallet-connection": "0.5.0",
|
|
28
|
+
"@droplinked_inc/web3-kit": "3.0.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/jest": "^29.5.12",
|
|
32
32
|
"@types/node": "^22.5.0",
|
|
33
33
|
"fast-check": "^3.22.0",
|
|
34
34
|
"typescript": "^5.6.0",
|
|
35
|
-
"@droplinked_inc/wallet-connection": "0.
|
|
36
|
-
"@droplinked_inc/web3-kit": "
|
|
35
|
+
"@droplinked_inc/wallet-connection": "0.5.0",
|
|
36
|
+
"@droplinked_inc/web3-kit": "3.0.0"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"provenance": false,
|