@argent/x-shared 1.75.2 → 1.75.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./schema.cjs"),r=e=>e.map(o),o=e=>{if(t.isActivitySummary(e))return t.activitySummarySchema.parse(e);const n=!!e.sent;if(e.token.type!=="ERC20"){const a={asset:{type:"nft",tokenAddress:e.token.address,tokenId:e.tokenId?parseInt(e.tokenId):0,amount:e.value,collectionName:e.token.name,collectionPreviewImage:e.token.imageUrls?.preview,nftName:e.tokenIdDetails?.name,nftPreviewImage:e.tokenIdDetails?.imageUrls?.preview},sent:n};return t.activitySummarySchema.parse(a)}const i={asset:{type:"token",tokenAddress:e.token.address,amount:e.value,fiatAmount:{currency:"USD",currencyAmount:e.usdValue||"0"}},sent:n};return t.activitySummarySchema.parse(i)};exports.normalizeActivitySummary=o;exports.normalizeActivitySummaryCollection=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./schema.cjs"),c=e=>e.map(o),o=e=>{if(t.isActivitySummary(e))return t.activitySummarySchema.parse(e);const n=!!e.sent;if(e.token.type!=="ERC20"){const a={asset:{type:"nft",tokenAddress:e.token.address,tokenId:e.tokenId?parseInt(e.tokenId):0,amount:e.value,collectionName:e.token.name,collectionPreviewImage:e.token.imageUrls?.preview,nftName:e.tokenIdDetails?.name,nftPreviewImage:e.tokenIdDetails?.imageUrls?.preview},sent:n};return t.activitySummarySchema.parse(a)}const i={asset:{type:"token",tokenAddress:e.token.address,amount:e.value,fiatAmount:{currency:e.currency||"USD",currencyAmount:e.ccyValue||"0"}},sent:n};return t.activitySummarySchema.parse(i)};exports.normalizeActivitySummary=o;exports.normalizeActivitySummaryCollection=c;
@@ -1,5 +1,5 @@
1
1
  import { isActivitySummary as r, activitySummarySchema as n } from "./schema.js";
2
- const l = (e) => e.map(a), a = (e) => {
2
+ const l = (e) => e.map(c), c = (e) => {
3
3
  if (r(e))
4
4
  return n.parse(e);
5
5
  const t = !!e.sent;
@@ -25,8 +25,8 @@ const l = (e) => e.map(a), a = (e) => {
25
25
  tokenAddress: e.token.address,
26
26
  amount: e.value,
27
27
  fiatAmount: {
28
- currency: "USD",
29
- currencyAmount: e.usdValue || "0"
28
+ currency: e.currency || "USD",
29
+ currencyAmount: e.ccyValue || "0"
30
30
  }
31
31
  },
32
32
  sent: t
@@ -34,6 +34,6 @@ const l = (e) => e.map(a), a = (e) => {
34
34
  return n.parse(o);
35
35
  };
36
36
  export {
37
- a as normalizeActivitySummary,
37
+ c as normalizeActivitySummary,
38
38
  l as normalizeActivitySummaryCollection
39
39
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("zod"),u=require("../transactionReview/schema.cjs"),s=require("../../../staking/schema.cjs"),e=require("../../../chains/starknet/address.cjs"),d=t.z.object({network:t.z.string(),hash:t.z.string(),status:t.z.string(),blockNumber:t.z.number().optional(),transactionIndex:t.z.number()}),n=t.z.object({type:t.z.enum(["token","nft"]),tokenAddress:e.addressSchemaArgentBackend,amount:t.z.string().optional(),fiatAmount:t.z.object({currency:t.z.string(),currencyAmount:t.z.number()}).optional().nullable()}),i=t.z.enum(["ethereum","starknet","zksync","zksync2"]),m=t.z.object({type:t.z.enum(["payment","gasFee"]),leg:t.z.enum(["credit","debit"]),asset:n,counterParty:e.addressSchemaArgentBackend.optional(),counterPartyNetwork:i.optional()}),f=t.z.object({address:e.addressSchemaArgentBackend,network:i,type:t.z.enum(["wallet","token"])}),N=t.z.object({chainId:t.z.enum(["TESTNET","MAINNET","SEPOLIA"]),ethereumNetwork:t.z.enum(["mainnet","sepolia"])}),w=t.z.enum(["approval","changePubKey","dappInteraction","deploy","gift","multicall","payment","security","trade","staking"]),p=t.z.enum(["triggerEscapeGuardian","triggerEscapeSigner","escapeGuardian","escapeSigner","guardianChanged","guardianBackupChanged","signerChanged","cancelEscape","accountUpgraded","multisigConfigurationUpdated"]),B=t.z.object({name:t.z.string(),parameters:t.z.array(t.z.unknown()).optional()}),I=t.z.object({guid:t.z.string().optional(),signerType:t.z.string().optional(),signer:t.z.object({publicKey:t.z.string().optional()}).optional()}),T=t.z.object({activeAt:t.z.string().optional(),newGuardian:t.z.string().optional(),newImplementation:t.z.string().optional(),newVersion:t.z.string().optional(),signerGuid:t.z.string().optional(),signers:t.z.array(I).optional()}),D=t.z.object({isLootboxReward:t.z.boolean().optional()}),l=t.z.discriminatedUnion("type",[t.z.object({type:t.z.literal("deploy"),deployer:e.addressSchemaArgentBackend,contractAddress:e.addressSchemaArgentBackend}),t.z.object({type:t.z.literal("approval"),spender:e.addressSchemaArgentBackend,asset:n,approvalType:t.z.string()}),t.z.object({type:t.z.literal("payment"),counterparty:e.addressSchemaArgentBackend,leg:t.z.string(),asset:n,counterpartyNetwork:i.optional(),context:D.optional()}),t.z.object({type:t.z.literal("trade"),srcAsset:n,destAsset:n}),t.z.object({type:t.z.literal("security"),action:p,context:T.optional()}),t.z.object({type:t.z.literal("dappInteraction"),dappAddress:e.addressSchemaArgentBackend,function:B.optional().nullable()}),t.z.object({type:t.z.literal("staking"),stakingAction:s.stakingActionSchema,counterparty:e.addressSchemaArgentBackend,asset:n,stakerInfo:s.stakerInfoSchema}),t.z.object({type:t.z.literal("gift"),counterparty:e.addressSchemaArgentBackend.optional(),leg:t.z.string(),asset:n,counterpartyNetwork:i.optional()})]),z=t.z.union([l,t.z.object({type:t.z.literal("multicall"),calls:t.z.array(t.z.object({details:l}))})]),y=t.z.object({dappId:t.z.string(),name:t.z.string().optional().nullable()}),c=t.z.object({sent:t.z.boolean(),asset:t.z.discriminatedUnion("type",[t.z.object({type:t.z.literal("nft"),tokenAddress:e.addressSchemaArgentBackend,tokenId:t.z.coerce.number().optional(),amount:t.z.string().optional(),collectionName:t.z.string().optional(),collectionPreviewImage:t.z.string().optional().nullable(),nftName:t.z.string().optional().nullable(),nftPreviewImage:t.z.string().optional().nullable()}),t.z.object({type:t.z.literal("token"),tokenAddress:e.addressSchemaArgentBackend,amount:t.z.string().optional(),fiatAmount:t.z.object({currency:t.z.string(),currencyAmount:t.z.coerce.string()}).optional().nullable()})])}),g=t.z.object({type:t.z.string(),to:e.addressSchemaArgentBackend,actualFee:t.z.object({type:t.z.string(),tokenAddress:e.addressSchemaArgentBackend,amount:t.z.string().optional(),fiatAmount:t.z.object({currency:t.z.string(),currencyAmount:t.z.number()}).optional().nullable()})}),S=t.z.enum(["pending","success","failure"]),o=t.z.object({compositeId:t.z.string(),id:t.z.string().uuid(),status:S,wallet:e.addressSchemaArgentBackend,txSender:e.addressSchemaArgentBackend,source:t.z.string(),type:w,group:t.z.enum(["finance","security"]),submitted:t.z.number(),lastModified:t.z.number(),transaction:d,transfers:t.z.array(m),fees:t.z.array(g).optional(),relatedAddresses:t.z.array(f).nullable(),network:t.z.string(),networkDetails:N.optional(),details:z,transferSummary:t.z.array(c).optional(),dapp:y.optional(),actions:t.z.array(u.actionSchema).optional(),title:t.z.string().optional(),multisigDetails:t.z.object({signers:t.z.array(e.addressSchemaArgentBackend)}).optional()}),h=t.z.object({title:t.z.string().optional(),shortTitle:t.z.string().optional(),subtitle:t.z.string().optional(),icon:t.z.string().optional(),investment:s.investmentMetaSchema.optional(),isExecuteFromOutside:t.z.boolean().optional()}),b="native",A="rejected",v="cancelled",k="queued",x=o.pick({status:!0,actions:!0,submitted:!0,lastModified:!0,transferSummary:!0,fees:!0,multisigDetails:!0}).extend({status:t.z.union([S,t.z.enum([A,v,k])]),type:t.z.literal(b),transaction:d.pick({hash:!0}),dapp:u.targetedDappSchema.optional(),meta:h.optional()}),j=t.z.array(o),E=t.z.object({activities:j,page:t.z.number(),pageSize:t.z.number(),totalElements:t.z.number(),totalPages:t.z.number()});function P(a){return p.safeParse(a).success}const r=a=>c.safeParse(a).success,C=a=>r(a)&&a.asset.type==="token",M=a=>r(a)&&a.asset.type==="nft";exports.NativeActivityStatusCancelled=v;exports.NativeActivityStatusQueued=k;exports.NativeActivityStatusRejected=A;exports.NativeActivityTypeNative=b;exports.activitiesSchema=j;exports.activityDappSchema=y;exports.activityDetailsSchema=z;exports.activityResponseSchema=E;exports.activitySchema=o;exports.activitySummarySchema=c;exports.activityTransferSchema=m;exports.feeSchema=g;exports.isActivityDetailsAction=P;exports.isActivitySummary=r;exports.isNftActivitySummary=M;exports.isTokenActivitySummary=C;exports.nativeActivityMetaSchema=h;exports.nativeActivitySchema=x;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("zod"),l=require("../transactionReview/schema.cjs"),c=require("../../../staking/schema.cjs"),e=require("../../../chains/starknet/address.cjs"),u=t.z.object({network:t.z.string(),hash:t.z.string(),status:t.z.string(),blockNumber:t.z.number().optional(),transactionIndex:t.z.number()}),n=t.z.object({type:t.z.enum(["token","nft"]),tokenAddress:e.addressSchemaArgentBackend,amount:t.z.string().optional(),fiatAmount:t.z.object({currency:t.z.string(),currencyAmount:t.z.number()}).optional().nullable()}),i=t.z.enum(["ethereum","starknet","zksync","zksync2"]),d=t.z.object({type:t.z.enum(["payment","gasFee"]),leg:t.z.enum(["credit","debit"]),asset:n,counterParty:e.addressSchemaArgentBackend.optional(),counterPartyNetwork:i.optional()}),f=t.z.object({address:e.addressSchemaArgentBackend,network:i,type:t.z.enum(["wallet","token"])}),N=t.z.object({chainId:t.z.enum(["TESTNET","MAINNET","SEPOLIA"]),ethereumNetwork:t.z.enum(["mainnet","sepolia"])}),w=t.z.enum(["approval","changePubKey","dappInteraction","deploy","gift","multicall","payment","security","trade","staking"]),m=t.z.enum(["triggerEscapeGuardian","triggerEscapeSigner","escapeGuardian","escapeSigner","guardianChanged","guardianBackupChanged","signerChanged","cancelEscape","accountUpgraded","multisigConfigurationUpdated"]),B=t.z.object({name:t.z.string(),parameters:t.z.array(t.z.unknown()).optional()}),I=t.z.object({guid:t.z.string().optional(),signerType:t.z.string().optional(),signer:t.z.object({publicKey:t.z.string().optional()}).optional()}),T=t.z.object({activeAt:t.z.string().optional(),newGuardian:t.z.string().optional(),newImplementation:t.z.string().optional(),newVersion:t.z.string().optional(),signerGuid:t.z.string().optional(),signers:t.z.array(I).optional()}),D=t.z.object({isLootboxReward:t.z.boolean().optional()}),p=t.z.discriminatedUnion("type",[t.z.object({type:t.z.literal("deploy"),deployer:e.addressSchemaArgentBackend,contractAddress:e.addressSchemaArgentBackend}),t.z.object({type:t.z.literal("approval"),spender:e.addressSchemaArgentBackend,asset:n,approvalType:t.z.string()}),t.z.object({type:t.z.literal("payment"),counterparty:e.addressSchemaArgentBackend,leg:t.z.string(),asset:n,counterpartyNetwork:i.optional(),context:D.optional()}),t.z.object({type:t.z.literal("trade"),srcAsset:n,destAsset:n}),t.z.object({type:t.z.literal("security"),action:m,context:T.optional()}),t.z.object({type:t.z.literal("dappInteraction"),dappAddress:e.addressSchemaArgentBackend,function:B.optional().nullable()}),t.z.object({type:t.z.literal("staking"),stakingAction:c.stakingActionSchema,counterparty:e.addressSchemaArgentBackend,asset:n,stakerInfo:c.stakerInfoSchema}),t.z.object({type:t.z.literal("gift"),counterparty:e.addressSchemaArgentBackend.optional(),leg:t.z.string(),asset:n,counterpartyNetwork:i.optional()})]),x=t.z.object({details:p}),z=t.z.union([p,t.z.object({type:t.z.literal("multicall"),calls:t.z.array(x)})]),y=t.z.object({dappId:t.z.string(),name:t.z.string().optional().nullable()}),s=t.z.object({sent:t.z.boolean(),asset:t.z.discriminatedUnion("type",[t.z.object({type:t.z.literal("nft"),tokenAddress:e.addressSchemaArgentBackend,tokenId:t.z.coerce.number().optional(),amount:t.z.string().optional(),collectionName:t.z.string().optional(),collectionPreviewImage:t.z.string().optional().nullable(),nftName:t.z.string().optional().nullable(),nftPreviewImage:t.z.string().optional().nullable()}),t.z.object({type:t.z.literal("token"),tokenAddress:e.addressSchemaArgentBackend,amount:t.z.string().optional(),fiatAmount:t.z.object({currency:t.z.string(),currencyAmount:t.z.coerce.string()}).optional().nullable()})])}),g=t.z.object({type:t.z.string(),to:e.addressSchemaArgentBackend,actualFee:t.z.object({type:t.z.string(),tokenAddress:e.addressSchemaArgentBackend,amount:t.z.string().optional(),fiatAmount:t.z.object({currency:t.z.string(),currencyAmount:t.z.number()}).optional().nullable()})}),S=t.z.enum(["pending","success","failure"]),o=t.z.object({compositeId:t.z.string(),id:t.z.string().uuid(),status:S,wallet:e.addressSchemaArgentBackend,txSender:e.addressSchemaArgentBackend,source:t.z.string(),type:w,group:t.z.enum(["finance","security"]),submitted:t.z.number(),lastModified:t.z.number(),transaction:u,transfers:t.z.array(d),fees:t.z.array(g).optional(),relatedAddresses:t.z.array(f).nullable(),network:t.z.string(),networkDetails:N.optional(),details:z,transferSummary:t.z.array(s).optional(),dapp:y.optional(),actions:t.z.array(l.actionSchema).optional(),title:t.z.string().optional(),multisigDetails:t.z.object({signers:t.z.array(e.addressSchemaArgentBackend)}).optional()}),h=t.z.object({title:t.z.string().optional(),shortTitle:t.z.string().optional(),subtitle:t.z.string().optional(),icon:t.z.string().optional(),investment:c.investmentMetaSchema.optional(),isExecuteFromOutside:t.z.boolean().optional()}),b="native",v="rejected",A="cancelled",k="queued",E=o.pick({status:!0,actions:!0,submitted:!0,lastModified:!0,transferSummary:!0,fees:!0,multisigDetails:!0}).extend({status:t.z.union([S,t.z.enum([v,A,k])]),type:t.z.literal(b),transaction:u.pick({hash:!0}),dapp:l.targetedDappSchema.optional(),meta:h.optional()}),j=t.z.array(o),P=t.z.object({activities:j,page:t.z.number(),pageSize:t.z.number(),totalElements:t.z.number(),totalPages:t.z.number()});function C(a){return m.safeParse(a).success}const r=a=>s.safeParse(a).success,M=a=>r(a)&&a.asset.type==="token",q=a=>r(a)&&a.asset.type==="nft";exports.NativeActivityStatusCancelled=A;exports.NativeActivityStatusQueued=k;exports.NativeActivityStatusRejected=v;exports.NativeActivityTypeNative=b;exports.activitiesSchema=j;exports.activityDappSchema=y;exports.activityDetailsSchema=z;exports.activityResponseSchema=P;exports.activitySchema=o;exports.activitySummarySchema=s;exports.activityTransferSchema=d;exports.feeSchema=g;exports.isActivityDetailsAction=C;exports.isActivitySummary=r;exports.isNftActivitySummary=q;exports.isTokenActivitySummary=M;exports.nativeActivityMetaSchema=h;exports.nativeActivitySchema=E;
@@ -40,6 +40,165 @@ declare const detailsActionSchema: z.ZodEnum<{
40
40
  accountUpgraded: "accountUpgraded";
41
41
  multisigConfigurationUpdated: "multisigConfigurationUpdated";
42
42
  }>;
43
+ declare const activityDetailsCallSchema: z.ZodObject<{
44
+ details: z.ZodDiscriminatedUnion<[z.ZodObject<{
45
+ type: z.ZodLiteral<"deploy">;
46
+ deployer: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
47
+ contractAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
48
+ }, z.core.$strip>, z.ZodObject<{
49
+ type: z.ZodLiteral<"approval">;
50
+ spender: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
51
+ asset: z.ZodObject<{
52
+ type: z.ZodEnum<{
53
+ nft: "nft";
54
+ token: "token";
55
+ }>;
56
+ tokenAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
57
+ amount: z.ZodOptional<z.ZodString>;
58
+ fiatAmount: z.ZodNullable<z.ZodOptional<z.ZodObject<{
59
+ currency: z.ZodString;
60
+ currencyAmount: z.ZodNumber;
61
+ }, z.core.$strip>>>;
62
+ }, z.core.$strip>;
63
+ approvalType: z.ZodString;
64
+ }, z.core.$strip>, z.ZodObject<{
65
+ type: z.ZodLiteral<"payment">;
66
+ counterparty: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
67
+ leg: z.ZodString;
68
+ asset: z.ZodObject<{
69
+ type: z.ZodEnum<{
70
+ nft: "nft";
71
+ token: "token";
72
+ }>;
73
+ tokenAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
74
+ amount: z.ZodOptional<z.ZodString>;
75
+ fiatAmount: z.ZodNullable<z.ZodOptional<z.ZodObject<{
76
+ currency: z.ZodString;
77
+ currencyAmount: z.ZodNumber;
78
+ }, z.core.$strip>>>;
79
+ }, z.core.$strip>;
80
+ counterpartyNetwork: z.ZodOptional<z.ZodEnum<{
81
+ ethereum: "ethereum";
82
+ zksync: "zksync";
83
+ zksync2: "zksync2";
84
+ starknet: "starknet";
85
+ }>>;
86
+ context: z.ZodOptional<z.ZodObject<{
87
+ isLootboxReward: z.ZodOptional<z.ZodBoolean>;
88
+ }, z.core.$strip>>;
89
+ }, z.core.$strip>, z.ZodObject<{
90
+ type: z.ZodLiteral<"trade">;
91
+ srcAsset: z.ZodObject<{
92
+ type: z.ZodEnum<{
93
+ nft: "nft";
94
+ token: "token";
95
+ }>;
96
+ tokenAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
97
+ amount: z.ZodOptional<z.ZodString>;
98
+ fiatAmount: z.ZodNullable<z.ZodOptional<z.ZodObject<{
99
+ currency: z.ZodString;
100
+ currencyAmount: z.ZodNumber;
101
+ }, z.core.$strip>>>;
102
+ }, z.core.$strip>;
103
+ destAsset: z.ZodObject<{
104
+ type: z.ZodEnum<{
105
+ nft: "nft";
106
+ token: "token";
107
+ }>;
108
+ tokenAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
109
+ amount: z.ZodOptional<z.ZodString>;
110
+ fiatAmount: z.ZodNullable<z.ZodOptional<z.ZodObject<{
111
+ currency: z.ZodString;
112
+ currencyAmount: z.ZodNumber;
113
+ }, z.core.$strip>>>;
114
+ }, z.core.$strip>;
115
+ }, z.core.$strip>, z.ZodObject<{
116
+ type: z.ZodLiteral<"security">;
117
+ action: z.ZodEnum<{
118
+ triggerEscapeGuardian: "triggerEscapeGuardian";
119
+ triggerEscapeSigner: "triggerEscapeSigner";
120
+ escapeGuardian: "escapeGuardian";
121
+ escapeSigner: "escapeSigner";
122
+ guardianChanged: "guardianChanged";
123
+ guardianBackupChanged: "guardianBackupChanged";
124
+ signerChanged: "signerChanged";
125
+ cancelEscape: "cancelEscape";
126
+ accountUpgraded: "accountUpgraded";
127
+ multisigConfigurationUpdated: "multisigConfigurationUpdated";
128
+ }>;
129
+ context: z.ZodOptional<z.ZodObject<{
130
+ activeAt: z.ZodOptional<z.ZodString>;
131
+ newGuardian: z.ZodOptional<z.ZodString>;
132
+ newImplementation: z.ZodOptional<z.ZodString>;
133
+ newVersion: z.ZodOptional<z.ZodString>;
134
+ signerGuid: z.ZodOptional<z.ZodString>;
135
+ signers: z.ZodOptional<z.ZodArray<z.ZodObject<{
136
+ guid: z.ZodOptional<z.ZodString>;
137
+ signerType: z.ZodOptional<z.ZodString>;
138
+ signer: z.ZodOptional<z.ZodObject<{
139
+ publicKey: z.ZodOptional<z.ZodString>;
140
+ }, z.core.$strip>>;
141
+ }, z.core.$strip>>>;
142
+ }, z.core.$strip>>;
143
+ }, z.core.$strip>, z.ZodObject<{
144
+ type: z.ZodLiteral<"dappInteraction">;
145
+ dappAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
146
+ function: z.ZodNullable<z.ZodOptional<z.ZodObject<{
147
+ name: z.ZodString;
148
+ parameters: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
149
+ }, z.core.$strip>>>;
150
+ }, z.core.$strip>, z.ZodObject<{
151
+ type: z.ZodLiteral<"staking">;
152
+ stakingAction: z.ZodEnum<{
153
+ deposit: "deposit";
154
+ stake: "stake";
155
+ initiateWithdraw: "initiateWithdraw";
156
+ withdraw: "withdraw";
157
+ claim: "claim";
158
+ }>;
159
+ counterparty: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
160
+ asset: z.ZodObject<{
161
+ type: z.ZodEnum<{
162
+ nft: "nft";
163
+ token: "token";
164
+ }>;
165
+ tokenAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
166
+ amount: z.ZodOptional<z.ZodString>;
167
+ fiatAmount: z.ZodNullable<z.ZodOptional<z.ZodObject<{
168
+ currency: z.ZodString;
169
+ currencyAmount: z.ZodNumber;
170
+ }, z.core.$strip>>>;
171
+ }, z.core.$strip>;
172
+ stakerInfo: z.ZodObject<{
173
+ name: z.ZodOptional<z.ZodString>;
174
+ iconUrl: z.ZodOptional<z.ZodString>;
175
+ address: z.ZodOptional<z.ZodString>;
176
+ }, z.core.$strip>;
177
+ }, z.core.$strip>, z.ZodObject<{
178
+ type: z.ZodLiteral<"gift">;
179
+ counterparty: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>;
180
+ leg: z.ZodString;
181
+ asset: z.ZodObject<{
182
+ type: z.ZodEnum<{
183
+ nft: "nft";
184
+ token: "token";
185
+ }>;
186
+ tokenAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
187
+ amount: z.ZodOptional<z.ZodString>;
188
+ fiatAmount: z.ZodNullable<z.ZodOptional<z.ZodObject<{
189
+ currency: z.ZodString;
190
+ currencyAmount: z.ZodNumber;
191
+ }, z.core.$strip>>>;
192
+ }, z.core.$strip>;
193
+ counterpartyNetwork: z.ZodOptional<z.ZodEnum<{
194
+ ethereum: "ethereum";
195
+ zksync: "zksync";
196
+ zksync2: "zksync2";
197
+ starknet: "starknet";
198
+ }>>;
199
+ }, z.core.$strip>], "type">;
200
+ }, z.core.$strip>;
201
+ export type ActivityDetailsCall = z.infer<typeof activityDetailsCallSchema>;
43
202
  export declare const activityDetailsSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
44
203
  type: z.ZodLiteral<"deploy">;
45
204
  deployer: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
@@ -1,8 +1,8 @@
1
1
  import { z as t } from "zod";
2
- import { actionSchema as m, targetedDappSchema as d } from "../transactionReview/schema.js";
3
- import { investmentMetaSchema as g, stakerInfoSchema as y, stakingActionSchema as b } from "../../../staking/schema.js";
2
+ import { actionSchema as m, targetedDappSchema as y } from "../transactionReview/schema.js";
3
+ import { investmentMetaSchema as d, stakerInfoSchema as g, stakingActionSchema as b } from "../../../staking/schema.js";
4
4
  import { addressSchemaArgentBackend as e } from "../../../chains/starknet/address.js";
5
- const r = t.object({
5
+ const i = t.object({
6
6
  network: t.string(),
7
7
  hash: t.string(),
8
8
  status: t.string(),
@@ -26,10 +26,10 @@ const r = t.object({
26
26
  address: e,
27
27
  network: o,
28
28
  type: t.enum(["wallet", "token"])
29
- }), j = t.object({
29
+ }), v = t.object({
30
30
  chainId: t.enum(["TESTNET", "MAINNET", "SEPOLIA"]),
31
31
  ethereumNetwork: t.enum(["mainnet", "sepolia"])
32
- }), k = t.enum([
32
+ }), j = t.enum([
33
33
  "approval",
34
34
  "changePubKey",
35
35
  "dappInteraction",
@@ -40,7 +40,7 @@ const r = t.object({
40
40
  "security",
41
41
  "trade",
42
42
  "staking"
43
- ]), s = t.enum([
43
+ ]), r = t.enum([
44
44
  "triggerEscapeGuardian",
45
45
  "triggerEscapeSigner",
46
46
  "escapeGuardian",
@@ -51,7 +51,7 @@ const r = t.object({
51
51
  "cancelEscape",
52
52
  "accountUpgraded",
53
53
  "multisigConfigurationUpdated"
54
- ]), v = t.object({
54
+ ]), k = t.object({
55
55
  name: t.string(),
56
56
  parameters: t.array(t.unknown()).optional()
57
57
  }), f = t.object({
@@ -70,7 +70,7 @@ const r = t.object({
70
70
  signers: t.array(f).optional()
71
71
  }), w = t.object({
72
72
  isLootboxReward: t.boolean().optional()
73
- }), i = t.discriminatedUnion("type", [
73
+ }), s = t.discriminatedUnion("type", [
74
74
  t.object({
75
75
  type: t.literal("deploy"),
76
76
  deployer: e,
@@ -97,13 +97,13 @@ const r = t.object({
97
97
  }),
98
98
  t.object({
99
99
  type: t.literal("security"),
100
- action: s,
100
+ action: r,
101
101
  context: A.optional()
102
102
  }),
103
103
  t.object({
104
104
  type: t.literal("dappInteraction"),
105
105
  dappAddress: e,
106
- function: v.optional().nullable()
106
+ function: k.optional().nullable()
107
107
  // This object is often null. It happens when we were unable to get the ABI or failed decoding the function call
108
108
  }),
109
109
  t.object({
@@ -111,7 +111,7 @@ const r = t.object({
111
111
  stakingAction: b,
112
112
  counterparty: e,
113
113
  asset: a,
114
- stakerInfo: y
114
+ stakerInfo: g
115
115
  }),
116
116
  t.object({
117
117
  type: t.literal("gift"),
@@ -120,15 +120,15 @@ const r = t.object({
120
120
  asset: a,
121
121
  counterpartyNetwork: o.optional()
122
122
  })
123
- ]), N = t.union([
124
- i,
123
+ ]), N = t.object({
124
+ details: s
125
+ }), I = t.union([
126
+ s,
125
127
  t.object({
126
128
  type: t.literal("multicall"),
127
- calls: t.array(t.object({
128
- details: i
129
- }))
129
+ calls: t.array(N)
130
130
  })
131
- ]), I = t.object({
131
+ ]), x = t.object({
132
132
  dappId: t.string(),
133
133
  name: t.string().optional().nullable()
134
134
  }), c = t.object({
@@ -154,7 +154,7 @@ const r = t.object({
154
154
  }).optional().nullable()
155
155
  })
156
156
  ])
157
- }), x = t.object({
157
+ }), D = t.object({
158
158
  type: t.string(),
159
159
  // "gas" for example
160
160
  to: e,
@@ -174,20 +174,20 @@ const r = t.object({
174
174
  wallet: e,
175
175
  txSender: e,
176
176
  source: t.string(),
177
- type: k,
177
+ type: j,
178
178
  group: t.enum(["finance", "security"]),
179
179
  submitted: t.number(),
180
180
  lastModified: t.number(),
181
- transaction: r,
181
+ transaction: i,
182
182
  transfers: t.array(S),
183
183
  // to be clarified
184
- fees: t.array(x).optional(),
184
+ fees: t.array(D).optional(),
185
185
  relatedAddresses: t.array(h).nullable(),
186
186
  network: t.string(),
187
- networkDetails: j.optional(),
188
- details: N,
187
+ networkDetails: v.optional(),
188
+ details: I,
189
189
  transferSummary: t.array(c).optional(),
190
- dapp: I.optional(),
190
+ dapp: x.optional(),
191
191
  actions: t.array(m).optional(),
192
192
  title: t.string().optional(),
193
193
  multisigDetails: t.object({
@@ -199,9 +199,9 @@ const r = t.object({
199
199
  subtitle: t.string().optional(),
200
200
  /** let's not import the keys from x-ui here */
201
201
  icon: t.string().optional(),
202
- investment: g.optional(),
202
+ investment: d.optional(),
203
203
  isExecuteFromOutside: t.boolean().optional()
204
- }), T = "native", D = "rejected", P = "cancelled", C = "queued", R = p.pick({
204
+ }), T = "native", P = "rejected", C = "cancelled", M = "queued", B = p.pick({
205
205
  status: !0,
206
206
  actions: !0,
207
207
  submitted: !0,
@@ -213,45 +213,45 @@ const r = t.object({
213
213
  status: t.union([
214
214
  l,
215
215
  t.enum([
216
- D,
217
216
  P,
218
- C
217
+ C,
218
+ M
219
219
  ])
220
220
  ]),
221
221
  type: t.literal(T),
222
- transaction: r.pick({
222
+ transaction: i.pick({
223
223
  hash: !0
224
224
  }),
225
- dapp: d.optional(),
225
+ dapp: y.optional(),
226
226
  meta: E.optional()
227
- }), M = t.array(p), B = t.object({
228
- activities: M,
227
+ }), z = t.array(p), K = t.object({
228
+ activities: z,
229
229
  page: t.number(),
230
230
  pageSize: t.number(),
231
231
  totalElements: t.number(),
232
232
  totalPages: t.number()
233
233
  });
234
- function K(n) {
235
- return s.safeParse(n).success;
234
+ function L(n) {
235
+ return r.safeParse(n).success;
236
236
  }
237
- const u = (n) => c.safeParse(n).success, L = (n) => u(n) && n.asset.type === "token", O = (n) => u(n) && n.asset.type === "nft";
237
+ const u = (n) => c.safeParse(n).success, O = (n) => u(n) && n.asset.type === "token", q = (n) => u(n) && n.asset.type === "nft";
238
238
  export {
239
- P as NativeActivityStatusCancelled,
240
- C as NativeActivityStatusQueued,
241
- D as NativeActivityStatusRejected,
239
+ C as NativeActivityStatusCancelled,
240
+ M as NativeActivityStatusQueued,
241
+ P as NativeActivityStatusRejected,
242
242
  T as NativeActivityTypeNative,
243
- M as activitiesSchema,
244
- I as activityDappSchema,
245
- N as activityDetailsSchema,
246
- B as activityResponseSchema,
243
+ z as activitiesSchema,
244
+ x as activityDappSchema,
245
+ I as activityDetailsSchema,
246
+ K as activityResponseSchema,
247
247
  p as activitySchema,
248
248
  c as activitySummarySchema,
249
249
  S as activityTransferSchema,
250
- x as feeSchema,
251
- K as isActivityDetailsAction,
250
+ D as feeSchema,
251
+ L as isActivityDetailsAction,
252
252
  u as isActivitySummary,
253
- O as isNftActivitySummary,
254
- L as isTokenActivitySummary,
253
+ q as isNftActivitySummary,
254
+ O as isTokenActivitySummary,
255
255
  E as nativeActivityMetaSchema,
256
- R as nativeActivitySchema
256
+ B as nativeActivitySchema
257
257
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("zod"),d=require("../warning/schema.cjs"),B=require("../fees/schema.cjs"),t=require("../../../chains/starknet/address.cjs"),D=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})]),u=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")]),b=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:d.reasonsSchema,details:b.optional(),severity:d.severitySchema}),S=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:u}),h=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(D)}),y=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:h.optional(),reviews:e.z.array(S)}).optional(),j=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()}),F=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:j.optional(),links:F.optional()}),U=e.z.object({tokenAddress:t.addressSchemaArgentBackend,owner:t.addressSchemaArgentBackend,spender:t.addressSchemaArgentBackend,value:e.z.string().optional(),approvalForAll:e.z.boolean(),details:l.optional()}),R=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}),f=e.z.object({l1Gas:o,l1DataGas:o,l2Gas:o}),k=e.z.object({token:c,overallFee:n,maxFee:n,defaultTip:n.optional()}),z=e.z.object({overallFee:n,resourceBounds:f,unit:e.z.string().transform(a=>a.toUpperCase()).pipe(e.z.literal("FRI")),token:c,defaultTip:n.optional()}),v=z.or(k),N=e.z.object({type:e.z.string(),label:e.z.string(),tokenId:e.z.string().optional(),value:e.z.string().optional(),usdValue:e.z.string().optional(),token:l,sent:e.z.boolean().optional(),tokenIdDetails:e.z.object({name:e.z.string().optional(),description:e.z.string().optional(),imageUrls:j.optional()}).optional()}),P=e.z.object({approvals:e.z.array(U).optional(),transfers:e.z.array(R).optional(),calculatedNonce:e.z.string().optional(),feeEstimation:z,feeEstimations:e.z.array(v),summary:e.z.array(N).optional()}),_=e.z.object({label:e.z.string().optional(),code:e.z.number().optional(),message:e.z.string().optional(),error:e.z.string().optional()}),w=e.z.object({reviewOfTransaction:y,simulation:P,simulationError:e.z.undefined().optional()}),E=e.z.object({reviewOfTransaction:y,simulation:e.z.undefined().optional(),simulationError:_}),A=w.or(E),m=e.z.object({subsidiseDeployment:e.z.boolean(),subsidiseTransaction:e.z.boolean()}),T=e.z.object({name:e.z.string().optional(),shouldShow:e.z.boolean().optional()}),p=e.z.array(T),O=e.z.object({transactions:e.z.array(A).optional(),canSubsidise:e.z.boolean().optional(),subsidyStatus:m.optional(),promotions:p.optional()}),x=e.z.object({transactions:e.z.array(A).optional(),canSubsidise:e.z.boolean().optional(),subsidyStatus:m.optional(),enrichedFeeEstimation:e.z.array(B.estimatedFeesSchema).optional(),isBackendDown:e.z.boolean().default(!1).optional(),promotions:p.optional()});function G(a){return w.safeParse(a).success}function I(a){return E.safeParse(a).success}exports.actionSchema=u;exports.assessmentSchema=g;exports.enrichedSimulateAndReviewSchema=x;exports.feeEstimationGasSchema=o;exports.feeEstimationNativeOrPaymasterSchema=v;exports.feeEstimationResourceBoundSchema=f;exports.feeEstimationSchema=z;exports.isNotTransactionSimulationError=G;exports.isTransactionSimulationError=I;exports.paymasterFeeEstimationSchema=k;exports.paymasterFeeTokenSchema=c;exports.promotionSchema=T;exports.promotionsSchema=p;exports.propertySchema=s;exports.reviewSchema=S;exports.simulateAndReviewSchema=O;exports.subsidyStatusSchema=m;exports.targetedDappSchema=h;exports.warningDetailsSchema=b;exports.warningSchema=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("zod"),d=require("../warning/schema.cjs"),B=require("../fees/schema.cjs"),t=require("../../../chains/starknet/address.cjs"),D=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})]),g=e.z.object({name:e.z.string(),properties:e.z.array(s),defaultProperties:e.z.array(s).optional()}),u=e.z.union([e.z.literal("verified"),e.z.literal("neutral"),e.z.literal("partial"),e.z.literal("warn")]),b=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:d.reasonsSchema,details:b.optional(),severity:d.severitySchema}),S=e.z.object({assessment:u,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:g}),h=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(D)}),y=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:h.optional(),reviews:e.z.array(S)}).optional(),j=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()}),F=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:j.optional(),links:F.optional()}),U=e.z.object({tokenAddress:t.addressSchemaArgentBackend,owner:t.addressSchemaArgentBackend,spender:t.addressSchemaArgentBackend,value:e.z.string().optional(),approvalForAll:e.z.boolean(),details:l.optional()}),R=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}),f=e.z.object({l1Gas:o,l1DataGas:o,l2Gas:o}),k=e.z.object({token:c,overallFee:n,maxFee:n,defaultTip:n.optional()}),z=e.z.object({overallFee:n,resourceBounds:f,unit:e.z.string().transform(a=>a.toUpperCase()).pipe(e.z.literal("FRI")),token:c,defaultTip:n.optional()}),v=z.or(k),N=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:j.optional()}).optional()}),P=e.z.object({approvals:e.z.array(U).optional(),transfers:e.z.array(R).optional(),calculatedNonce:e.z.string().optional(),feeEstimation:z,feeEstimations:e.z.array(v),summary:e.z.array(N).optional()}),_=e.z.object({label:e.z.string().optional(),code:e.z.number().optional(),message:e.z.string().optional(),error:e.z.string().optional()}),w=e.z.object({reviewOfTransaction:y,simulation:P,simulationError:e.z.undefined().optional()}),E=e.z.object({reviewOfTransaction:y,simulation:e.z.undefined().optional(),simulationError:_}),A=w.or(E),m=e.z.object({subsidiseDeployment:e.z.boolean(),subsidiseTransaction:e.z.boolean()}),T=e.z.object({name:e.z.string().optional(),shouldShow:e.z.boolean().optional()}),p=e.z.array(T),O=e.z.object({transactions:e.z.array(A).optional(),canSubsidise:e.z.boolean().optional(),subsidyStatus:m.optional(),promotions:p.optional()}),x=e.z.object({transactions:e.z.array(A).optional(),canSubsidise:e.z.boolean().optional(),subsidyStatus:m.optional(),enrichedFeeEstimation:e.z.array(B.estimatedFeesSchema).optional(),isBackendDown:e.z.boolean().default(!1).optional(),promotions:p.optional()});function G(a){return w.safeParse(a).success}function I(a){return E.safeParse(a).success}exports.actionSchema=g;exports.assessmentSchema=u;exports.enrichedSimulateAndReviewSchema=x;exports.feeEstimationGasSchema=o;exports.feeEstimationNativeOrPaymasterSchema=v;exports.feeEstimationResourceBoundSchema=f;exports.feeEstimationSchema=z;exports.isNotTransactionSimulationError=G;exports.isTransactionSimulationError=I;exports.paymasterFeeEstimationSchema=k;exports.paymasterFeeTokenSchema=c;exports.promotionSchema=T;exports.promotionsSchema=p;exports.propertySchema=s;exports.reviewSchema=S;exports.simulateAndReviewSchema=O;exports.subsidyStatusSchema=m;exports.targetedDappSchema=h;exports.warningDetailsSchema=b;exports.warningSchema=r;
@@ -640,7 +640,6 @@ declare const summarySchema: z.ZodObject<{
640
640
  label: z.ZodString;
641
641
  tokenId: z.ZodOptional<z.ZodString>;
642
642
  value: z.ZodOptional<z.ZodString>;
643
- usdValue: z.ZodOptional<z.ZodString>;
644
643
  token: z.ZodObject<{
645
644
  address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
646
645
  decimals: z.ZodOptional<z.ZodNumber>;
@@ -664,6 +663,8 @@ declare const summarySchema: z.ZodObject<{
664
663
  }, z.core.$strip>>;
665
664
  }, z.core.$strip>;
666
665
  sent: z.ZodOptional<z.ZodBoolean>;
666
+ ccyValue: z.ZodOptional<z.ZodString>;
667
+ currency: z.ZodOptional<z.ZodString>;
667
668
  tokenIdDetails: z.ZodOptional<z.ZodObject<{
668
669
  name: z.ZodOptional<z.ZodString>;
669
670
  description: z.ZodOptional<z.ZodString>;
@@ -797,7 +798,6 @@ declare const simulationSchema: z.ZodObject<{
797
798
  label: z.ZodString;
798
799
  tokenId: z.ZodOptional<z.ZodString>;
799
800
  value: z.ZodOptional<z.ZodString>;
800
- usdValue: z.ZodOptional<z.ZodString>;
801
801
  token: z.ZodObject<{
802
802
  address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
803
803
  decimals: z.ZodOptional<z.ZodNumber>;
@@ -821,6 +821,8 @@ declare const simulationSchema: z.ZodObject<{
821
821
  }, z.core.$strip>>;
822
822
  }, z.core.$strip>;
823
823
  sent: z.ZodOptional<z.ZodBoolean>;
824
+ ccyValue: z.ZodOptional<z.ZodString>;
825
+ currency: z.ZodOptional<z.ZodString>;
824
826
  tokenIdDetails: z.ZodOptional<z.ZodObject<{
825
827
  name: z.ZodOptional<z.ZodString>;
826
828
  description: z.ZodOptional<z.ZodString>;
@@ -1138,7 +1140,6 @@ declare const transactionSimulationSchema: z.ZodObject<{
1138
1140
  label: z.ZodString;
1139
1141
  tokenId: z.ZodOptional<z.ZodString>;
1140
1142
  value: z.ZodOptional<z.ZodString>;
1141
- usdValue: z.ZodOptional<z.ZodString>;
1142
1143
  token: z.ZodObject<{
1143
1144
  address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1144
1145
  decimals: z.ZodOptional<z.ZodNumber>;
@@ -1162,6 +1163,8 @@ declare const transactionSimulationSchema: z.ZodObject<{
1162
1163
  }, z.core.$strip>>;
1163
1164
  }, z.core.$strip>;
1164
1165
  sent: z.ZodOptional<z.ZodBoolean>;
1166
+ ccyValue: z.ZodOptional<z.ZodString>;
1167
+ currency: z.ZodOptional<z.ZodString>;
1165
1168
  tokenIdDetails: z.ZodOptional<z.ZodObject<{
1166
1169
  name: z.ZodOptional<z.ZodString>;
1167
1170
  description: z.ZodOptional<z.ZodString>;
@@ -1660,7 +1663,6 @@ declare const transactionSchema: z.ZodUnion<[z.ZodObject<{
1660
1663
  label: z.ZodString;
1661
1664
  tokenId: z.ZodOptional<z.ZodString>;
1662
1665
  value: z.ZodOptional<z.ZodString>;
1663
- usdValue: z.ZodOptional<z.ZodString>;
1664
1666
  token: z.ZodObject<{
1665
1667
  address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1666
1668
  decimals: z.ZodOptional<z.ZodNumber>;
@@ -1684,6 +1686,8 @@ declare const transactionSchema: z.ZodUnion<[z.ZodObject<{
1684
1686
  }, z.core.$strip>>;
1685
1687
  }, z.core.$strip>;
1686
1688
  sent: z.ZodOptional<z.ZodBoolean>;
1689
+ ccyValue: z.ZodOptional<z.ZodString>;
1690
+ currency: z.ZodOptional<z.ZodString>;
1687
1691
  tokenIdDetails: z.ZodOptional<z.ZodObject<{
1688
1692
  name: z.ZodOptional<z.ZodString>;
1689
1693
  description: z.ZodOptional<z.ZodString>;
@@ -2197,7 +2201,6 @@ export declare const simulateAndReviewSchema: z.ZodObject<{
2197
2201
  label: z.ZodString;
2198
2202
  tokenId: z.ZodOptional<z.ZodString>;
2199
2203
  value: z.ZodOptional<z.ZodString>;
2200
- usdValue: z.ZodOptional<z.ZodString>;
2201
2204
  token: z.ZodObject<{
2202
2205
  address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
2203
2206
  decimals: z.ZodOptional<z.ZodNumber>;
@@ -2221,6 +2224,8 @@ export declare const simulateAndReviewSchema: z.ZodObject<{
2221
2224
  }, z.core.$strip>>;
2222
2225
  }, z.core.$strip>;
2223
2226
  sent: z.ZodOptional<z.ZodBoolean>;
2227
+ ccyValue: z.ZodOptional<z.ZodString>;
2228
+ currency: z.ZodOptional<z.ZodString>;
2224
2229
  tokenIdDetails: z.ZodOptional<z.ZodObject<{
2225
2230
  name: z.ZodOptional<z.ZodString>;
2226
2231
  description: z.ZodOptional<z.ZodString>;
@@ -2729,7 +2734,6 @@ export declare const enrichedSimulateAndReviewSchema: z.ZodObject<{
2729
2734
  label: z.ZodString;
2730
2735
  tokenId: z.ZodOptional<z.ZodString>;
2731
2736
  value: z.ZodOptional<z.ZodString>;
2732
- usdValue: z.ZodOptional<z.ZodString>;
2733
2737
  token: z.ZodObject<{
2734
2738
  address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
2735
2739
  decimals: z.ZodOptional<z.ZodNumber>;
@@ -2753,6 +2757,8 @@ export declare const enrichedSimulateAndReviewSchema: z.ZodObject<{
2753
2757
  }, z.core.$strip>>;
2754
2758
  }, z.core.$strip>;
2755
2759
  sent: z.ZodOptional<z.ZodBoolean>;
2760
+ ccyValue: z.ZodOptional<z.ZodString>;
2761
+ currency: z.ZodOptional<z.ZodString>;
2756
2762
  tokenIdDetails: z.ZodOptional<z.ZodObject<{
2757
2763
  name: z.ZodOptional<z.ZodString>;
2758
2764
  description: z.ZodOptional<z.ZodString>;
@@ -1,5 +1,5 @@
1
1
  import { z as t } from "zod";
2
- import { severitySchema as y, reasonsSchema as j } from "../warning/schema.js";
2
+ import { severitySchema as h, reasonsSchema as j } from "../warning/schema.js";
3
3
  import { estimatedFeesSchema as f } from "../fees/schema.js";
4
4
  import { addressSchema as k, addressSchemaArgentBackend as o } from "../../../chains/starknet/address.js";
5
5
  const v = t.object({
@@ -80,7 +80,7 @@ const v = t.object({
80
80
  }), l = t.object({
81
81
  reason: j,
82
82
  details: D.optional(),
83
- severity: y
83
+ severity: h
84
84
  }), U = t.object({
85
85
  assessment: E,
86
86
  warnings: t.array(l).optional(),
@@ -160,20 +160,23 @@ const v = t.object({
160
160
  overallFee: n,
161
161
  maxFee: n,
162
162
  defaultTip: n.optional()
163
- }), d = t.object({
163
+ }), b = t.object({
164
164
  overallFee: n,
165
165
  resourceBounds: x,
166
166
  unit: t.string().transform((a) => a.toUpperCase()).pipe(t.literal("FRI")),
167
167
  token: m,
168
168
  defaultTip: n.optional()
169
- }), P = d.or(N), R = t.object({
169
+ }), P = b.or(N), R = t.object({
170
170
  type: t.string(),
171
171
  label: t.string(),
172
172
  tokenId: t.string().optional(),
173
173
  value: t.string().optional(),
174
- usdValue: t.string().optional(),
175
174
  token: s,
176
175
  sent: t.boolean().optional(),
176
+ ccyValue: t.string().optional(),
177
+ // currency value
178
+ currency: t.string().optional(),
179
+ // currency code
177
180
  tokenIdDetails: t.object({
178
181
  name: t.string().optional(),
179
182
  description: t.string().optional(),
@@ -183,7 +186,7 @@ const v = t.object({
183
186
  approvals: t.array(A).optional(),
184
187
  transfers: t.array(_).optional(),
185
188
  calculatedNonce: t.string().optional(),
186
- feeEstimation: d,
189
+ feeEstimation: b,
187
190
  feeEstimations: t.array(P),
188
191
  summary: t.array(R).optional()
189
192
  }), O = t.object({
@@ -191,7 +194,7 @@ const v = t.object({
191
194
  code: t.number().optional(),
192
195
  message: t.string().optional(),
193
196
  error: t.string().optional()
194
- }), b = t.object({
197
+ }), d = t.object({
195
198
  reviewOfTransaction: c,
196
199
  simulation: I,
197
200
  simulationError: t.undefined().optional()
@@ -199,27 +202,27 @@ const v = t.object({
199
202
  reviewOfTransaction: c,
200
203
  simulation: t.undefined().optional(),
201
204
  simulationError: O
202
- }), u = b.or(g), S = t.object({
205
+ }), u = d.or(g), S = t.object({
203
206
  subsidiseDeployment: t.boolean(),
204
207
  subsidiseTransaction: t.boolean()
205
208
  }), B = t.object({
206
209
  name: t.string().optional(),
207
210
  shouldShow: t.boolean().optional()
208
- }), h = t.array(B), H = t.object({
211
+ }), y = t.array(B), H = t.object({
209
212
  transactions: t.array(u).optional(),
210
213
  canSubsidise: t.boolean().optional(),
211
214
  subsidyStatus: S.optional(),
212
- promotions: h.optional()
215
+ promotions: y.optional()
213
216
  }), q = t.object({
214
217
  transactions: t.array(u).optional(),
215
218
  canSubsidise: t.boolean().optional(),
216
219
  subsidyStatus: S.optional(),
217
220
  enrichedFeeEstimation: t.array(f).optional(),
218
221
  isBackendDown: t.boolean().default(!1).optional(),
219
- promotions: h.optional()
222
+ promotions: y.optional()
220
223
  });
221
224
  function J(a) {
222
- return b.safeParse(a).success;
225
+ return d.safeParse(a).success;
223
226
  }
224
227
  function K(a) {
225
228
  return g.safeParse(a).success;
@@ -231,13 +234,13 @@ export {
231
234
  i as feeEstimationGasSchema,
232
235
  P as feeEstimationNativeOrPaymasterSchema,
233
236
  x as feeEstimationResourceBoundSchema,
234
- d as feeEstimationSchema,
237
+ b as feeEstimationSchema,
235
238
  J as isNotTransactionSimulationError,
236
239
  K as isTransactionSimulationError,
237
240
  N as paymasterFeeEstimationSchema,
238
241
  m as paymasterFeeTokenSchema,
239
242
  B as promotionSchema,
240
- h as promotionsSchema,
243
+ y as promotionsSchema,
241
244
  r as propertySchema,
242
245
  U as reviewSchema,
243
246
  H as simulateAndReviewSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@argent/x-shared",
3
- "version": "1.75.2",
3
+ "version": "1.75.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/argentlabs/x-shared.git"
@@ -64,8 +64,8 @@
64
64
  "@types/lodash-es": "4.17.12",
65
65
  "@types/numeral": "2.0.5",
66
66
  "@types/ua-parser-js": "0.7.39",
67
- "@typescript-eslint/eslint-plugin": "8.39.0",
68
- "@typescript-eslint/parser": "8.39.0",
67
+ "@typescript-eslint/eslint-plugin": "8.39.1",
68
+ "@typescript-eslint/parser": "8.39.1",
69
69
  "esbuild": "0.25.8",
70
70
  "esbuild-register": "3.6.0",
71
71
  "eslint": "8.57.1",