@argent/x-shared 1.77.1 → 1.78.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.js +120 -122
- package/dist/paymaster.cjs +1 -1
- package/dist/paymaster.js +5 -4
- package/dist/simulation.cjs +1 -1
- package/dist/simulation.js +18 -20
- package/dist/src/features/paymaster/IPaymasterService.d.ts +2 -1
- package/dist/src/features/paymaster/PaymasterService.cjs +1 -1
- package/dist/src/features/paymaster/PaymasterService.d.ts +2 -1
- package/dist/src/features/paymaster/PaymasterService.js +49 -30
- package/dist/src/features/paymaster/types.cjs +1 -1
- package/dist/src/features/paymaster/types.d.ts +17 -0
- package/dist/src/features/paymaster/types.js +21 -11
- package/dist/src/features/simulation/activity/schema.cjs +1 -1
- package/dist/src/features/simulation/activity/schema.d.ts +0 -27
- package/dist/src/features/simulation/activity/schema.js +40 -43
- package/dist/src/features/simulation/transactionReview/schema.cjs +1 -1
- package/dist/src/features/simulation/transactionReview/schema.d.ts +0 -18
- package/dist/src/features/simulation/transactionReview/schema.js +70 -77
- package/dist/src/transactions/transactionExecuteTypes.cjs +1 -1
- package/dist/src/transactions/transactionExecuteTypes.d.ts +0 -43
- package/dist/src/transactions/transactionExecuteTypes.js +3 -18
- package/package.json +1 -1
package/dist/simulation.js
CHANGED
|
@@ -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
|
|
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
|
|
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,
|
|
20
|
-
import { reasonsSchema as
|
|
21
|
-
import { getHighestSeverity as
|
|
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
|
-
|
|
25
|
-
|
|
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
|
-
|
|
49
|
-
|
|
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
|
|
80
|
-
|
|
81
|
-
Ne as propertySchema,
|
|
82
|
-
Oe as reasonsSchema,
|
|
79
|
+
Ee as propertySchema,
|
|
80
|
+
Ce as reasonsSchema,
|
|
83
81
|
re as resourceBoundsSchema,
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
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
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import { paymasterExecuteResponse as
|
|
4
|
-
import { getArgentNetwork as
|
|
5
|
-
import { typedDataSchema as
|
|
6
|
-
import { urlWithQuery as
|
|
7
|
-
class
|
|
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:
|
|
13
|
-
calls:
|
|
14
|
-
contractAddress:
|
|
15
|
-
calldata: A.toCalldata(
|
|
16
|
-
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:
|
|
20
|
-
maxGasTokenAmount:
|
|
19
|
+
gasTokenAddress: a ? null : u.toHex(e.feeTokenAddress),
|
|
20
|
+
maxGasTokenAmount: a ? null : u.toHex(e.maxFee),
|
|
21
21
|
accountClassHash: e.accountClassHash
|
|
22
|
-
},
|
|
23
|
-
body:
|
|
22
|
+
}, o = await this.httpService.post(r, {
|
|
23
|
+
body: p.stringify(d),
|
|
24
24
|
headers: {
|
|
25
25
|
"Content-Type": "application/json"
|
|
26
26
|
}
|
|
27
|
-
}),
|
|
28
|
-
if (!
|
|
27
|
+
}), m = g.safeParse(o);
|
|
28
|
+
if (!m.success)
|
|
29
29
|
throw new Error("Invalid response from paymaster");
|
|
30
|
-
return
|
|
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:
|
|
46
|
-
let
|
|
47
|
-
|
|
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
|
|
50
|
+
const l = {
|
|
51
51
|
signature: e.signature,
|
|
52
52
|
userAddress: e.accountAddress,
|
|
53
|
-
typedData:
|
|
53
|
+
typedData: n ? p.stringify(e.typedData) : e.typedData,
|
|
54
54
|
deploymentData: e.deploymentData
|
|
55
|
-
},
|
|
56
|
-
body:
|
|
55
|
+
}, d = await this.httpService.post(r, {
|
|
56
|
+
body: p.stringify(l),
|
|
57
57
|
headers: {
|
|
58
58
|
"Content-Type": "application/json"
|
|
59
59
|
}
|
|
60
|
-
}),
|
|
61
|
-
if (!
|
|
60
|
+
}), o = v.safeParse(d);
|
|
61
|
+
if (!o.success)
|
|
62
62
|
throw new Error("Invalid response from paymaster");
|
|
63
|
-
return
|
|
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
|
-
|
|
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
|
|
4
|
-
import { argentNetworkIdSchema as
|
|
5
|
-
const
|
|
6
|
-
calls: a.array(
|
|
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:
|
|
8
|
+
networkId: o.or(r).optional(),
|
|
9
9
|
feeTokenAddress: t,
|
|
10
|
-
maxFee:
|
|
10
|
+
maxFee: e,
|
|
11
11
|
accountClassHash: a.string().optional()
|
|
12
|
-
}),
|
|
12
|
+
}), d = a.object({
|
|
13
13
|
signature: a.string().array(),
|
|
14
14
|
accountAddress: t,
|
|
15
|
-
typedData:
|
|
16
|
-
networkId:
|
|
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
|
-
|
|
36
|
+
u as paymasterDeployAccountParams,
|
|
37
|
+
d as paymasterExecuteParams,
|
|
28
38
|
g as paymasterExecuteResponse,
|
|
29
|
-
|
|
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"),
|
|
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
|
|
3
|
-
import { investmentMetaSchema as
|
|
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
|
|
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
|
-
}),
|
|
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:
|
|
24
|
+
counterPartyNetwork: i.optional()
|
|
25
25
|
}), h = t.object({
|
|
26
26
|
address: e,
|
|
27
|
-
network:
|
|
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
|
-
}),
|
|
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
|
-
]),
|
|
54
|
+
]), f = t.object({
|
|
55
55
|
name: t.string(),
|
|
56
56
|
parameters: t.array(t.unknown()).optional()
|
|
57
|
-
}),
|
|
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(
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
118
|
+
counterpartyNetwork: i.optional()
|
|
122
119
|
})
|
|
123
|
-
]),
|
|
120
|
+
]), w = t.object({
|
|
124
121
|
details: s
|
|
125
|
-
}),
|
|
122
|
+
}), N = t.union([
|
|
126
123
|
s,
|
|
127
124
|
t.object({
|
|
128
125
|
type: t.literal("multicall"),
|
|
129
|
-
calls: t.array(
|
|
126
|
+
calls: t.array(w)
|
|
130
127
|
})
|
|
131
|
-
]),
|
|
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:
|
|
174
|
+
type: k,
|
|
178
175
|
group: t.enum(["finance", "security"]),
|
|
179
176
|
submitted: t.number(),
|
|
180
177
|
lastModified: t.number(),
|
|
181
|
-
transaction:
|
|
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:
|
|
185
|
+
details: N,
|
|
189
186
|
transferSummary: t.array(c).optional(),
|
|
190
|
-
dapp:
|
|
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:
|
|
199
|
+
investment: y.optional(),
|
|
203
200
|
isExecuteFromOutside: t.boolean().optional()
|
|
204
|
-
}), T = "native",
|
|
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:
|
|
219
|
+
transaction: o.pick({
|
|
223
220
|
hash: !0
|
|
224
221
|
}),
|
|
225
|
-
dapp:
|
|
222
|
+
dapp: g.optional(),
|
|
226
223
|
meta: E.optional()
|
|
227
|
-
}),
|
|
228
|
-
activities:
|
|
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
|
|
231
|
+
function O(n) {
|
|
235
232
|
return r.safeParse(n).success;
|
|
236
233
|
}
|
|
237
|
-
const u = (n) => c.safeParse(n).success,
|
|
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
|
-
|
|
240
|
-
|
|
241
|
-
|
|
236
|
+
P as NativeActivityStatusCancelled,
|
|
237
|
+
C as NativeActivityStatusQueued,
|
|
238
|
+
x as NativeActivityStatusRejected,
|
|
242
239
|
T as NativeActivityTypeNative,
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
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
|
-
|
|
248
|
+
O as isActivityDetailsAction,
|
|
252
249
|
u as isActivitySummary,
|
|
253
250
|
q as isNftActivitySummary,
|
|
254
|
-
|
|
251
|
+
R as isTokenActivitySummary,
|
|
255
252
|
E as nativeActivityMetaSchema,
|
|
256
253
|
B as nativeActivitySchema
|
|
257
254
|
};
|