@argent/x-shared 1.53.0 → 1.53.1

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,5 +1,5 @@
1
1
  import { z as t } from "zod";
2
- import { stakerInfoSchema as m, stakingActionSchema as d, investmentMetaSchema as g } from "../../../staking/schema.js";
2
+ import { stakerInfoSchema as m, stakingActionSchema as g, investmentMetaSchema as d } from "../../../staking/schema.js";
3
3
  import { actionSchema as y, targetedDappSchema as b } from "../transactionReview/schema.js";
4
4
  import { addressSchemaArgentBackend as e } from "../../../chains/starknet/address.js";
5
5
  const r = t.object({
@@ -26,10 +26,10 @@ const r = t.object({
26
26
  address: e,
27
27
  network: i,
28
28
  type: t.enum(["wallet", "token"])
29
- }), v = t.object({
29
+ }), k = t.object({
30
30
  chainId: t.enum(["TESTNET", "MAINNET", "SEPOLIA"]),
31
31
  ethereumNetwork: t.enum(["mainnet", "sepolia"])
32
- }), k = t.enum([
32
+ }), v = t.enum([
33
33
  "approval",
34
34
  "changePubKey",
35
35
  "dappInteraction",
@@ -51,23 +51,23 @@ const r = t.object({
51
51
  "cancelEscape",
52
52
  "accountUpgraded",
53
53
  "multisigConfigurationUpdated"
54
- ]), A = t.object({
54
+ ]), f = t.object({
55
55
  name: t.string(),
56
56
  parameters: t.array(t.unknown()).optional()
57
- }), f = t.object({
57
+ }), j = t.object({
58
58
  guid: t.string().optional(),
59
59
  signerType: t.string().optional(),
60
60
  // StarknetKey, Secp256k1, Secp256r1, Eip191, Webauthn
61
61
  signer: t.object({
62
62
  publicKey: t.string().optional()
63
63
  }).optional()
64
- }), j = t.object({
64
+ }), A = t.object({
65
65
  activeAt: t.string().optional(),
66
66
  newGuardian: t.string().optional(),
67
67
  newImplementation: t.string().optional(),
68
68
  newVersion: t.string().optional(),
69
69
  signerGuid: t.string().optional(),
70
- signers: t.array(f).optional()
70
+ signers: t.array(j).optional()
71
71
  }), o = t.discriminatedUnion("type", [
72
72
  t.object({
73
73
  type: t.literal("deploy"),
@@ -95,20 +95,27 @@ const r = t.object({
95
95
  t.object({
96
96
  type: t.literal("security"),
97
97
  action: s,
98
- context: j.optional()
98
+ context: A.optional()
99
99
  }),
100
100
  t.object({
101
101
  type: t.literal("dappInteraction"),
102
102
  dappAddress: e,
103
- function: A.optional().nullable()
103
+ function: f.optional().nullable()
104
104
  // This object is often null. It happens when we were unable to get the ABI or failed decoding the function call
105
105
  }),
106
106
  t.object({
107
107
  type: t.literal("staking"),
108
- stakingAction: d,
108
+ stakingAction: g,
109
109
  counterparty: e,
110
110
  asset: a,
111
111
  stakerInfo: m
112
+ }),
113
+ t.object({
114
+ type: t.literal("gift"),
115
+ counterparty: e.optional(),
116
+ leg: t.string(),
117
+ asset: a,
118
+ counterpartyNetwork: i.optional()
112
119
  })
113
120
  ]), w = t.union([
114
121
  o,
@@ -164,7 +171,7 @@ const r = t.object({
164
171
  wallet: e,
165
172
  txSender: e,
166
173
  source: t.string(),
167
- type: k,
174
+ type: v,
168
175
  group: t.enum(["finance", "security"]),
169
176
  submitted: t.number(),
170
177
  lastModified: t.number(),
@@ -174,7 +181,7 @@ const r = t.object({
174
181
  fees: t.array(I).optional(),
175
182
  relatedAddresses: t.array(h).nullable(),
176
183
  network: t.string(),
177
- networkDetails: v.optional(),
184
+ networkDetails: k.optional(),
178
185
  details: w,
179
186
  transferSummary: t.array(c).optional(),
180
187
  dapp: N.optional(),
@@ -189,7 +196,7 @@ const r = t.object({
189
196
  subtitle: t.string().optional(),
190
197
  /** let's not import the keys from x-ui here */
191
198
  icon: t.string().optional(),
192
- investment: g.optional(),
199
+ investment: d.optional(),
193
200
  isExecuteFromOutside: t.boolean().optional()
194
201
  }), T = "native", x = "rejected", D = "cancelled", P = "queued", F = p.pick({
195
202
  status: !0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@argent/x-shared",
3
- "version": "1.53.0",
3
+ "version": "1.53.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/argentlabs/x-shared.git"