@argent/x-shared 1.27.0 → 1.29.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/features/simulation/activity/schema.d.ts +338 -338
- package/dist/features/simulation/activity/utils/createNativeActivity.d.ts +10 -10
- package/dist/features/simulation/activity/utils/index.d.ts +1 -0
- package/dist/features/simulation/activity/utils/isUpgradeActivity.d.ts +3 -0
- package/dist/features/simulation/transactionReview/schema.d.ts +1562 -1562
- package/dist/index.d.ts +10 -9
- package/dist/index.js +3 -3
- package/dist/index.mjs +3937 -2230
- package/dist/knownDapps/schema.d.ts +22 -22
- package/dist/knownDapps/utils/getDapplandUrl.d.ts +1 -1
- package/dist/nameResolution/ResolveNameService.d.ts +1 -1
- package/dist/nameResolution/schema.d.ts +4 -4
- package/dist/onchainRecovery/IOnchainRecoveryService.d.ts +13 -0
- package/dist/onchainRecovery/OnchainRecoveryService.d.ts +18 -0
- package/dist/onchainRecovery/index.d.ts +3 -0
- package/dist/onchainRecovery/schema.d.ts +73 -0
- package/dist/{schema-THcYC9Pj.mjs → schema-3qaq9ugL.mjs} +141 -141
- package/dist/{schema-CtZY8-Gm.js → schema-C-_pmcO7.js} +1 -1
- package/dist/simulation.js +1 -1
- package/dist/simulation.mjs +113 -93
- package/dist/tokens/service/implementation.d.ts +1 -1
- package/dist/tokens/service/types/backend.model.d.ts +20 -20
- package/dist/tokens/service/types/defiPosition.model.d.ts +236 -236
- package/dist/tokens/service/types/token.model.d.ts +24 -24
- package/dist/tokens/service/types/unclaimedRewards.model.d.ts +8 -8
- package/dist/transactions/errors.d.ts +4 -4
- package/dist/transactions/useTransactionReviewV2web.d.ts +56 -56
- package/dist/utils/starknet/starknetSchemas.d.ts +212 -212
- package/package.json +2 -1
|
@@ -5,11 +5,11 @@ export declare const dappLinkSchema: z.ZodObject<{
|
|
|
5
5
|
url: z.ZodString;
|
|
6
6
|
position: z.ZodNumber;
|
|
7
7
|
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
name: "
|
|
8
|
+
name: "dappland" | "discord" | "github" | "telegram" | "twitter" | "website";
|
|
9
9
|
url: string;
|
|
10
10
|
position: number;
|
|
11
11
|
}, {
|
|
12
|
-
name: "
|
|
12
|
+
name: "dappland" | "discord" | "github" | "telegram" | "twitter" | "website";
|
|
13
13
|
url: string;
|
|
14
14
|
position: number;
|
|
15
15
|
}>;
|
|
@@ -36,11 +36,11 @@ export declare const knownDappSchema: z.ZodObject<{
|
|
|
36
36
|
url: z.ZodString;
|
|
37
37
|
position: z.ZodNumber;
|
|
38
38
|
}, "strip", z.ZodTypeAny, {
|
|
39
|
-
name: "
|
|
39
|
+
name: "dappland" | "discord" | "github" | "telegram" | "twitter" | "website";
|
|
40
40
|
url: string;
|
|
41
41
|
position: number;
|
|
42
42
|
}, {
|
|
43
|
-
name: "
|
|
43
|
+
name: "dappland" | "discord" | "github" | "telegram" | "twitter" | "website";
|
|
44
44
|
url: string;
|
|
45
45
|
position: number;
|
|
46
46
|
}>, "many">>;
|
|
@@ -60,43 +60,43 @@ export declare const knownDappSchema: z.ZodObject<{
|
|
|
60
60
|
}, "strip", z.ZodTypeAny, {
|
|
61
61
|
name: string;
|
|
62
62
|
dappId: string;
|
|
63
|
-
argentVerified: boolean;
|
|
64
63
|
inAppBrowserCompatible: boolean;
|
|
64
|
+
argentVerified: boolean;
|
|
65
65
|
description?: string | undefined;
|
|
66
|
-
brandColor?: string | undefined;
|
|
67
66
|
logoUrl?: string | undefined;
|
|
67
|
+
dappUrl?: string | undefined;
|
|
68
68
|
links?: {
|
|
69
|
-
name: "
|
|
69
|
+
name: "dappland" | "discord" | "github" | "telegram" | "twitter" | "website";
|
|
70
70
|
url: string;
|
|
71
71
|
position: number;
|
|
72
72
|
}[] | undefined;
|
|
73
|
-
dappUrl?: string | undefined;
|
|
74
73
|
contracts?: {
|
|
75
74
|
address: `0x${string}`;
|
|
76
75
|
chain: "ethereum" | "starknet";
|
|
77
76
|
}[] | undefined;
|
|
78
77
|
categories?: string[] | undefined;
|
|
79
78
|
supportedApps?: string[] | undefined;
|
|
79
|
+
brandColor?: string | undefined;
|
|
80
80
|
}, {
|
|
81
81
|
name: string;
|
|
82
82
|
dappId: string;
|
|
83
|
-
argentVerified: boolean;
|
|
84
83
|
inAppBrowserCompatible: boolean;
|
|
84
|
+
argentVerified: boolean;
|
|
85
85
|
description?: string | undefined;
|
|
86
|
-
brandColor?: string | undefined;
|
|
87
86
|
logoUrl?: string | undefined;
|
|
87
|
+
dappUrl?: string | undefined;
|
|
88
88
|
links?: {
|
|
89
|
-
name: "
|
|
89
|
+
name: "dappland" | "discord" | "github" | "telegram" | "twitter" | "website";
|
|
90
90
|
url: string;
|
|
91
91
|
position: number;
|
|
92
92
|
}[] | undefined;
|
|
93
|
-
dappUrl?: string | undefined;
|
|
94
93
|
contracts?: {
|
|
95
94
|
address: string;
|
|
96
95
|
chain: "ethereum" | "starknet";
|
|
97
96
|
}[] | undefined;
|
|
98
97
|
categories?: string[] | undefined;
|
|
99
98
|
supportedApps?: string[] | undefined;
|
|
99
|
+
brandColor?: string | undefined;
|
|
100
100
|
}>;
|
|
101
101
|
export declare const knownDappsSchema: z.ZodArray<z.ZodObject<{
|
|
102
102
|
dappId: z.ZodString;
|
|
@@ -111,11 +111,11 @@ export declare const knownDappsSchema: z.ZodArray<z.ZodObject<{
|
|
|
111
111
|
url: z.ZodString;
|
|
112
112
|
position: z.ZodNumber;
|
|
113
113
|
}, "strip", z.ZodTypeAny, {
|
|
114
|
-
name: "
|
|
114
|
+
name: "dappland" | "discord" | "github" | "telegram" | "twitter" | "website";
|
|
115
115
|
url: string;
|
|
116
116
|
position: number;
|
|
117
117
|
}, {
|
|
118
|
-
name: "
|
|
118
|
+
name: "dappland" | "discord" | "github" | "telegram" | "twitter" | "website";
|
|
119
119
|
url: string;
|
|
120
120
|
position: number;
|
|
121
121
|
}>, "many">>;
|
|
@@ -135,43 +135,43 @@ export declare const knownDappsSchema: z.ZodArray<z.ZodObject<{
|
|
|
135
135
|
}, "strip", z.ZodTypeAny, {
|
|
136
136
|
name: string;
|
|
137
137
|
dappId: string;
|
|
138
|
-
argentVerified: boolean;
|
|
139
138
|
inAppBrowserCompatible: boolean;
|
|
139
|
+
argentVerified: boolean;
|
|
140
140
|
description?: string | undefined;
|
|
141
|
-
brandColor?: string | undefined;
|
|
142
141
|
logoUrl?: string | undefined;
|
|
142
|
+
dappUrl?: string | undefined;
|
|
143
143
|
links?: {
|
|
144
|
-
name: "
|
|
144
|
+
name: "dappland" | "discord" | "github" | "telegram" | "twitter" | "website";
|
|
145
145
|
url: string;
|
|
146
146
|
position: number;
|
|
147
147
|
}[] | undefined;
|
|
148
|
-
dappUrl?: string | undefined;
|
|
149
148
|
contracts?: {
|
|
150
149
|
address: `0x${string}`;
|
|
151
150
|
chain: "ethereum" | "starknet";
|
|
152
151
|
}[] | undefined;
|
|
153
152
|
categories?: string[] | undefined;
|
|
154
153
|
supportedApps?: string[] | undefined;
|
|
154
|
+
brandColor?: string | undefined;
|
|
155
155
|
}, {
|
|
156
156
|
name: string;
|
|
157
157
|
dappId: string;
|
|
158
|
-
argentVerified: boolean;
|
|
159
158
|
inAppBrowserCompatible: boolean;
|
|
159
|
+
argentVerified: boolean;
|
|
160
160
|
description?: string | undefined;
|
|
161
|
-
brandColor?: string | undefined;
|
|
162
161
|
logoUrl?: string | undefined;
|
|
162
|
+
dappUrl?: string | undefined;
|
|
163
163
|
links?: {
|
|
164
|
-
name: "
|
|
164
|
+
name: "dappland" | "discord" | "github" | "telegram" | "twitter" | "website";
|
|
165
165
|
url: string;
|
|
166
166
|
position: number;
|
|
167
167
|
}[] | undefined;
|
|
168
|
-
dappUrl?: string | undefined;
|
|
169
168
|
contracts?: {
|
|
170
169
|
address: string;
|
|
171
170
|
chain: "ethereum" | "starknet";
|
|
172
171
|
}[] | undefined;
|
|
173
172
|
categories?: string[] | undefined;
|
|
174
173
|
supportedApps?: string[] | undefined;
|
|
174
|
+
brandColor?: string | undefined;
|
|
175
175
|
}>, "many">;
|
|
176
176
|
export type KnownDapp = z.infer<typeof knownDappSchema>;
|
|
177
177
|
export type KnownDapps = z.infer<typeof knownDappsSchema>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { KnownDapp } from '../schema';
|
|
2
2
|
|
|
3
3
|
export declare function getDapplandLinkForDapp(dapp?: KnownDapp): {
|
|
4
|
-
name: "
|
|
4
|
+
name: "dappland" | "discord" | "github" | "telegram" | "twitter" | "website";
|
|
5
5
|
url: string;
|
|
6
6
|
position: number;
|
|
7
7
|
} | undefined;
|
|
@@ -26,8 +26,8 @@ export declare class ResolveNameService implements IResolveNameService {
|
|
|
26
26
|
* getAddressFromStarknetId: retrieve address from starknetId
|
|
27
27
|
*/
|
|
28
28
|
getStarknetIdFromAddress(network: ArgentBackendNetworkId, addresses: Address[], includeAvatar?: boolean): Promise<{
|
|
29
|
-
status: "KNOWN" | "UNKNOWN";
|
|
30
29
|
address: `0x${string}`;
|
|
30
|
+
status: "KNOWN" | "UNKNOWN";
|
|
31
31
|
resolutions?: {
|
|
32
32
|
name: string;
|
|
33
33
|
provider: string;
|
|
@@ -62,16 +62,16 @@ export declare const nameResolutionAddressSchema: z.ZodObject<{
|
|
|
62
62
|
avatar?: string | undefined;
|
|
63
63
|
}>, "many">>;
|
|
64
64
|
}, "strip", z.ZodTypeAny, {
|
|
65
|
-
status: "KNOWN" | "UNKNOWN";
|
|
66
65
|
address: `0x${string}`;
|
|
66
|
+
status: "KNOWN" | "UNKNOWN";
|
|
67
67
|
resolutions?: {
|
|
68
68
|
name: string;
|
|
69
69
|
provider: string;
|
|
70
70
|
avatar?: string | undefined;
|
|
71
71
|
}[] | undefined;
|
|
72
72
|
}, {
|
|
73
|
-
status: "KNOWN" | "UNKNOWN";
|
|
74
73
|
address: string;
|
|
74
|
+
status: "KNOWN" | "UNKNOWN";
|
|
75
75
|
resolutions?: {
|
|
76
76
|
name: string;
|
|
77
77
|
provider: string;
|
|
@@ -96,16 +96,16 @@ export declare const nameResolutionAddressesSchema: z.ZodArray<z.ZodObject<{
|
|
|
96
96
|
avatar?: string | undefined;
|
|
97
97
|
}>, "many">>;
|
|
98
98
|
}, "strip", z.ZodTypeAny, {
|
|
99
|
-
status: "KNOWN" | "UNKNOWN";
|
|
100
99
|
address: `0x${string}`;
|
|
100
|
+
status: "KNOWN" | "UNKNOWN";
|
|
101
101
|
resolutions?: {
|
|
102
102
|
name: string;
|
|
103
103
|
provider: string;
|
|
104
104
|
avatar?: string | undefined;
|
|
105
105
|
}[] | undefined;
|
|
106
106
|
}, {
|
|
107
|
-
status: "KNOWN" | "UNKNOWN";
|
|
108
107
|
address: string;
|
|
108
|
+
status: "KNOWN" | "UNKNOWN";
|
|
109
109
|
resolutions?: {
|
|
110
110
|
name: string;
|
|
111
111
|
provider: string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Address } from '../chains/starknet/address';
|
|
2
|
+
import { RecoveryStatus } from './schema';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* IOnchainRecoveryService interface
|
|
6
|
+
*/
|
|
7
|
+
export interface IOnchainRecoveryService {
|
|
8
|
+
startRecovery(address: Address, feeToken: Address, publicKey: string, privateKey: string): Promise<{
|
|
9
|
+
recoveryId: number;
|
|
10
|
+
}>;
|
|
11
|
+
getRecovery(address: Address, recoveryId: number): Promise<RecoveryStatus>;
|
|
12
|
+
cancelRecovery(address: Address, feeToken: Address, publicKey: string, privateKey: string): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Address } from '../chains/starknet/address';
|
|
2
|
+
import { IHttpService } from '../http';
|
|
3
|
+
import { IOnchainRecoveryService } from './IOnchainRecoveryService';
|
|
4
|
+
import { RecoveryStatus } from './schema';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* RecoveryService class implements IRecoveryService interface.
|
|
8
|
+
*/
|
|
9
|
+
export declare class OnchainRecoveryService implements IOnchainRecoveryService {
|
|
10
|
+
protected readonly apiBase: string;
|
|
11
|
+
private readonly httpService;
|
|
12
|
+
constructor(apiBase: string, httpService: IHttpService);
|
|
13
|
+
startRecovery(address: Address, feeToken: Address, publicKey: string, privateKey: string): Promise<{
|
|
14
|
+
recoveryId: number;
|
|
15
|
+
}>;
|
|
16
|
+
getRecovery(address: Address, recoveryId: number): Promise<RecoveryStatus>;
|
|
17
|
+
cancelRecovery(address: Address, feeToken: Address, publicKey: string, privateKey: string): Promise<void>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export declare const startRecoverySchema: z.ZodObject<{
|
|
4
|
+
recoveryId: z.ZodNumber;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
recoveryId: number;
|
|
7
|
+
}, {
|
|
8
|
+
recoveryId: number;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const recoveryBodySchema: z.ZodObject<{
|
|
11
|
+
feeToken: z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>;
|
|
12
|
+
signerSignature: z.ZodObject<{
|
|
13
|
+
type: z.ZodLiteral<"StarknetKey">;
|
|
14
|
+
signer: z.ZodObject<{
|
|
15
|
+
publicKey: z.ZodEffects<z.ZodString, `0x${string}`, string>;
|
|
16
|
+
r: z.ZodEffects<z.ZodString, `0x${string}`, string>;
|
|
17
|
+
s: z.ZodEffects<z.ZodString, `0x${string}`, string>;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
r: `0x${string}`;
|
|
20
|
+
s: `0x${string}`;
|
|
21
|
+
publicKey: `0x${string}`;
|
|
22
|
+
}, {
|
|
23
|
+
r: string;
|
|
24
|
+
s: string;
|
|
25
|
+
publicKey: string;
|
|
26
|
+
}>;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
type: "StarknetKey";
|
|
29
|
+
signer: {
|
|
30
|
+
r: `0x${string}`;
|
|
31
|
+
s: `0x${string}`;
|
|
32
|
+
publicKey: `0x${string}`;
|
|
33
|
+
};
|
|
34
|
+
}, {
|
|
35
|
+
type: "StarknetKey";
|
|
36
|
+
signer: {
|
|
37
|
+
r: string;
|
|
38
|
+
s: string;
|
|
39
|
+
publicKey: string;
|
|
40
|
+
};
|
|
41
|
+
}>;
|
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
|
43
|
+
feeToken: `0x${string}`;
|
|
44
|
+
signerSignature: {
|
|
45
|
+
type: "StarknetKey";
|
|
46
|
+
signer: {
|
|
47
|
+
r: `0x${string}`;
|
|
48
|
+
s: `0x${string}`;
|
|
49
|
+
publicKey: `0x${string}`;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
}, {
|
|
53
|
+
feeToken: string;
|
|
54
|
+
signerSignature: {
|
|
55
|
+
type: "StarknetKey";
|
|
56
|
+
signer: {
|
|
57
|
+
r: string;
|
|
58
|
+
s: string;
|
|
59
|
+
publicKey: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
}>;
|
|
63
|
+
export declare const recoveryStatusSchema: z.ZodEnum<["ONGOING", "COMPLETED", "ERROR", "CANCELLED", "AWAITING_FUNDS"]>;
|
|
64
|
+
export declare const getRecoverySchema: z.ZodObject<{
|
|
65
|
+
status: z.ZodEnum<["ONGOING", "COMPLETED", "ERROR", "CANCELLED", "AWAITING_FUNDS"]>;
|
|
66
|
+
}, "strip", z.ZodTypeAny, {
|
|
67
|
+
status: "ONGOING" | "COMPLETED" | "ERROR" | "CANCELLED" | "AWAITING_FUNDS";
|
|
68
|
+
}, {
|
|
69
|
+
status: "ONGOING" | "COMPLETED" | "ERROR" | "CANCELLED" | "AWAITING_FUNDS";
|
|
70
|
+
}>;
|
|
71
|
+
export type StartRecoveryResponse = z.infer<typeof startRecoverySchema>;
|
|
72
|
+
export type RecoveryStatus = z.infer<typeof recoveryStatusSchema>;
|
|
73
|
+
export type GetRecoveryResponse = z.infer<typeof getRecoverySchema>;
|