@argent/x-shared 1.77.1 → 1.78.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/index.cjs +1 -1
- package/dist/index.js +120 -122
- package/dist/paymaster.cjs +1 -1
- package/dist/paymaster.js +5 -4
- package/dist/simulation.cjs +1 -1
- package/dist/simulation.js +18 -20
- package/dist/src/features/paymaster/IPaymasterService.d.ts +2 -1
- package/dist/src/features/paymaster/PaymasterService.cjs +1 -1
- package/dist/src/features/paymaster/PaymasterService.d.ts +2 -1
- package/dist/src/features/paymaster/PaymasterService.js +49 -30
- package/dist/src/features/paymaster/types.cjs +1 -1
- package/dist/src/features/paymaster/types.d.ts +17 -0
- package/dist/src/features/paymaster/types.js +21 -11
- package/dist/src/features/simulation/activity/schema.cjs +1 -1
- package/dist/src/features/simulation/activity/schema.d.ts +0 -27
- package/dist/src/features/simulation/activity/schema.js +40 -43
- package/dist/src/features/simulation/transactionReview/schema.cjs +1 -1
- package/dist/src/features/simulation/transactionReview/schema.d.ts +0 -18
- package/dist/src/features/simulation/transactionReview/schema.js +70 -77
- package/dist/src/transactions/transactionExecuteTypes.cjs +1 -1
- package/dist/src/transactions/transactionExecuteTypes.d.ts +0 -43
- package/dist/src/transactions/transactionExecuteTypes.js +3 -18
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("zod"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("zod"),p=require("../warning/schema.cjs"),A=require("../fees/schema.cjs"),t=require("../../../chains/starknet/address.cjs"),T=e.z.object({name:e.z.string(),url:e.z.string(),position:e.z.number()}),i=e.z.object({address:e.z.string(),name:e.z.string(),symbol:e.z.string().optional(),decimals:e.z.number().optional(),unknown:e.z.boolean(),iconUrl:e.z.string().optional(),type:e.z.string()}),s=e.z.discriminatedUnion("type",[e.z.object({type:e.z.literal("amount"),label:e.z.string(),token:i,amount:e.z.string(),usd:e.z.string(),editable:e.z.boolean()}),e.z.object({type:e.z.literal("address"),label:e.z.string(),address:e.z.string(),addressName:e.z.string().optional(),verified:e.z.boolean().optional()}),e.z.object({type:e.z.literal("timestamp"),label:e.z.string(),value:e.z.string()}),e.z.object({type:e.z.literal("token_address"),label:e.z.string(),token:i}),e.z.object({type:e.z.literal("calldata"),label:e.z.string(),entrypoint:e.z.string(),calldata:e.z.array(e.z.string())}),e.z.object({type:e.z.literal("class_hash"),label:e.z.string(),classHash:e.z.string()}),e.z.object({type:e.z.literal("text"),label:e.z.string(),text:e.z.string()}),e.z.object({type:e.z.literal("nft"),label:e.z.string(),token:i})]),d=e.z.object({name:e.z.string(),properties:e.z.array(s),defaultProperties:e.z.array(s).optional()}),g=e.z.union([e.z.literal("verified"),e.z.literal("neutral"),e.z.literal("partial"),e.z.literal("warn")]),u=e.z.object({unknown_token:e.z.unknown().optional(),date_of_addition:e.z.string().optional(),contract_address:t.addressSchema.optional(),reason:e.z.string().optional(),value:e.z.any().optional()}),r=e.z.object({reason:p.reasonsSchema,details:u.optional(),severity:p.severitySchema}),b=e.z.object({assessment:g,warnings:e.z.array(r).optional(),assessmentReasons:e.z.array(e.z.string()).optional(),assessmentDetails:e.z.object({contract_address:e.z.string()}).optional(),action:d}),S=e.z.object({name:e.z.string(),description:e.z.string(),logoUrl:e.z.string().optional(),iconUrl:e.z.string().optional(),argentVerified:e.z.boolean(),links:e.z.array(T)}),h=e.z.object({assessment:e.z.union([e.z.literal("verified"),e.z.literal("neutral"),e.z.literal("partial"),e.z.literal("warn")]),warnings:e.z.array(r).optional(),assessmentDetails:e.z.object({contract_address:e.z.string()}).optional(),targetedDapp:S.optional(),reviews:e.z.array(b)}).optional(),y=e.z.object({banner:e.z.string().nullable().optional(),preview:e.z.string().nullable().optional(),full:e.z.string().nullable().optional(),original:e.z.string().nullable().optional()}),B=e.z.object({twitter:e.z.string().optional(),external:e.z.string().optional(),discord:e.z.string().optional()}),l=e.z.object({address:t.addressSchemaArgentBackend,decimals:e.z.number().optional(),symbol:e.z.string().optional(),name:e.z.string(),description:e.z.string().optional(),type:e.z.string().optional(),usdValue:e.z.string().optional(),iconUrl:e.z.string().optional(),unknown:e.z.boolean().optional(),imageUrls:y.optional(),links:B.optional()}),D=e.z.object({tokenAddress:t.addressSchemaArgentBackend,owner:t.addressSchemaArgentBackend,spender:t.addressSchemaArgentBackend,value:e.z.string().optional(),approvalForAll:e.z.boolean(),details:l.optional()}),F=e.z.object({tokenAddress:t.addressSchemaArgentBackend,from:t.addressSchemaArgentBackend,to:t.addressSchemaArgentBackend,tokenId:e.z.string().optional(),value:e.z.string().optional(),details:l.optional()}),n=e.z.union([e.z.string(),e.z.number(),e.z.bigint()]).transform(a=>parseInt(a.toString(),10)),c=e.z.object({address:t.addressSchemaArgentBackend,unknown:e.z.boolean(),type:e.z.literal("ERC20")}),o=e.z.object({maxAmount:n,maxPricePerUnit:n}),j=e.z.object({l1Gas:o,l1DataGas:o,l2Gas:o}),f=e.z.object({token:c,overallFee:n,maxFee:n,defaultTip:n.optional()}),z=e.z.object({overallFee:n,resourceBounds:j,unit:e.z.string().transform(a=>a.toUpperCase()).pipe(e.z.literal("FRI")),token:c,defaultTip:n.optional()}),k=z.or(f),U=e.z.object({type:e.z.string(),label:e.z.string(),tokenId:e.z.string().optional(),value:e.z.string().optional(),token:l,sent:e.z.boolean().optional(),ccyValue:e.z.string().optional(),currency:e.z.string().optional(),tokenIdDetails:e.z.object({name:e.z.string().optional(),description:e.z.string().optional(),imageUrls:y.optional()}).optional()}),R=e.z.object({approvals:e.z.array(D).optional(),transfers:e.z.array(F).optional(),calculatedNonce:e.z.string().optional(),feeEstimation:z,feeEstimations:e.z.array(k),summary:e.z.array(U).optional()}),N=e.z.object({label:e.z.string().optional(),code:e.z.number().optional(),message:e.z.string().optional(),error:e.z.string().optional()}),v=e.z.object({reviewOfTransaction:h,simulation:R,simulationError:e.z.undefined().optional()}),w=e.z.object({reviewOfTransaction:h,simulation:e.z.undefined().optional(),simulationError:N}),E=v.or(w),m=e.z.object({subsidiseDeployment:e.z.boolean(),subsidiseTransaction:e.z.boolean()}),P=e.z.object({transactions:e.z.array(E).optional(),canSubsidise:e.z.boolean().optional(),subsidyStatus:m.optional()}),_=e.z.object({transactions:e.z.array(E).optional(),canSubsidise:e.z.boolean().optional(),subsidyStatus:m.optional(),enrichedFeeEstimation:e.z.array(A.estimatedFeesSchema).optional(),isBackendDown:e.z.boolean().default(!1).optional()});function O(a){return v.safeParse(a).success}function x(a){return w.safeParse(a).success}exports.actionSchema=d;exports.assessmentSchema=g;exports.enrichedSimulateAndReviewSchema=_;exports.feeEstimationGasSchema=o;exports.feeEstimationNativeOrPaymasterSchema=k;exports.feeEstimationResourceBoundSchema=j;exports.feeEstimationSchema=z;exports.isNotTransactionSimulationError=O;exports.isTransactionSimulationError=x;exports.paymasterFeeEstimationSchema=f;exports.paymasterFeeTokenSchema=c;exports.propertySchema=s;exports.reviewSchema=b;exports.simulateAndReviewSchema=P;exports.subsidyStatusSchema=m;exports.targetedDappSchema=S;exports.warningDetailsSchema=u;exports.warningSchema=r;
|
|
@@ -1890,17 +1890,7 @@ export declare const subsidyStatusSchema: z.ZodObject<{
|
|
|
1890
1890
|
subsidiseDeployment: z.ZodBoolean;
|
|
1891
1891
|
subsidiseTransaction: z.ZodBoolean;
|
|
1892
1892
|
}, z.core.$strip>;
|
|
1893
|
-
export declare const promotionSchema: z.ZodObject<{
|
|
1894
|
-
name: z.ZodOptional<z.ZodString>;
|
|
1895
|
-
shouldShow: z.ZodOptional<z.ZodBoolean>;
|
|
1896
|
-
}, z.core.$strip>;
|
|
1897
|
-
export declare const promotionsSchema: z.ZodArray<z.ZodObject<{
|
|
1898
|
-
name: z.ZodOptional<z.ZodString>;
|
|
1899
|
-
shouldShow: z.ZodOptional<z.ZodBoolean>;
|
|
1900
|
-
}, z.core.$strip>>;
|
|
1901
1893
|
export type SubsidyStatus = z.infer<typeof subsidyStatusSchema>;
|
|
1902
|
-
export type Promotion = z.infer<typeof promotionSchema>;
|
|
1903
|
-
export type Promotions = z.infer<typeof promotionsSchema>;
|
|
1904
1894
|
export declare const simulateAndReviewSchema: z.ZodObject<{
|
|
1905
1895
|
transactions: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
1906
1896
|
reviewOfTransaction: z.ZodOptional<z.ZodObject<{
|
|
@@ -2429,10 +2419,6 @@ export declare const simulateAndReviewSchema: z.ZodObject<{
|
|
|
2429
2419
|
subsidiseDeployment: z.ZodBoolean;
|
|
2430
2420
|
subsidiseTransaction: z.ZodBoolean;
|
|
2431
2421
|
}, z.core.$strip>>;
|
|
2432
|
-
promotions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2433
|
-
name: z.ZodOptional<z.ZodString>;
|
|
2434
|
-
shouldShow: z.ZodOptional<z.ZodBoolean>;
|
|
2435
|
-
}, z.core.$strip>>>;
|
|
2436
2422
|
}, z.core.$strip>;
|
|
2437
2423
|
export declare const enrichedSimulateAndReviewSchema: z.ZodObject<{
|
|
2438
2424
|
transactions: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
@@ -3014,10 +3000,6 @@ export declare const enrichedSimulateAndReviewSchema: z.ZodObject<{
|
|
|
3014
3000
|
}, z.core.$strip>>;
|
|
3015
3001
|
}, z.core.$strip>], "type">>>;
|
|
3016
3002
|
isBackendDown: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
3017
|
-
promotions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3018
|
-
name: z.ZodOptional<z.ZodString>;
|
|
3019
|
-
shouldShow: z.ZodOptional<z.ZodBoolean>;
|
|
3020
|
-
}, z.core.$strip>>>;
|
|
3021
3003
|
}, z.core.$strip>;
|
|
3022
3004
|
export type EnrichedSimulateAndReview = z.infer<typeof enrichedSimulateAndReviewSchema>;
|
|
3023
3005
|
export type SimulateAndReview = z.infer<typeof simulateAndReviewSchema>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z as t } from "zod";
|
|
2
|
-
import { severitySchema as
|
|
3
|
-
import { estimatedFeesSchema as
|
|
4
|
-
import { addressSchema as
|
|
5
|
-
const
|
|
2
|
+
import { severitySchema as y, reasonsSchema as h } from "../warning/schema.js";
|
|
3
|
+
import { estimatedFeesSchema as j } from "../fees/schema.js";
|
|
4
|
+
import { addressSchema as f, addressSchemaArgentBackend as a } from "../../../chains/starknet/address.js";
|
|
5
|
+
const k = t.object({
|
|
6
6
|
name: t.string(),
|
|
7
7
|
url: t.string(),
|
|
8
8
|
position: t.number()
|
|
@@ -62,40 +62,40 @@ const v = t.object({
|
|
|
62
62
|
label: t.string(),
|
|
63
63
|
token: e
|
|
64
64
|
})
|
|
65
|
-
]),
|
|
65
|
+
]), v = t.object({
|
|
66
66
|
name: t.string(),
|
|
67
67
|
properties: t.array(r),
|
|
68
68
|
defaultProperties: t.array(r).optional()
|
|
69
|
-
}),
|
|
69
|
+
}), w = t.union([
|
|
70
70
|
t.literal("verified"),
|
|
71
71
|
t.literal("neutral"),
|
|
72
72
|
t.literal("partial"),
|
|
73
73
|
t.literal("warn")
|
|
74
|
-
]),
|
|
74
|
+
]), E = t.object({
|
|
75
75
|
unknown_token: t.unknown().optional(),
|
|
76
76
|
date_of_addition: t.string().optional(),
|
|
77
|
-
contract_address:
|
|
77
|
+
contract_address: f.optional(),
|
|
78
78
|
reason: t.string().optional(),
|
|
79
79
|
value: t.any().optional()
|
|
80
80
|
}), l = t.object({
|
|
81
|
-
reason:
|
|
82
|
-
details:
|
|
83
|
-
severity:
|
|
84
|
-
}),
|
|
85
|
-
assessment:
|
|
81
|
+
reason: h,
|
|
82
|
+
details: E.optional(),
|
|
83
|
+
severity: y
|
|
84
|
+
}), D = t.object({
|
|
85
|
+
assessment: w,
|
|
86
86
|
warnings: t.array(l).optional(),
|
|
87
87
|
assessmentReasons: t.array(t.string()).optional(),
|
|
88
88
|
assessmentDetails: t.object({
|
|
89
89
|
contract_address: t.string()
|
|
90
90
|
}).optional(),
|
|
91
|
-
action:
|
|
92
|
-
}),
|
|
91
|
+
action: v
|
|
92
|
+
}), U = t.object({
|
|
93
93
|
name: t.string(),
|
|
94
94
|
description: t.string(),
|
|
95
95
|
logoUrl: t.string().optional(),
|
|
96
96
|
iconUrl: t.string().optional(),
|
|
97
97
|
argentVerified: t.boolean(),
|
|
98
|
-
links: t.array(
|
|
98
|
+
links: t.array(k)
|
|
99
99
|
}), c = t.object({
|
|
100
100
|
assessment: t.union([
|
|
101
101
|
t.literal("verified"),
|
|
@@ -107,19 +107,19 @@ const v = t.object({
|
|
|
107
107
|
assessmentDetails: t.object({
|
|
108
108
|
contract_address: t.string()
|
|
109
109
|
}).optional(),
|
|
110
|
-
targetedDapp:
|
|
111
|
-
reviews: t.array(
|
|
110
|
+
targetedDapp: U.optional(),
|
|
111
|
+
reviews: t.array(D)
|
|
112
112
|
}).optional(), p = t.object({
|
|
113
113
|
banner: t.string().nullable().optional(),
|
|
114
114
|
preview: t.string().nullable().optional(),
|
|
115
115
|
full: t.string().nullable().optional(),
|
|
116
116
|
original: t.string().nullable().optional()
|
|
117
|
-
}),
|
|
117
|
+
}), F = t.object({
|
|
118
118
|
twitter: t.string().optional(),
|
|
119
119
|
external: t.string().optional(),
|
|
120
120
|
discord: t.string().optional()
|
|
121
121
|
}), s = t.object({
|
|
122
|
-
address:
|
|
122
|
+
address: a,
|
|
123
123
|
decimals: t.number().optional(),
|
|
124
124
|
symbol: t.string().optional(),
|
|
125
125
|
name: t.string(),
|
|
@@ -129,44 +129,44 @@ const v = t.object({
|
|
|
129
129
|
iconUrl: t.string().optional(),
|
|
130
130
|
unknown: t.boolean().optional(),
|
|
131
131
|
imageUrls: p.optional(),
|
|
132
|
-
links:
|
|
133
|
-
}),
|
|
134
|
-
tokenAddress:
|
|
135
|
-
owner:
|
|
136
|
-
spender:
|
|
132
|
+
links: F.optional()
|
|
133
|
+
}), T = t.object({
|
|
134
|
+
tokenAddress: a,
|
|
135
|
+
owner: a,
|
|
136
|
+
spender: a,
|
|
137
137
|
value: t.string().optional(),
|
|
138
138
|
approvalForAll: t.boolean(),
|
|
139
139
|
details: s.optional()
|
|
140
|
-
}),
|
|
141
|
-
tokenAddress:
|
|
142
|
-
from:
|
|
143
|
-
to:
|
|
140
|
+
}), A = t.object({
|
|
141
|
+
tokenAddress: a,
|
|
142
|
+
from: a,
|
|
143
|
+
to: a,
|
|
144
144
|
tokenId: t.string().optional(),
|
|
145
145
|
value: t.string().optional(),
|
|
146
146
|
details: s.optional()
|
|
147
|
-
}), n = t.union([t.string(), t.number(), t.bigint()]).transform((
|
|
148
|
-
address:
|
|
147
|
+
}), n = t.union([t.string(), t.number(), t.bigint()]).transform((o) => parseInt(o.toString(), 10)), m = t.object({
|
|
148
|
+
address: a,
|
|
149
149
|
unknown: t.boolean(),
|
|
150
150
|
type: t.literal("ERC20")
|
|
151
151
|
}), i = t.object({
|
|
152
152
|
maxAmount: n,
|
|
153
153
|
maxPricePerUnit: n
|
|
154
|
-
}),
|
|
154
|
+
}), _ = t.object({
|
|
155
155
|
l1Gas: i,
|
|
156
156
|
l1DataGas: i,
|
|
157
157
|
l2Gas: i
|
|
158
|
-
}),
|
|
158
|
+
}), x = t.object({
|
|
159
159
|
token: m,
|
|
160
160
|
overallFee: n,
|
|
161
161
|
maxFee: n,
|
|
162
162
|
defaultTip: n.optional()
|
|
163
|
-
}),
|
|
163
|
+
}), d = t.object({
|
|
164
164
|
overallFee: n,
|
|
165
|
-
resourceBounds:
|
|
166
|
-
unit: t.string().transform((
|
|
165
|
+
resourceBounds: _,
|
|
166
|
+
unit: t.string().transform((o) => o.toUpperCase()).pipe(t.literal("FRI")),
|
|
167
167
|
token: m,
|
|
168
168
|
defaultTip: n.optional()
|
|
169
|
-
}),
|
|
169
|
+
}), N = d.or(x), P = t.object({
|
|
170
170
|
type: t.string(),
|
|
171
171
|
label: t.string(),
|
|
172
172
|
tokenId: t.string().optional(),
|
|
@@ -182,70 +182,63 @@ const v = t.object({
|
|
|
182
182
|
description: t.string().optional(),
|
|
183
183
|
imageUrls: p.optional()
|
|
184
184
|
}).optional()
|
|
185
|
-
}),
|
|
186
|
-
approvals: t.array(
|
|
187
|
-
transfers: t.array(
|
|
185
|
+
}), R = t.object({
|
|
186
|
+
approvals: t.array(T).optional(),
|
|
187
|
+
transfers: t.array(A).optional(),
|
|
188
188
|
calculatedNonce: t.string().optional(),
|
|
189
|
-
feeEstimation:
|
|
190
|
-
feeEstimations: t.array(
|
|
191
|
-
summary: t.array(
|
|
192
|
-
}),
|
|
189
|
+
feeEstimation: d,
|
|
190
|
+
feeEstimations: t.array(N),
|
|
191
|
+
summary: t.array(P).optional()
|
|
192
|
+
}), I = t.object({
|
|
193
193
|
label: t.string().optional(),
|
|
194
194
|
code: t.number().optional(),
|
|
195
195
|
message: t.string().optional(),
|
|
196
196
|
error: t.string().optional()
|
|
197
|
-
}),
|
|
197
|
+
}), b = t.object({
|
|
198
198
|
reviewOfTransaction: c,
|
|
199
|
-
simulation:
|
|
199
|
+
simulation: R,
|
|
200
200
|
simulationError: t.undefined().optional()
|
|
201
201
|
}), g = t.object({
|
|
202
202
|
reviewOfTransaction: c,
|
|
203
203
|
simulation: t.undefined().optional(),
|
|
204
|
-
simulationError:
|
|
205
|
-
}), u =
|
|
204
|
+
simulationError: I
|
|
205
|
+
}), u = b.or(g), S = t.object({
|
|
206
206
|
subsidiseDeployment: t.boolean(),
|
|
207
207
|
subsidiseTransaction: t.boolean()
|
|
208
|
-
}),
|
|
209
|
-
name: t.string().optional(),
|
|
210
|
-
shouldShow: t.boolean().optional()
|
|
211
|
-
}), y = t.array(B), H = t.object({
|
|
208
|
+
}), C = t.object({
|
|
212
209
|
transactions: t.array(u).optional(),
|
|
213
210
|
canSubsidise: t.boolean().optional(),
|
|
214
|
-
subsidyStatus: S.optional()
|
|
215
|
-
|
|
216
|
-
}), q = t.object({
|
|
211
|
+
subsidyStatus: S.optional()
|
|
212
|
+
}), z = t.object({
|
|
217
213
|
transactions: t.array(u).optional(),
|
|
218
214
|
canSubsidise: t.boolean().optional(),
|
|
219
215
|
subsidyStatus: S.optional(),
|
|
220
|
-
enrichedFeeEstimation: t.array(
|
|
221
|
-
isBackendDown: t.boolean().default(!1).optional()
|
|
222
|
-
promotions: y.optional()
|
|
216
|
+
enrichedFeeEstimation: t.array(j).optional(),
|
|
217
|
+
isBackendDown: t.boolean().default(!1).optional()
|
|
223
218
|
});
|
|
224
|
-
function
|
|
225
|
-
return
|
|
219
|
+
function H(o) {
|
|
220
|
+
return b.safeParse(o).success;
|
|
226
221
|
}
|
|
227
|
-
function
|
|
228
|
-
return g.safeParse(
|
|
222
|
+
function q(o) {
|
|
223
|
+
return g.safeParse(o).success;
|
|
229
224
|
}
|
|
230
225
|
export {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
226
|
+
v as actionSchema,
|
|
227
|
+
w as assessmentSchema,
|
|
228
|
+
z as enrichedSimulateAndReviewSchema,
|
|
234
229
|
i as feeEstimationGasSchema,
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
230
|
+
N as feeEstimationNativeOrPaymasterSchema,
|
|
231
|
+
_ as feeEstimationResourceBoundSchema,
|
|
232
|
+
d as feeEstimationSchema,
|
|
233
|
+
H as isNotTransactionSimulationError,
|
|
234
|
+
q as isTransactionSimulationError,
|
|
235
|
+
x as paymasterFeeEstimationSchema,
|
|
241
236
|
m as paymasterFeeTokenSchema,
|
|
242
|
-
B as promotionSchema,
|
|
243
|
-
y as promotionsSchema,
|
|
244
237
|
r as propertySchema,
|
|
245
|
-
|
|
246
|
-
|
|
238
|
+
D as reviewSchema,
|
|
239
|
+
C as simulateAndReviewSchema,
|
|
247
240
|
S as subsidyStatusSchema,
|
|
248
|
-
|
|
249
|
-
|
|
241
|
+
U as targetedDappSchema,
|
|
242
|
+
E as warningDetailsSchema,
|
|
250
243
|
l as warningSchema
|
|
251
244
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("zod"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("zod"),e=t.z.object({transactionState:t.z.enum(["submitted","rejected"]).optional(),transactionHash:t.z.string(),rejectReason:t.z.string().nullable().optional()});exports.transactionExecutionResponseSchema=e;
|
|
@@ -1,27 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const transactionPromotionPrizeSchema: z.ZodObject<{
|
|
3
|
-
tokenType: z.ZodString;
|
|
4
|
-
tokenAddress: z.ZodString;
|
|
5
|
-
tokenAmount: z.ZodString;
|
|
6
|
-
}, z.core.$strip>;
|
|
7
|
-
export declare const transactionPromotionSchema: z.ZodObject<{
|
|
8
|
-
type: z.ZodEnum<{
|
|
9
|
-
lootbox: "lootbox";
|
|
10
|
-
}>;
|
|
11
|
-
status: z.ZodEnum<{
|
|
12
|
-
notEligible: "notEligible";
|
|
13
|
-
win: "win";
|
|
14
|
-
loss: "loss";
|
|
15
|
-
disabled: "disabled";
|
|
16
|
-
}>;
|
|
17
|
-
prizes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
18
|
-
tokenType: z.ZodString;
|
|
19
|
-
tokenAddress: z.ZodString;
|
|
20
|
-
tokenAmount: z.ZodString;
|
|
21
|
-
}, z.core.$strip>>>>;
|
|
22
|
-
prizeTierLevel: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
23
|
-
prizeUsdAmount: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
24
|
-
}, z.core.$strip>;
|
|
25
2
|
export declare const transactionExecutionResponseSchema: z.ZodObject<{
|
|
26
3
|
transactionState: z.ZodOptional<z.ZodEnum<{
|
|
27
4
|
rejected: "rejected";
|
|
@@ -29,25 +6,5 @@ export declare const transactionExecutionResponseSchema: z.ZodObject<{
|
|
|
29
6
|
}>>;
|
|
30
7
|
transactionHash: z.ZodString;
|
|
31
8
|
rejectReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
32
|
-
promotions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
33
|
-
type: z.ZodEnum<{
|
|
34
|
-
lootbox: "lootbox";
|
|
35
|
-
}>;
|
|
36
|
-
status: z.ZodEnum<{
|
|
37
|
-
notEligible: "notEligible";
|
|
38
|
-
win: "win";
|
|
39
|
-
loss: "loss";
|
|
40
|
-
disabled: "disabled";
|
|
41
|
-
}>;
|
|
42
|
-
prizes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
43
|
-
tokenType: z.ZodString;
|
|
44
|
-
tokenAddress: z.ZodString;
|
|
45
|
-
tokenAmount: z.ZodString;
|
|
46
|
-
}, z.core.$strip>>>>;
|
|
47
|
-
prizeTierLevel: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
48
|
-
prizeUsdAmount: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
49
|
-
}, z.core.$strip>>>>;
|
|
50
9
|
}, z.core.$strip>;
|
|
51
10
|
export type TransactionExecutionResponse = z.infer<typeof transactionExecutionResponseSchema>;
|
|
52
|
-
export type TransactionPromotion = z.infer<typeof transactionPromotionSchema>;
|
|
53
|
-
export type TransactionPromotionPrize = z.infer<typeof transactionPromotionPrizeSchema>;
|
|
@@ -1,25 +1,10 @@
|
|
|
1
1
|
import { z as t } from "zod";
|
|
2
|
-
const
|
|
3
|
-
tokenType: t.string(),
|
|
4
|
-
tokenAddress: t.string(),
|
|
5
|
-
tokenAmount: t.string()
|
|
6
|
-
}), n = t.object({
|
|
7
|
-
type: t.enum(["lootbox"]),
|
|
8
|
-
status: t.enum(["notEligible", "win", "loss", "disabled"]),
|
|
9
|
-
prizes: t.array(o).nullable().optional(),
|
|
10
|
-
// need to support null values too
|
|
11
|
-
prizeTierLevel: t.number().nullable().optional(),
|
|
12
|
-
prizeUsdAmount: t.string().nullable().optional()
|
|
13
|
-
}), a = t.object({
|
|
2
|
+
const n = t.object({
|
|
14
3
|
transactionState: t.enum(["submitted", "rejected"]).optional(),
|
|
15
4
|
transactionHash: t.string(),
|
|
16
|
-
rejectReason: t.string().nullable().optional()
|
|
17
|
-
// need to support null values too
|
|
18
|
-
promotions: t.array(n).nullable().optional()
|
|
5
|
+
rejectReason: t.string().nullable().optional()
|
|
19
6
|
// need to support null values too
|
|
20
7
|
});
|
|
21
8
|
export {
|
|
22
|
-
|
|
23
|
-
o as transactionPromotionPrizeSchema,
|
|
24
|
-
n as transactionPromotionSchema
|
|
9
|
+
n as transactionExecutionResponseSchema
|
|
25
10
|
};
|