@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.
@@ -1,5 +1,5 @@
1
1
  import { normalizeActivitySummary as i, normalizeActivitySummaryCollection as a } from "./src/features/simulation/activity/normalize.js";
2
- import { NativeActivityStatusCancelled as r, NativeActivityStatusQueued as o, NativeActivityStatusRejected as c, NativeActivityTypeNative as s, activitiesSchema as S, activityDappSchema as n, activityDetailsSchema as v, activityResponseSchema as y, activitySchema as h, activitySummarySchema as p, activityTransferSchema as A, feeSchema as l, isActivityDetailsAction as f, isActivitySummary as u, isNftActivitySummary as d, isTokenActivitySummary as x, nativeActivityMetaSchema as g, nativeActivitySchema as E } from "./src/features/simulation/activity/schema.js";
2
+ import { NativeActivityStatusCancelled as r, NativeActivityStatusQueued as c, NativeActivityStatusRejected as o, NativeActivityTypeNative as s, activitiesSchema as S, activityDappSchema as n, activityDetailsSchema as v, activityResponseSchema as y, activitySchema as h, activitySummarySchema as p, activityTransferSchema as A, feeSchema as l, isActivityDetailsAction as f, isActivitySummary as u, isNftActivitySummary as d, isTokenActivitySummary as x, nativeActivityMetaSchema as g, nativeActivitySchema as E } from "./src/features/simulation/activity/schema.js";
3
3
  import { createNativeActivity as N, normalizeActions as T } from "./src/features/simulation/activity/utils/createNativeActivity.js";
4
4
  import { getAnyActivityShortTitle as R, getAnyActivityTitle as D } from "./src/features/simulation/activity/utils/getAnyActivityTitle.js";
5
5
  import { getOverallLastModified as C } from "./src/features/simulation/activity/utils/getOverallLastModified.js";
@@ -14,15 +14,15 @@ import { isAddMultisigSignersActivity as J } from "./src/features/simulation/act
14
14
  import { isChangeMultisigThresholdActivity as V } from "./src/features/simulation/activity/utils/isChangeMultisigThresholdActivity.js";
15
15
  import { isRemoveMultisigSignersActivity as Y } from "./src/features/simulation/activity/utils/isRemoveMultisigSignersActivity.js";
16
16
  import { estimatedFeeSchema as _, estimatedFeesSchema as $, feeEstimationResultSchema as ee, nativeEstimatedFeeSchema as te, nativeEstimatedFeesSchema as ie, paymasterEstimatedFeeSchema as ae, paymasterEstimatedFeesSchema as me, resourceBoundsSchema as re } from "./src/features/simulation/fees/schema.js";
17
- import { getErrorMessageAndLabelFromSimulation as ce } from "./src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.js";
17
+ import { getErrorMessageAndLabelFromSimulation as oe } from "./src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.js";
18
18
  import { getMessageFromSimulationError as Se } from "./src/features/simulation/transactionReview/getMessageFromSimulationError.js";
19
- import { actionSchema as ve, assessmentSchema as ye, enrichedSimulateAndReviewSchema as he, feeEstimationGasSchema as pe, feeEstimationNativeOrPaymasterSchema as Ae, feeEstimationResourceBoundSchema as le, feeEstimationSchema as fe, isNotTransactionSimulationError as ue, isTransactionSimulationError as de, paymasterFeeEstimationSchema as xe, paymasterFeeTokenSchema as ge, promotionSchema as Ee, promotionsSchema as Fe, propertySchema as Ne, reviewSchema as Te, simulateAndReviewSchema as Me, subsidyStatusSchema as Re, targetedDappSchema as De, warningDetailsSchema as we, warningSchema as Ce } from "./src/features/simulation/transactionReview/schema.js";
20
- import { reasonsSchema as Oe, severitySchema as be } from "./src/features/simulation/warning/schema.js";
21
- import { getHighestSeverity as ke } from "./src/features/simulation/warning/helper.js";
19
+ import { actionSchema as ve, assessmentSchema as ye, enrichedSimulateAndReviewSchema as he, feeEstimationGasSchema as pe, feeEstimationNativeOrPaymasterSchema as Ae, feeEstimationResourceBoundSchema as le, feeEstimationSchema as fe, isNotTransactionSimulationError as ue, isTransactionSimulationError as de, paymasterFeeEstimationSchema as xe, paymasterFeeTokenSchema as ge, propertySchema as Ee, reviewSchema as Fe, simulateAndReviewSchema as Ne, subsidyStatusSchema as Te, targetedDappSchema as Me, warningDetailsSchema as Re, warningSchema as De } from "./src/features/simulation/transactionReview/schema.js";
20
+ import { reasonsSchema as Ce, severitySchema as ze } from "./src/features/simulation/warning/schema.js";
21
+ import { getHighestSeverity as be } from "./src/features/simulation/warning/helper.js";
22
22
  export {
23
23
  r as NativeActivityStatusCancelled,
24
- o as NativeActivityStatusQueued,
25
- c as NativeActivityStatusRejected,
24
+ c as NativeActivityStatusQueued,
25
+ o as NativeActivityStatusRejected,
26
26
  s as NativeActivityTypeNative,
27
27
  ve as actionSchema,
28
28
  S as activitiesSchema,
@@ -45,8 +45,8 @@ export {
45
45
  l as feeSchema,
46
46
  R as getAnyActivityShortTitle,
47
47
  D as getAnyActivityTitle,
48
- ce as getErrorMessageAndLabelFromSimulation,
49
- ke as getHighestSeverity,
48
+ oe as getErrorMessageAndLabelFromSimulation,
49
+ be as getHighestSeverity,
50
50
  Se as getMessageFromSimulationError,
51
51
  C as getOverallLastModified,
52
52
  O as hasDelegationActivity,
@@ -76,16 +76,14 @@ export {
76
76
  me as paymasterEstimatedFeesSchema,
77
77
  xe as paymasterFeeEstimationSchema,
78
78
  ge as paymasterFeeTokenSchema,
79
- Ee as promotionSchema,
80
- Fe as promotionsSchema,
81
- Ne as propertySchema,
82
- Oe as reasonsSchema,
79
+ Ee as propertySchema,
80
+ Ce as reasonsSchema,
83
81
  re as resourceBoundsSchema,
84
- Te as reviewSchema,
85
- be as severitySchema,
86
- Me as simulateAndReviewSchema,
87
- Re as subsidyStatusSchema,
88
- De as targetedDappSchema,
89
- we as warningDetailsSchema,
90
- Ce as warningSchema
82
+ Fe as reviewSchema,
83
+ ze as severitySchema,
84
+ Ne as simulateAndReviewSchema,
85
+ Te as subsidyStatusSchema,
86
+ Me as targetedDappSchema,
87
+ Re as warningDetailsSchema,
88
+ De as warningSchema
91
89
  };
@@ -1,6 +1,7 @@
1
1
  import { TypedData } from 'starknet';
2
- import { PaymasterExecutionDataParams, PaymasterExecuteParams, PaymasterOptions } from './types';
2
+ import { PaymasterExecutionDataParams, PaymasterExecuteParams, PaymasterOptions, PaymasterDeployAccountParams } from './types';
3
3
  export interface IPaymasterService {
4
4
  getExecutionData(params: PaymasterExecutionDataParams, options?: PaymasterOptions): Promise<TypedData>;
5
5
  execute(params: PaymasterExecuteParams, options?: PaymasterOptions): Promise<string>;
6
+ deployAccount(params: PaymasterDeployAccountParams, options?: PaymasterOptions): Promise<string>;
6
7
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("starknet"),h=require("url-join"),f=require("./types.cjs"),g=require("../../chains/starknet/network.cjs"),w=require("../../utils/starknet/starknet.cjs"),d=require("../../utils/url/urlWithQuery.cjs");class A{constructor(e="",t){this.argentRelayerUrl=e,this.httpService=t}async getExecutionData(e,t={}){const{useAvnu:n,isSubsidised:o}=t,{networkId:r}=e,u=r?{network:g.getArgentNetwork(r)}:void 0,a=n?h(this.getAvnuUrl(r),"/build-typed-data"):d.urlWithQuery([this.argentRelayerUrl,"/build-typed-data"],u),c={calls:n?e.calls.map(l=>({contractAddress:s.num.toHex(l.contractAddress),calldata:s.CallData.toCalldata(l.calldata).map(v=>s.num.toHex(v)),entrypoint:l.entrypoint})):e.calls,userAddress:e.accountAddress,gasTokenAddress:o?null:s.num.toHex(e.feeTokenAddress),maxGasTokenAmount:o?null:s.num.toHex(e.maxFee),accountClassHash:e.accountClassHash},i=await this.httpService.post(a,{body:s.json.stringify(c),headers:{"Content-Type":"application/json"}}),p=w.typedDataSchema.safeParse(i);if(!p.success)throw new Error("Invalid response from paymaster");return p.data}getAvnuUrl(e){if(!e)throw new Error("Network id is required for Avnu paymaster");let t="";if(e==="mainnet"||e==="mainnet-alpha")t="starknet";else if(e==="sepolia"||e==="sepolia-alpha")t="sepolia";else throw new Error("Invalid network id");return`https://${t}.api.avnu.fi/paymaster/v1`}async execute(e,t={}){const{useAvnu:n,isSubsidised:o}=t,{networkId:r}=e,u=r?{network:g.getArgentNetwork(r)}:void 0;let a=n?h(this.getAvnuUrl(r),"/execute"):d.urlWithQuery([this.argentRelayerUrl,"/execute"],u);o&&(a=d.urlWithQuery(a,{isSubsidised:"true"}));const y={signature:e.signature,userAddress:e.accountAddress,typedData:n?s.json.stringify(e.typedData):e.typedData,deploymentData:e.deploymentData},c=await this.httpService.post(a,{body:s.json.stringify(y),headers:{"Content-Type":"application/json"}}),i=f.paymasterExecuteResponse.safeParse(c);if(!i.success)throw new Error("Invalid response from paymaster");return i.data.transactionHash}}exports.PaymasterService=A;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("starknet"),p=require("url-join"),v=require("./types.cjs"),h=require("../../chains/starknet/network.cjs"),A=require("../../utils/starknet/starknet.cjs"),d=require("../../utils/url/urlWithQuery.cjs");class f{constructor(e="",t){this.argentRelayerUrl=e,this.httpService=t}async getExecutionData(e,t={}){const{useAvnu:o,isSubsidised:i}=t,{networkId:s}=e,u=s?{network:h.getArgentNetwork(s)}:void 0,r=o?p(this.getAvnuUrl(s),"/build-typed-data"):d.urlWithQuery([this.argentRelayerUrl,"/build-typed-data"],u),c={calls:o?e.calls.map(y=>({contractAddress:n.num.toHex(y.contractAddress),calldata:n.CallData.toCalldata(y.calldata).map(w=>n.num.toHex(w)),entrypoint:y.entrypoint})):e.calls,userAddress:e.accountAddress,gasTokenAddress:i?null:n.num.toHex(e.feeTokenAddress),maxGasTokenAmount:i?null:n.num.toHex(e.maxFee),accountClassHash:e.accountClassHash},a=await this.httpService.post(r,{body:n.json.stringify(c),headers:{"Content-Type":"application/json"}}),g=A.typedDataSchema.safeParse(a);if(!g.success)throw new Error("Invalid response from paymaster");return g.data}getAvnuUrl(e){if(!e)throw new Error("Network id is required for Avnu paymaster");let t="";if(e==="mainnet"||e==="mainnet-alpha")t="starknet";else if(e==="sepolia"||e==="sepolia-alpha")t="sepolia";else throw new Error("Invalid network id");return`https://${t}.api.avnu.fi/paymaster/v1`}async execute(e,t={}){const{useAvnu:o,isSubsidised:i}=t,{networkId:s}=e,u=s?{network:h.getArgentNetwork(s)}:void 0;let r=o?p(this.getAvnuUrl(s),"/execute"):d.urlWithQuery([this.argentRelayerUrl,"/execute"],u);i&&(r=d.urlWithQuery(r,{isSubsidised:"true"}));const l={signature:e.signature,userAddress:e.accountAddress,typedData:o?n.json.stringify(e.typedData):e.typedData,deploymentData:e.deploymentData},c=await this.httpService.post(r,{body:n.json.stringify(l),headers:{"Content-Type":"application/json"}}),a=v.paymasterExecuteResponse.safeParse(c);if(!a.success)throw new Error("Invalid response from paymaster");return a.data.transactionHash}async deployAccount(e,t={}){const{useAvnu:o,isSubsidised:i}=t,{networkId:s}=e,u=s?{network:h.getArgentNetwork(s)}:void 0;let r=o?p(this.getAvnuUrl(s),"/execute"):d.urlWithQuery([this.argentRelayerUrl,"/execute"],u);i&&(r=d.urlWithQuery(r,{isSubsidised:"true"}));const l={userAddress:e.accountAddress,deploymentData:e.deploymentData},c=await this.httpService.post(r,{body:n.json.stringify(l),headers:{"Content-Type":"application/json"}}),a=v.paymasterExecuteResponse.safeParse(c);if(!a.success)throw new Error("Invalid response from paymaster");return a.data.transactionHash}}exports.PaymasterService=f;
@@ -1,7 +1,7 @@
1
1
  import { TypedData } from '@starknet-io/types-js';
2
2
  import { IHttpService } from '../../http';
3
3
  import { IPaymasterService } from './IPaymasterService';
4
- import { PaymasterOptions, PaymasterExecuteParams, PaymasterExecutionDataParams } from './types';
4
+ import { PaymasterDeployAccountParams, PaymasterOptions, PaymasterExecuteParams, PaymasterExecutionDataParams } from './types';
5
5
  export declare class PaymasterService implements IPaymasterService {
6
6
  private readonly argentRelayerUrl;
7
7
  private readonly httpService;
@@ -9,4 +9,5 @@ export declare class PaymasterService implements IPaymasterService {
9
9
  getExecutionData(params: PaymasterExecutionDataParams, options?: PaymasterOptions): Promise<TypedData>;
10
10
  getAvnuUrl(networkId?: string): string;
11
11
  execute(params: PaymasterExecuteParams, options?: PaymasterOptions): Promise<string>;
12
+ deployAccount(params: PaymasterDeployAccountParams, options?: PaymasterOptions): Promise<string>;
12
13
  }
@@ -1,33 +1,33 @@
1
- import { CallData as A, num as i, json as u } from "starknet";
2
- import f from "url-join";
3
- import { paymasterExecuteResponse as g } from "./types.js";
4
- import { getArgentNetwork as m } from "../../chains/starknet/network.js";
5
- import { typedDataSchema as w } from "../../utils/starknet/starknet.js";
6
- import { urlWithQuery as p } from "../../utils/url/urlWithQuery.js";
7
- class E {
1
+ import { CallData as A, num as u, json as p } from "starknet";
2
+ import h from "url-join";
3
+ import { paymasterExecuteResponse as v } from "./types.js";
4
+ import { getArgentNetwork as f } from "../../chains/starknet/network.js";
5
+ import { typedDataSchema as g } from "../../utils/starknet/starknet.js";
6
+ import { urlWithQuery as c } from "../../utils/url/urlWithQuery.js";
7
+ class U {
8
8
  constructor(e = "", t) {
9
9
  this.argentRelayerUrl = e, this.httpService = t;
10
10
  }
11
11
  async getExecutionData(e, t = {}) {
12
- const { useAvnu: r, isSubsidised: o } = t, { networkId: s } = e, d = s ? { network: m(s) } : void 0, a = r ? f(this.getAvnuUrl(s), "/build-typed-data") : p([this.argentRelayerUrl, "/build-typed-data"], d), c = {
13
- calls: r ? e.calls.map((l) => ({
14
- contractAddress: i.toHex(l.contractAddress),
15
- calldata: A.toCalldata(l.calldata).map((v) => i.toHex(v)),
16
- entrypoint: l.entrypoint
12
+ const { useAvnu: n, isSubsidised: a } = t, { networkId: s } = e, i = s ? { network: f(s) } : void 0, r = n ? h(this.getAvnuUrl(s), "/build-typed-data") : c([this.argentRelayerUrl, "/build-typed-data"], i), d = {
13
+ calls: n ? e.calls.map((y) => ({
14
+ contractAddress: u.toHex(y.contractAddress),
15
+ calldata: A.toCalldata(y.calldata).map((w) => u.toHex(w)),
16
+ entrypoint: y.entrypoint
17
17
  })) : e.calls,
18
18
  userAddress: e.accountAddress,
19
- gasTokenAddress: o ? null : i.toHex(e.feeTokenAddress),
20
- maxGasTokenAmount: o ? null : i.toHex(e.maxFee),
19
+ gasTokenAddress: a ? null : u.toHex(e.feeTokenAddress),
20
+ maxGasTokenAmount: a ? null : u.toHex(e.maxFee),
21
21
  accountClassHash: e.accountClassHash
22
- }, n = await this.httpService.post(a, {
23
- body: u.stringify(c),
22
+ }, o = await this.httpService.post(r, {
23
+ body: p.stringify(d),
24
24
  headers: {
25
25
  "Content-Type": "application/json"
26
26
  }
27
- }), h = w.safeParse(n);
28
- if (!h.success)
27
+ }), m = g.safeParse(o);
28
+ if (!m.success)
29
29
  throw new Error("Invalid response from paymaster");
30
- return h.data;
30
+ return m.data;
31
31
  }
32
32
  getAvnuUrl(e) {
33
33
  if (!e)
@@ -42,27 +42,46 @@ class E {
42
42
  return `https://${t}.api.avnu.fi/paymaster/v1`;
43
43
  }
44
44
  async execute(e, t = {}) {
45
- const { useAvnu: r, isSubsidised: o } = t, { networkId: s } = e, d = s ? { network: m(s) } : void 0;
46
- let a = r ? f(this.getAvnuUrl(s), "/execute") : p([this.argentRelayerUrl, "/execute"], d);
47
- o && (a = p(a, {
45
+ const { useAvnu: n, isSubsidised: a } = t, { networkId: s } = e, i = s ? { network: f(s) } : void 0;
46
+ let r = n ? h(this.getAvnuUrl(s), "/execute") : c([this.argentRelayerUrl, "/execute"], i);
47
+ a && (r = c(r, {
48
48
  isSubsidised: "true"
49
49
  }));
50
- const y = {
50
+ const l = {
51
51
  signature: e.signature,
52
52
  userAddress: e.accountAddress,
53
- typedData: r ? u.stringify(e.typedData) : e.typedData,
53
+ typedData: n ? p.stringify(e.typedData) : e.typedData,
54
54
  deploymentData: e.deploymentData
55
- }, c = await this.httpService.post(a, {
56
- body: u.stringify(y),
55
+ }, d = await this.httpService.post(r, {
56
+ body: p.stringify(l),
57
57
  headers: {
58
58
  "Content-Type": "application/json"
59
59
  }
60
- }), n = g.safeParse(c);
61
- if (!n.success)
60
+ }), o = v.safeParse(d);
61
+ if (!o.success)
62
62
  throw new Error("Invalid response from paymaster");
63
- return n.data.transactionHash;
63
+ return o.data.transactionHash;
64
+ }
65
+ async deployAccount(e, t = {}) {
66
+ const { useAvnu: n, isSubsidised: a } = t, { networkId: s } = e, i = s ? { network: f(s) } : void 0;
67
+ let r = n ? h(this.getAvnuUrl(s), "/execute") : c([this.argentRelayerUrl, "/execute"], i);
68
+ a && (r = c(r, {
69
+ isSubsidised: "true"
70
+ }));
71
+ const l = {
72
+ userAddress: e.accountAddress,
73
+ deploymentData: e.deploymentData
74
+ }, d = await this.httpService.post(r, {
75
+ body: p.stringify(l),
76
+ headers: {
77
+ "Content-Type": "application/json"
78
+ }
79
+ }), o = v.safeParse(d);
80
+ if (!o.success)
81
+ throw new Error("Invalid response from paymaster");
82
+ return o.data.transactionHash;
64
83
  }
65
84
  }
66
85
  export {
67
- E as PaymasterService
86
+ U as PaymasterService
68
87
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("zod"),t=require("../../chains/starknet/address.cjs"),r=require("../../utils/starknet/starknet.cjs"),e=require("../../backend/schema.cjs"),s=a.z.object({calls:a.z.array(r.callSchema),accountAddress:t.addressSchema,networkId:e.argentNetworkIdSchema.or(e.argentBackendNetworkIdSchema).optional(),feeTokenAddress:t.addressSchema,maxFee:r.bigNumberishSchema,accountClassHash:a.z.string().optional()}),o=a.z.object({signature:a.z.string().array(),accountAddress:t.addressSchema,typedData:r.typedDataSchema,networkId:e.argentNetworkIdSchema.or(e.argentBackendNetworkIdSchema).optional(),deploymentData:a.z.object({class_hash:a.z.string().optional(),salt:a.z.string().or(a.z.number()).or(a.z.bigint()).optional(),unique:a.z.string(),calldata:a.z.array(a.z.string())}).optional()}),n=a.z.object({transactionHash:a.z.string()});exports.paymasterExecuteParams=o;exports.paymasterExecuteResponse=n;exports.paymasterExecutionDataParams=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("zod"),t=require("../../chains/starknet/address.cjs"),r=require("../../utils/starknet/starknet.cjs"),e=require("../../backend/schema.cjs"),s=a.z.object({calls:a.z.array(r.callSchema),accountAddress:t.addressSchema,networkId:e.argentNetworkIdSchema.or(e.argentBackendNetworkIdSchema).optional(),feeTokenAddress:t.addressSchema,maxFee:r.bigNumberishSchema,accountClassHash:a.z.string().optional()}),o=a.z.object({signature:a.z.string().array(),accountAddress:t.addressSchema,typedData:r.typedDataSchema,networkId:e.argentNetworkIdSchema.or(e.argentBackendNetworkIdSchema).optional(),deploymentData:a.z.object({class_hash:a.z.string().optional(),salt:a.z.string().or(a.z.number()).or(a.z.bigint()).optional(),unique:a.z.string(),calldata:a.z.array(a.z.string())}).optional()}),n=a.z.object({transactionHash:a.z.string()}),c=a.z.object({accountAddress:t.addressSchema,networkId:e.argentNetworkIdSchema.or(e.argentBackendNetworkIdSchema).optional(),deploymentData:a.z.object({class_hash:a.z.string().optional(),salt:a.z.string().or(a.z.number()).or(a.z.bigint()).optional(),unique:a.z.string(),calldata:a.z.array(a.z.string())}).optional()});exports.paymasterDeployAccountParams=c;exports.paymasterExecuteParams=o;exports.paymasterExecuteResponse=n;exports.paymasterExecutionDataParams=s;
@@ -57,3 +57,20 @@ export type PaymasterOptions = {
57
57
  useAvnu?: boolean;
58
58
  isSubsidised?: boolean;
59
59
  };
60
+ export declare const paymasterDeployAccountParams: z.ZodObject<{
61
+ accountAddress: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodTransform<`0x${string}`, string>>;
62
+ networkId: z.ZodOptional<z.ZodUnion<[z.ZodEnum<{
63
+ "mainnet-alpha": "mainnet-alpha";
64
+ "sepolia-alpha": "sepolia-alpha";
65
+ }>, z.ZodEnum<{
66
+ mainnet: "mainnet";
67
+ sepolia: "sepolia";
68
+ }>]>>;
69
+ deploymentData: z.ZodOptional<z.ZodObject<{
70
+ class_hash: z.ZodOptional<z.ZodString>;
71
+ salt: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodBigInt]>>;
72
+ unique: z.ZodString;
73
+ calldata: z.ZodArray<z.ZodString>;
74
+ }, z.core.$strip>>;
75
+ }, z.core.$strip>;
76
+ export type PaymasterDeployAccountParams = z.infer<typeof paymasterDeployAccountParams>;
@@ -1,19 +1,19 @@
1
1
  import { z as a } from "zod";
2
2
  import { addressSchema as t } from "../../chains/starknet/address.js";
3
- import { bigNumberishSchema as o, callSchema as s, typedDataSchema as n } from "../../utils/starknet/starknet.js";
4
- import { argentNetworkIdSchema as e, argentBackendNetworkIdSchema as r } from "../../backend/schema.js";
5
- const d = a.object({
6
- calls: a.array(s),
3
+ import { bigNumberishSchema as e, callSchema as n, typedDataSchema as s } from "../../utils/starknet/starknet.js";
4
+ import { argentNetworkIdSchema as o, argentBackendNetworkIdSchema as r } from "../../backend/schema.js";
5
+ const p = a.object({
6
+ calls: a.array(n),
7
7
  accountAddress: t,
8
- networkId: e.or(r).optional(),
8
+ networkId: o.or(r).optional(),
9
9
  feeTokenAddress: t,
10
- maxFee: o,
10
+ maxFee: e,
11
11
  accountClassHash: a.string().optional()
12
- }), l = a.object({
12
+ }), d = a.object({
13
13
  signature: a.string().array(),
14
14
  accountAddress: t,
15
- typedData: n,
16
- networkId: e.or(r).optional(),
15
+ typedData: s,
16
+ networkId: o.or(r).optional(),
17
17
  deploymentData: a.object({
18
18
  class_hash: a.string().optional(),
19
19
  salt: a.string().or(a.number()).or(a.bigint()).optional(),
@@ -22,9 +22,19 @@ const d = a.object({
22
22
  }).optional()
23
23
  }), g = a.object({
24
24
  transactionHash: a.string()
25
+ }), u = a.object({
26
+ accountAddress: t,
27
+ networkId: o.or(r).optional(),
28
+ deploymentData: a.object({
29
+ class_hash: a.string().optional(),
30
+ salt: a.string().or(a.number()).or(a.bigint()).optional(),
31
+ unique: a.string(),
32
+ calldata: a.array(a.string())
33
+ }).optional()
25
34
  });
26
35
  export {
27
- l as paymasterExecuteParams,
36
+ u as paymasterDeployAccountParams,
37
+ d as paymasterExecuteParams,
28
38
  g as paymasterExecuteResponse,
29
- d as paymasterExecutionDataParams
39
+ p as paymasterExecutionDataParams
30
40
  };
@@ -1 +1 @@
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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("zod"),l=require("../transactionReview/schema.cjs"),s=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()}),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()}),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: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()})]),D=t.z.object({details:p}),z=t.z.union([p,t.z.object({type:t.z.literal("multicall"),calls:t.z.array(D)})]),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"]),r=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(c).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:s.investmentMetaSchema.optional(),isExecuteFromOutside:t.z.boolean().optional()}),b="native",v="rejected",A="cancelled",k="queued",E=r.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(r),P=t.z.object({activities:j,page:t.z.number(),pageSize:t.z.number(),totalElements:t.z.number(),totalPages:t.z.number()});function x(a){return m.safeParse(a).success}const o=a=>c.safeParse(a).success,C=a=>o(a)&&a.asset.type==="token",M=a=>o(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=r;exports.activitySummarySchema=c;exports.activityTransferSchema=d;exports.feeSchema=g;exports.isActivityDetailsAction=x;exports.isActivitySummary=o;exports.isNftActivitySummary=M;exports.isTokenActivitySummary=C;exports.nativeActivityMetaSchema=h;exports.nativeActivitySchema=E;
@@ -83,9 +83,6 @@ declare const activityDetailsCallSchema: z.ZodObject<{
83
83
  zksync2: "zksync2";
84
84
  starknet: "starknet";
85
85
  }>>;
86
- context: z.ZodOptional<z.ZodObject<{
87
- isLootboxReward: z.ZodOptional<z.ZodBoolean>;
88
- }, z.core.$strip>>;
89
86
  }, z.core.$strip>, z.ZodObject<{
90
87
  type: z.ZodLiteral<"trade">;
91
88
  srcAsset: z.ZodObject<{
@@ -241,9 +238,6 @@ export declare const activityDetailsSchema: z.ZodUnion<readonly [z.ZodDiscrimina
241
238
  zksync2: "zksync2";
242
239
  starknet: "starknet";
243
240
  }>>;
244
- context: z.ZodOptional<z.ZodObject<{
245
- isLootboxReward: z.ZodOptional<z.ZodBoolean>;
246
- }, z.core.$strip>>;
247
241
  }, z.core.$strip>, z.ZodObject<{
248
242
  type: z.ZodLiteral<"trade">;
249
243
  srcAsset: z.ZodObject<{
@@ -399,9 +393,6 @@ export declare const activityDetailsSchema: z.ZodUnion<readonly [z.ZodDiscrimina
399
393
  zksync2: "zksync2";
400
394
  starknet: "starknet";
401
395
  }>>;
402
- context: z.ZodOptional<z.ZodObject<{
403
- isLootboxReward: z.ZodOptional<z.ZodBoolean>;
404
- }, z.core.$strip>>;
405
396
  }, z.core.$strip>, z.ZodObject<{
406
397
  type: z.ZodLiteral<"trade">;
407
398
  srcAsset: z.ZodObject<{
@@ -700,9 +691,6 @@ export declare const activitySchema: z.ZodObject<{
700
691
  zksync2: "zksync2";
701
692
  starknet: "starknet";
702
693
  }>>;
703
- context: z.ZodOptional<z.ZodObject<{
704
- isLootboxReward: z.ZodOptional<z.ZodBoolean>;
705
- }, z.core.$strip>>;
706
694
  }, z.core.$strip>, z.ZodObject<{
707
695
  type: z.ZodLiteral<"trade">;
708
696
  srcAsset: z.ZodObject<{
@@ -858,9 +846,6 @@ export declare const activitySchema: z.ZodObject<{
858
846
  zksync2: "zksync2";
859
847
  starknet: "starknet";
860
848
  }>>;
861
- context: z.ZodOptional<z.ZodObject<{
862
- isLootboxReward: z.ZodOptional<z.ZodBoolean>;
863
- }, z.core.$strip>>;
864
849
  }, z.core.$strip>, z.ZodObject<{
865
850
  type: z.ZodLiteral<"trade">;
866
851
  srcAsset: z.ZodObject<{
@@ -1534,9 +1519,6 @@ export declare const activitiesSchema: z.ZodArray<z.ZodObject<{
1534
1519
  zksync2: "zksync2";
1535
1520
  starknet: "starknet";
1536
1521
  }>>;
1537
- context: z.ZodOptional<z.ZodObject<{
1538
- isLootboxReward: z.ZodOptional<z.ZodBoolean>;
1539
- }, z.core.$strip>>;
1540
1522
  }, z.core.$strip>, z.ZodObject<{
1541
1523
  type: z.ZodLiteral<"trade">;
1542
1524
  srcAsset: z.ZodObject<{
@@ -1692,9 +1674,6 @@ export declare const activitiesSchema: z.ZodArray<z.ZodObject<{
1692
1674
  zksync2: "zksync2";
1693
1675
  starknet: "starknet";
1694
1676
  }>>;
1695
- context: z.ZodOptional<z.ZodObject<{
1696
- isLootboxReward: z.ZodOptional<z.ZodBoolean>;
1697
- }, z.core.$strip>>;
1698
1677
  }, z.core.$strip>, z.ZodObject<{
1699
1678
  type: z.ZodLiteral<"trade">;
1700
1679
  srcAsset: z.ZodObject<{
@@ -2113,9 +2092,6 @@ export declare const activityResponseSchema: z.ZodObject<{
2113
2092
  zksync2: "zksync2";
2114
2093
  starknet: "starknet";
2115
2094
  }>>;
2116
- context: z.ZodOptional<z.ZodObject<{
2117
- isLootboxReward: z.ZodOptional<z.ZodBoolean>;
2118
- }, z.core.$strip>>;
2119
2095
  }, z.core.$strip>, z.ZodObject<{
2120
2096
  type: z.ZodLiteral<"trade">;
2121
2097
  srcAsset: z.ZodObject<{
@@ -2271,9 +2247,6 @@ export declare const activityResponseSchema: z.ZodObject<{
2271
2247
  zksync2: "zksync2";
2272
2248
  starknet: "starknet";
2273
2249
  }>>;
2274
- context: z.ZodOptional<z.ZodObject<{
2275
- isLootboxReward: z.ZodOptional<z.ZodBoolean>;
2276
- }, z.core.$strip>>;
2277
2250
  }, z.core.$strip>, z.ZodObject<{
2278
2251
  type: z.ZodLiteral<"trade">;
2279
2252
  srcAsset: z.ZodObject<{
@@ -1,8 +1,8 @@
1
1
  import { z as t } from "zod";
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";
2
+ import { actionSchema as m, targetedDappSchema as g } from "../transactionReview/schema.js";
3
+ import { investmentMetaSchema as y, stakerInfoSchema as d, stakingActionSchema as b } from "../../../staking/schema.js";
4
4
  import { addressSchemaArgentBackend as e } from "../../../chains/starknet/address.js";
5
- const i = t.object({
5
+ const o = t.object({
6
6
  network: t.string(),
7
7
  hash: t.string(),
8
8
  status: t.string(),
@@ -16,20 +16,20 @@ const i = t.object({
16
16
  currency: t.string(),
17
17
  currencyAmount: t.number()
18
18
  }).optional().nullable()
19
- }), o = t.enum(["ethereum", "starknet", "zksync", "zksync2"]), S = t.object({
19
+ }), i = t.enum(["ethereum", "starknet", "zksync", "zksync2"]), S = t.object({
20
20
  type: t.enum(["payment", "gasFee"]),
21
21
  leg: t.enum(["credit", "debit"]),
22
22
  asset: a,
23
23
  counterParty: e.optional(),
24
- counterPartyNetwork: o.optional()
24
+ counterPartyNetwork: i.optional()
25
25
  }), h = t.object({
26
26
  address: e,
27
- network: o,
27
+ network: i,
28
28
  type: t.enum(["wallet", "token"])
29
29
  }), v = t.object({
30
30
  chainId: t.enum(["TESTNET", "MAINNET", "SEPOLIA"]),
31
31
  ethereumNetwork: t.enum(["mainnet", "sepolia"])
32
- }), j = t.enum([
32
+ }), k = t.enum([
33
33
  "approval",
34
34
  "changePubKey",
35
35
  "dappInteraction",
@@ -51,10 +51,10 @@ const i = t.object({
51
51
  "cancelEscape",
52
52
  "accountUpgraded",
53
53
  "multisigConfigurationUpdated"
54
- ]), k = 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
@@ -67,9 +67,7 @@ const i = t.object({
67
67
  newImplementation: t.string().optional(),
68
68
  newVersion: t.string().optional(),
69
69
  signerGuid: t.string().optional(),
70
- signers: t.array(f).optional()
71
- }), w = t.object({
72
- isLootboxReward: t.boolean().optional()
70
+ signers: t.array(j).optional()
73
71
  }), s = t.discriminatedUnion("type", [
74
72
  t.object({
75
73
  type: t.literal("deploy"),
@@ -87,8 +85,7 @@ const i = t.object({
87
85
  counterparty: e,
88
86
  leg: t.string(),
89
87
  asset: a,
90
- counterpartyNetwork: o.optional(),
91
- context: w.optional()
88
+ counterpartyNetwork: i.optional()
92
89
  }),
93
90
  t.object({
94
91
  type: t.literal("trade"),
@@ -103,7 +100,7 @@ const i = t.object({
103
100
  t.object({
104
101
  type: t.literal("dappInteraction"),
105
102
  dappAddress: e,
106
- function: k.optional().nullable()
103
+ function: f.optional().nullable()
107
104
  // This object is often null. It happens when we were unable to get the ABI or failed decoding the function call
108
105
  }),
109
106
  t.object({
@@ -111,24 +108,24 @@ const i = t.object({
111
108
  stakingAction: b,
112
109
  counterparty: e,
113
110
  asset: a,
114
- stakerInfo: g
111
+ stakerInfo: d
115
112
  }),
116
113
  t.object({
117
114
  type: t.literal("gift"),
118
115
  counterparty: e.optional(),
119
116
  leg: t.string(),
120
117
  asset: a,
121
- counterpartyNetwork: o.optional()
118
+ counterpartyNetwork: i.optional()
122
119
  })
123
- ]), N = t.object({
120
+ ]), w = t.object({
124
121
  details: s
125
- }), I = t.union([
122
+ }), N = t.union([
126
123
  s,
127
124
  t.object({
128
125
  type: t.literal("multicall"),
129
- calls: t.array(N)
126
+ calls: t.array(w)
130
127
  })
131
- ]), x = t.object({
128
+ ]), I = t.object({
132
129
  dappId: t.string(),
133
130
  name: t.string().optional().nullable()
134
131
  }), c = t.object({
@@ -174,20 +171,20 @@ const i = t.object({
174
171
  wallet: e,
175
172
  txSender: e,
176
173
  source: t.string(),
177
- type: j,
174
+ type: k,
178
175
  group: t.enum(["finance", "security"]),
179
176
  submitted: t.number(),
180
177
  lastModified: t.number(),
181
- transaction: i,
178
+ transaction: o,
182
179
  transfers: t.array(S),
183
180
  // to be clarified
184
181
  fees: t.array(D).optional(),
185
182
  relatedAddresses: t.array(h).nullable(),
186
183
  network: t.string(),
187
184
  networkDetails: v.optional(),
188
- details: I,
185
+ details: N,
189
186
  transferSummary: t.array(c).optional(),
190
- dapp: x.optional(),
187
+ dapp: I.optional(),
191
188
  actions: t.array(m).optional(),
192
189
  title: t.string().optional(),
193
190
  multisigDetails: t.object({
@@ -199,9 +196,9 @@ const i = t.object({
199
196
  subtitle: t.string().optional(),
200
197
  /** let's not import the keys from x-ui here */
201
198
  icon: t.string().optional(),
202
- investment: d.optional(),
199
+ investment: y.optional(),
203
200
  isExecuteFromOutside: t.boolean().optional()
204
- }), T = "native", P = "rejected", C = "cancelled", M = "queued", B = p.pick({
201
+ }), T = "native", x = "rejected", P = "cancelled", C = "queued", B = p.pick({
205
202
  status: !0,
206
203
  actions: !0,
207
204
  submitted: !0,
@@ -213,45 +210,45 @@ const i = t.object({
213
210
  status: t.union([
214
211
  l,
215
212
  t.enum([
213
+ x,
216
214
  P,
217
- C,
218
- M
215
+ C
219
216
  ])
220
217
  ]),
221
218
  type: t.literal(T),
222
- transaction: i.pick({
219
+ transaction: o.pick({
223
220
  hash: !0
224
221
  }),
225
- dapp: y.optional(),
222
+ dapp: g.optional(),
226
223
  meta: E.optional()
227
- }), z = t.array(p), K = t.object({
228
- activities: z,
224
+ }), M = t.array(p), K = t.object({
225
+ activities: M,
229
226
  page: t.number(),
230
227
  pageSize: t.number(),
231
228
  totalElements: t.number(),
232
229
  totalPages: t.number()
233
230
  });
234
- function L(n) {
231
+ function O(n) {
235
232
  return r.safeParse(n).success;
236
233
  }
237
- const u = (n) => c.safeParse(n).success, O = (n) => u(n) && n.asset.type === "token", q = (n) => u(n) && n.asset.type === "nft";
234
+ const u = (n) => c.safeParse(n).success, R = (n) => u(n) && n.asset.type === "token", q = (n) => u(n) && n.asset.type === "nft";
238
235
  export {
239
- C as NativeActivityStatusCancelled,
240
- M as NativeActivityStatusQueued,
241
- P as NativeActivityStatusRejected,
236
+ P as NativeActivityStatusCancelled,
237
+ C as NativeActivityStatusQueued,
238
+ x as NativeActivityStatusRejected,
242
239
  T as NativeActivityTypeNative,
243
- z as activitiesSchema,
244
- x as activityDappSchema,
245
- I as activityDetailsSchema,
240
+ M as activitiesSchema,
241
+ I as activityDappSchema,
242
+ N as activityDetailsSchema,
246
243
  K as activityResponseSchema,
247
244
  p as activitySchema,
248
245
  c as activitySummarySchema,
249
246
  S as activityTransferSchema,
250
247
  D as feeSchema,
251
- L as isActivityDetailsAction,
248
+ O as isActivityDetailsAction,
252
249
  u as isActivitySummary,
253
250
  q as isNftActivitySummary,
254
- O as isTokenActivitySummary,
251
+ R as isTokenActivitySummary,
255
252
  E as nativeActivityMetaSchema,
256
253
  B as nativeActivitySchema
257
254
  };