@argent/x-shared 1.52.3 → 1.53.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/src/account/account.model.cjs +1 -1
- package/dist/src/account/account.model.d.ts +24 -0
- package/dist/src/account/account.model.js +8 -5
- package/dist/src/staking/schema.cjs +1 -1
- package/dist/src/staking/schema.d.ts +6 -3
- package/dist/src/staking/schema.js +8 -7
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("zod"),t=n.z.object({name:n.z.string().optional(),address:n.z.string(),ownerAddress:n.z.string(),chain:n.z.enum(["ethereum","zksync","zksync2","starknet"]),deploymentStatus:n.z.enum(["notDeployed","deploying","deployed","deployError"]),application:n.z.enum(["mobile","webwallet","argentx"]),guardianAddresses:n.z.array(n.z.string()).optional(),enabledGuardianAddresses:n.z.array(n.z.string()).optional(),implClassHash:n.z.string().optional(),proxyClassHash:n.z.string().optional(),salt:n.z.string().optional(),created:n.z.string().optional(),contractVersion:n.z.string().optional(),contractName:n.z.string().optional(),version:n.z.number().optional(),owner:n.z.object({guid:n.z.string().optional(),signerType:n.z.enum(["StarknetKey","EthereumKey"]).optional()}).optional()}),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("zod"),t=n.z.object({name:n.z.string().optional(),address:n.z.string(),ownerAddress:n.z.string(),chain:n.z.enum(["ethereum","zksync","zksync2","starknet"]),deploymentStatus:n.z.enum(["notDeployed","deploying","deployed","deployError"]),application:n.z.enum(["mobile","webwallet","argentx"]),guardianAddresses:n.z.array(n.z.string()).optional(),enabledGuardianAddresses:n.z.array(n.z.string()).optional(),implClassHash:n.z.string().optional(),proxyClassHash:n.z.string().optional(),salt:n.z.string().optional(),created:n.z.string().optional(),contractVersion:n.z.string().optional(),contractName:n.z.string().optional(),version:n.z.number().optional(),owner:n.z.object({guid:n.z.string().optional(),signerType:n.z.enum(["StarknetKey","EthereumKey"]).optional()}).optional(),colour:n.z.string().optional(),icon:n.z.string().optional(),network:n.z.string().optional()}),o=n.z.object({address:n.z.string(),guardianAddress:n.z.string().optional(),account:t}),e=n.z.object({ownerAddress:n.z.string(),signature:n.z.object({r:n.z.string(),s:n.z.string()}),implClassHash:n.z.string().optional(),name:n.z.string().optional(),icon:n.z.string().optional(),network:n.z.string().optional()});exports.AddSmartAccountResponseSchema=o;exports.AddSmartAcountRequestSchema=e;exports.BackendAccountSchema=t;
|
|
@@ -25,6 +25,9 @@ export declare const BackendAccountSchema: z.ZodObject<{
|
|
|
25
25
|
guid?: string | undefined;
|
|
26
26
|
signerType?: "StarknetKey" | "EthereumKey" | undefined;
|
|
27
27
|
}>>;
|
|
28
|
+
colour: z.ZodOptional<z.ZodString>;
|
|
29
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
30
|
+
network: z.ZodOptional<z.ZodString>;
|
|
28
31
|
}, "strip", z.ZodTypeAny, {
|
|
29
32
|
address: string;
|
|
30
33
|
ownerAddress: string;
|
|
@@ -45,6 +48,9 @@ export declare const BackendAccountSchema: z.ZodObject<{
|
|
|
45
48
|
guid?: string | undefined;
|
|
46
49
|
signerType?: "StarknetKey" | "EthereumKey" | undefined;
|
|
47
50
|
} | undefined;
|
|
51
|
+
colour?: string | undefined;
|
|
52
|
+
icon?: string | undefined;
|
|
53
|
+
network?: string | undefined;
|
|
48
54
|
}, {
|
|
49
55
|
address: string;
|
|
50
56
|
ownerAddress: string;
|
|
@@ -65,6 +71,9 @@ export declare const BackendAccountSchema: z.ZodObject<{
|
|
|
65
71
|
guid?: string | undefined;
|
|
66
72
|
signerType?: "StarknetKey" | "EthereumKey" | undefined;
|
|
67
73
|
} | undefined;
|
|
74
|
+
colour?: string | undefined;
|
|
75
|
+
icon?: string | undefined;
|
|
76
|
+
network?: string | undefined;
|
|
68
77
|
}>;
|
|
69
78
|
export type BackendAccount = z.infer<typeof BackendAccountSchema>;
|
|
70
79
|
export declare const AddSmartAccountResponseSchema: z.ZodObject<{
|
|
@@ -96,6 +105,9 @@ export declare const AddSmartAccountResponseSchema: z.ZodObject<{
|
|
|
96
105
|
guid?: string | undefined;
|
|
97
106
|
signerType?: "StarknetKey" | "EthereumKey" | undefined;
|
|
98
107
|
}>>;
|
|
108
|
+
colour: z.ZodOptional<z.ZodString>;
|
|
109
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
110
|
+
network: z.ZodOptional<z.ZodString>;
|
|
99
111
|
}, "strip", z.ZodTypeAny, {
|
|
100
112
|
address: string;
|
|
101
113
|
ownerAddress: string;
|
|
@@ -116,6 +128,9 @@ export declare const AddSmartAccountResponseSchema: z.ZodObject<{
|
|
|
116
128
|
guid?: string | undefined;
|
|
117
129
|
signerType?: "StarknetKey" | "EthereumKey" | undefined;
|
|
118
130
|
} | undefined;
|
|
131
|
+
colour?: string | undefined;
|
|
132
|
+
icon?: string | undefined;
|
|
133
|
+
network?: string | undefined;
|
|
119
134
|
}, {
|
|
120
135
|
address: string;
|
|
121
136
|
ownerAddress: string;
|
|
@@ -136,6 +151,9 @@ export declare const AddSmartAccountResponseSchema: z.ZodObject<{
|
|
|
136
151
|
guid?: string | undefined;
|
|
137
152
|
signerType?: "StarknetKey" | "EthereumKey" | undefined;
|
|
138
153
|
} | undefined;
|
|
154
|
+
colour?: string | undefined;
|
|
155
|
+
icon?: string | undefined;
|
|
156
|
+
network?: string | undefined;
|
|
139
157
|
}>;
|
|
140
158
|
}, "strip", z.ZodTypeAny, {
|
|
141
159
|
address: string;
|
|
@@ -159,6 +177,9 @@ export declare const AddSmartAccountResponseSchema: z.ZodObject<{
|
|
|
159
177
|
guid?: string | undefined;
|
|
160
178
|
signerType?: "StarknetKey" | "EthereumKey" | undefined;
|
|
161
179
|
} | undefined;
|
|
180
|
+
colour?: string | undefined;
|
|
181
|
+
icon?: string | undefined;
|
|
182
|
+
network?: string | undefined;
|
|
162
183
|
};
|
|
163
184
|
guardianAddress?: string | undefined;
|
|
164
185
|
}, {
|
|
@@ -183,6 +204,9 @@ export declare const AddSmartAccountResponseSchema: z.ZodObject<{
|
|
|
183
204
|
guid?: string | undefined;
|
|
184
205
|
signerType?: "StarknetKey" | "EthereumKey" | undefined;
|
|
185
206
|
} | undefined;
|
|
207
|
+
colour?: string | undefined;
|
|
208
|
+
icon?: string | undefined;
|
|
209
|
+
network?: string | undefined;
|
|
186
210
|
};
|
|
187
211
|
guardianAddress?: string | undefined;
|
|
188
212
|
}>;
|
|
@@ -23,12 +23,15 @@ const t = n.object({
|
|
|
23
23
|
owner: n.object({
|
|
24
24
|
guid: n.string().optional(),
|
|
25
25
|
signerType: n.enum(["StarknetKey", "EthereumKey"]).optional()
|
|
26
|
-
}).optional()
|
|
27
|
-
|
|
26
|
+
}).optional(),
|
|
27
|
+
colour: n.string().optional(),
|
|
28
|
+
icon: n.string().optional(),
|
|
29
|
+
network: n.string().optional()
|
|
30
|
+
}), r = n.object({
|
|
28
31
|
address: n.string(),
|
|
29
32
|
guardianAddress: n.string().optional(),
|
|
30
33
|
account: t
|
|
31
|
-
}),
|
|
34
|
+
}), e = n.object({
|
|
32
35
|
ownerAddress: n.string(),
|
|
33
36
|
signature: n.object({
|
|
34
37
|
r: n.string(),
|
|
@@ -40,7 +43,7 @@ const t = n.object({
|
|
|
40
43
|
network: n.string().optional()
|
|
41
44
|
});
|
|
42
45
|
export {
|
|
43
|
-
|
|
44
|
-
|
|
46
|
+
r as AddSmartAccountResponseSchema,
|
|
47
|
+
e as AddSmartAcountRequestSchema,
|
|
45
48
|
t as BackendAccountSchema
|
|
46
49
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("zod"),c=require("../utils/starknet/starknet.cjs"),t=require("../chains/starknet/address.cjs"),a=e.z.object({id:e.z.string(),dappId:e.z.string(),productId:e.z.string(),productName:e.z.string(),chain:e.z.string(),name:e.z.string(),description:e.z.string(),iconUrl:e.z.string().url(),learnMoreUrl:e.z.string().url().optional(),riskFactor:e.z.enum(["low"]),metrics:e.z.object({baseApy:e.z.string(),totalApy:e.z.string(),tvl:e.z.string().optional()}),incentives:e.z.array(e.z.object({name:e.z.string(),description:e.z.string(),iconUrl:e.z.string().url(),learnMoreUrl:e.z.string().url(),metric:e.z.object({apy:e.z.string()})})),buyEnabled:e.z.boolean(),sellEnabled:e.z.boolean()}),s=a.extend({category:e.z.literal("staking"),investableAssets:e.z.object({tokenAddresses:e.z.array(t.addressSchemaArgentBackend),tokensRequirement:e.z.enum(["any"])}),withdrawableAssets:e.z.object({tokenAddresses:e.z.array(t.addressSchemaArgentBackend),tokensRequirement:e.z.enum(["any"])}),fees:e.z.object({depositFees:e.z.object({protocolFee:e.z.string().nullable().optional(),totalFee:e.z.string()}),withdrawalFees:e.z.object({protocolFee:e.z.string().nullable().optional(),totalFee:e.z.string()}),performanceFees:e.z.object({argentFee:e.z.string().nullable().optional(),protocolFee:e.z.string().nullable().optional(),providerFee:e.z.string().nullable().optional(),totalFee:e.z.string()}).optional()})}),o=a.extend({category:e.z.literal("lending"),investableAssets:e.z.object({tokenAddresses:e.z.array(t.addressSchemaArgentBackend),tokensRequirement:e.z.enum(["any"])}),withdrawableAssets:e.z.object({tokenAddresses:e.z.array(t.addressSchemaArgentBackend),tokensRequirement:e.z.enum(["any"])}),fees:e.z.object({depositFees:e.z.object({totalFee:e.z.string()}),withdrawalFees:e.z.object({totalFee:e.z.string()})})}),n=e.z.object({name:e.z.string().optional(),iconUrl:e.z.string().url().optional(),address:e.z.string().optional()}),r=a.extend({category:e.z.literal("strkDelegatedStaking"),stakerInfo:n,investableAssets:e.z.object({tokenAddresses:e.z.array(t.addressSchemaArgentBackend),tokensRequirement:e.z.enum(["any"]),useDecomposedBalances:e.z.boolean().optional()}),withdrawableAssets:e.z.object({tokenAddresses:e.z.array(t.addressSchemaArgentBackend),tokensRequirement:e.z.enum(["any"]),useDecomposedBalances:e.z.boolean().optional(),amountsRequirement:e.z.enum(["fullBalance"]).optional(),timelockDuration:e.z.number().optional()}),fees:e.z.object({depositFees:e.z.object({argentFee:e.z.string().nullable().optional(),protocolFee:e.z.string().nullable().optional(),providerFee:e.z.string().nullable().optional(),totalFee:e.z.string()}),withdrawalFees:e.z.object({argentFee:e.z.string().nullable().optional(),protocolFee:e.z.string().nullable().optional(),providerFee:e.z.string().nullable().optional(),totalFee:e.z.string()}),performanceFees:e.z.object({argentFee:e.z.string().nullable().optional(),protocolFee:e.z.string().nullable().optional(),providerFee:e.z.string().nullable().optional(),totalFee:e.z.string()}).optional()}),buyEnabled:e.z.boolean().optional(),sellEnabled:e.z.boolean().optional(),claimEnabled:e.z.boolean().optional()}),i=e.z.discriminatedUnion("category",[s,o,r]),z=e.z.object({investments:e.z.array(i)}),d=e.z.object({calls:e.z.array(c.callSchema)}),g=e.z.object({investmentId:e.z.string().optional(),accountAddress:t.addressSchemaArgentBackend,tokenAddress:t.addressSchemaArgentBackend,stakerInfo:n,amount:e.z.string()}),l=e.z.enum(["deposit","stake","initiateWithdraw","withdraw","claim"]),m=e.z.object({stakingAction:l,stakerInfo:n,tokenAddress:t.addressSchema,amount:e.z.string()});exports.investmentMetaSchema=m;exports.investmentSchema=i;exports.investmentsResponseSchema=z;exports.lendingInvestmentSchema=o;exports.liquidStakingInvestmentSchema=s;exports.stakerInfoSchema=n;exports.stakingActionSchema=l;exports.strkDelegatedStakingInvestmentSchema=r;exports.strkStakingCalldataResponseSchema=d;exports.strkStakingCalldataSchema=g;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("zod"),c=require("../utils/starknet/starknet.cjs"),t=require("../chains/starknet/address.cjs"),a=e.z.object({id:e.z.string(),dappId:e.z.string(),productId:e.z.string(),productName:e.z.string(),chain:e.z.string(),name:e.z.string(),description:e.z.string(),iconUrl:e.z.string().url(),learnMoreUrl:e.z.string().url().optional(),riskFactor:e.z.enum(["low"]),metrics:e.z.object({baseApy:e.z.string(),totalApy:e.z.string(),tvl:e.z.string().optional()}),incentives:e.z.array(e.z.object({name:e.z.string(),description:e.z.string(),iconUrl:e.z.string().url(),learnMoreUrl:e.z.string().url(),metric:e.z.object({apy:e.z.string()})})),buyEnabled:e.z.boolean(),sellEnabled:e.z.boolean()}),s=a.extend({category:e.z.literal("staking"),investableAssets:e.z.object({tokenAddresses:e.z.array(t.addressSchemaArgentBackend),tokensRequirement:e.z.enum(["any"])}),withdrawableAssets:e.z.object({tokenAddresses:e.z.array(t.addressSchemaArgentBackend),tokensRequirement:e.z.enum(["any"])}),fees:e.z.object({depositFees:e.z.object({protocolFee:e.z.string().nullable().optional(),totalFee:e.z.string()}),withdrawalFees:e.z.object({protocolFee:e.z.string().nullable().optional(),totalFee:e.z.string()}),performanceFees:e.z.object({argentFee:e.z.string().nullable().optional(),protocolFee:e.z.string().nullable().optional(),providerFee:e.z.string().nullable().optional(),totalFee:e.z.string()}).optional()})}),o=a.extend({category:e.z.literal("lending"),investableAssets:e.z.object({tokenAddresses:e.z.array(t.addressSchemaArgentBackend),tokensRequirement:e.z.enum(["any"])}),withdrawableAssets:e.z.object({tokenAddresses:e.z.array(t.addressSchemaArgentBackend),tokensRequirement:e.z.enum(["any"])}),fees:e.z.object({depositFees:e.z.object({totalFee:e.z.string()}),withdrawalFees:e.z.object({totalFee:e.z.string()})})}),n=e.z.object({name:e.z.string().optional(),iconUrl:e.z.string().url().optional(),address:e.z.string().optional()}),r=a.extend({category:e.z.literal("strkDelegatedStaking"),stakerInfo:n,investableAssets:e.z.object({tokenAddresses:e.z.array(t.addressSchemaArgentBackend),tokensRequirement:e.z.enum(["any"]),useDecomposedBalances:e.z.boolean().optional()}),withdrawableAssets:e.z.object({tokenAddresses:e.z.array(t.addressSchemaArgentBackend),tokensRequirement:e.z.enum(["any"]),useDecomposedBalances:e.z.boolean().optional(),amountsRequirement:e.z.enum(["fullBalance"]).optional(),timelockDuration:e.z.number().optional()}),fees:e.z.object({depositFees:e.z.object({argentFee:e.z.string().nullable().optional(),protocolFee:e.z.string().nullable().optional(),providerFee:e.z.string().nullable().optional(),totalFee:e.z.string()}),withdrawalFees:e.z.object({argentFee:e.z.string().nullable().optional(),protocolFee:e.z.string().nullable().optional(),providerFee:e.z.string().nullable().optional(),totalFee:e.z.string()}),performanceFees:e.z.object({argentFee:e.z.string().nullable().optional(),protocolFee:e.z.string().nullable().optional(),providerFee:e.z.string().nullable().optional(),totalFee:e.z.string()}).optional()}),buyEnabled:e.z.boolean().optional(),sellEnabled:e.z.boolean().optional(),claimEnabled:e.z.boolean().optional()}),i=e.z.discriminatedUnion("category",[s,o,r]),z=e.z.object({investments:e.z.array(i)}),d=e.z.object({calls:e.z.array(c.callSchema)}),g=e.z.object({investmentId:e.z.string(),investmentType:e.z.enum(["staking","lending","strkDelegatedStaking"]).optional(),accountAddress:t.addressSchemaArgentBackend,tokenAddress:t.addressSchemaArgentBackend,stakerInfo:n,amount:e.z.string()}),l=e.z.enum(["deposit","stake","initiateWithdraw","withdraw","claim"]),m=e.z.object({stakingAction:l,stakerInfo:n,tokenAddress:t.addressSchema,amount:e.z.string()});exports.investmentMetaSchema=m;exports.investmentSchema=i;exports.investmentsResponseSchema=z;exports.lendingInvestmentSchema=o;exports.liquidStakingInvestmentSchema=s;exports.stakerInfoSchema=n;exports.stakingActionSchema=l;exports.strkDelegatedStakingInvestmentSchema=r;exports.strkStakingCalldataResponseSchema=d;exports.strkStakingCalldataSchema=g;
|
|
@@ -2669,7 +2669,8 @@ export declare const strkStakingCalldataResponseSchema: z.ZodObject<{
|
|
|
2669
2669
|
}>;
|
|
2670
2670
|
export type StrkStakingCalldataResponse = z.infer<typeof strkStakingCalldataResponseSchema>;
|
|
2671
2671
|
export declare const strkStakingCalldataSchema: z.ZodObject<{
|
|
2672
|
-
investmentId: z.
|
|
2672
|
+
investmentId: z.ZodString;
|
|
2673
|
+
investmentType: z.ZodOptional<z.ZodEnum<["staking", "lending", "strkDelegatedStaking"]>>;
|
|
2673
2674
|
accountAddress: z.ZodEffects<z.ZodString, `0x${string}`, string>;
|
|
2674
2675
|
tokenAddress: z.ZodEffects<z.ZodString, `0x${string}`, string>;
|
|
2675
2676
|
stakerInfo: z.ZodObject<{
|
|
@@ -2695,7 +2696,8 @@ export declare const strkStakingCalldataSchema: z.ZodObject<{
|
|
|
2695
2696
|
address?: string | undefined;
|
|
2696
2697
|
iconUrl?: string | undefined;
|
|
2697
2698
|
};
|
|
2698
|
-
investmentId
|
|
2699
|
+
investmentId: string;
|
|
2700
|
+
investmentType?: "staking" | "lending" | "strkDelegatedStaking" | undefined;
|
|
2699
2701
|
}, {
|
|
2700
2702
|
amount: string;
|
|
2701
2703
|
accountAddress: string;
|
|
@@ -2705,7 +2707,8 @@ export declare const strkStakingCalldataSchema: z.ZodObject<{
|
|
|
2705
2707
|
address?: string | undefined;
|
|
2706
2708
|
iconUrl?: string | undefined;
|
|
2707
2709
|
};
|
|
2708
|
-
investmentId
|
|
2710
|
+
investmentId: string;
|
|
2711
|
+
investmentType?: "staking" | "lending" | "strkDelegatedStaking" | undefined;
|
|
2709
2712
|
}>;
|
|
2710
2713
|
export type StrkStakingCalldata = z.infer<typeof strkStakingCalldataSchema>;
|
|
2711
2714
|
export declare const stakingActionSchema: z.ZodEnum<["deposit", "stake", "initiateWithdraw", "withdraw", "claim"]>;
|
|
@@ -54,7 +54,7 @@ const n = e.object({
|
|
|
54
54
|
totalFee: e.string()
|
|
55
55
|
}).optional()
|
|
56
56
|
})
|
|
57
|
-
}),
|
|
57
|
+
}), i = n.extend({
|
|
58
58
|
category: e.literal("lending"),
|
|
59
59
|
investableAssets: e.object({
|
|
60
60
|
tokenAddresses: e.array(t),
|
|
@@ -76,7 +76,7 @@ const n = e.object({
|
|
|
76
76
|
name: e.string().optional(),
|
|
77
77
|
iconUrl: e.string().url().optional(),
|
|
78
78
|
address: e.string().optional()
|
|
79
|
-
}),
|
|
79
|
+
}), l = n.extend({
|
|
80
80
|
category: e.literal("strkDelegatedStaking"),
|
|
81
81
|
stakerInfo: o,
|
|
82
82
|
investableAssets: e.object({
|
|
@@ -116,14 +116,15 @@ const n = e.object({
|
|
|
116
116
|
claimEnabled: e.boolean().optional()
|
|
117
117
|
}), c = e.discriminatedUnion("category", [
|
|
118
118
|
r,
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
i,
|
|
120
|
+
l
|
|
121
121
|
]), p = e.object({
|
|
122
122
|
investments: e.array(c)
|
|
123
123
|
}), u = e.object({
|
|
124
124
|
calls: e.array(a)
|
|
125
125
|
}), k = e.object({
|
|
126
|
-
investmentId: e.string()
|
|
126
|
+
investmentId: e.string(),
|
|
127
|
+
investmentType: e.enum(["staking", "lending", "strkDelegatedStaking"]).optional(),
|
|
127
128
|
accountAddress: t,
|
|
128
129
|
tokenAddress: t,
|
|
129
130
|
stakerInfo: o,
|
|
@@ -144,11 +145,11 @@ export {
|
|
|
144
145
|
F as investmentMetaSchema,
|
|
145
146
|
c as investmentSchema,
|
|
146
147
|
p as investmentsResponseSchema,
|
|
147
|
-
|
|
148
|
+
i as lendingInvestmentSchema,
|
|
148
149
|
r as liquidStakingInvestmentSchema,
|
|
149
150
|
o as stakerInfoSchema,
|
|
150
151
|
d as stakingActionSchema,
|
|
151
|
-
|
|
152
|
+
l as strkDelegatedStakingInvestmentSchema,
|
|
152
153
|
u as strkStakingCalldataResponseSchema,
|
|
153
154
|
k as strkStakingCalldataSchema
|
|
154
155
|
};
|