@portal-hq/web 3.7.0 → 3.8.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/hypernative.d.ts +39 -336
- package/lib/commonjs/mpc/index.js +188 -810
- package/lib/commonjs/shared/types/api.js +5 -0
- package/lib/commonjs/shared/types/common.js +5 -0
- package/lib/commonjs/shared/types/hypernative.js +2 -0
- package/lib/commonjs/shared/types/index.js +30 -0
- package/lib/commonjs/shared/types/lifi.js +5 -0
- package/lib/commonjs/shared/types/yieldxyz.js +2 -0
- package/lib/commonjs/shared/types/zero-x.js +2 -0
- package/lib/esm/mpc/index.js +188 -810
- package/lib/esm/shared/types/api.js +4 -0
- package/lib/esm/shared/types/common.js +4 -0
- package/lib/esm/shared/types/hypernative.js +1 -0
- package/lib/esm/shared/types/index.js +14 -0
- package/lib/esm/shared/types/lifi.js +4 -0
- package/lib/esm/shared/types/yieldxyz.js +1 -0
- package/lib/esm/shared/types/zero-x.js +1 -0
- package/lifi-types.d.ts +54 -1235
- package/package.json +10 -6
- package/src/index.ts +15 -12
- package/src/integrations/trading/lifi/index.ts +1 -1
- package/src/integrations/trading/zero-x/index.ts +1 -1
- package/src/integrations/yield/yieldxyz.ts +1 -1
- package/src/mpc/index.ts +202 -970
- package/src/shared/types/api.ts +171 -0
- package/src/shared/types/common.ts +681 -0
- package/src/shared/types/hypernative.ts +337 -0
- package/src/shared/types/index.ts +17 -0
- package/src/shared/types/lifi.ts +1236 -0
- package/src/shared/types/yieldxyz.ts +778 -0
- package/src/shared/types/zero-x.ts +204 -0
- package/types.d.ts +117 -704
- package/yieldxyz-types.d.ts +77 -777
- package/zero-x.d.ts +12 -204
package/hypernative.d.ts
CHANGED
|
@@ -8,339 +8,42 @@ export interface ScreenAddressApiResponse {
|
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export interface ScanSolanaRequest {
|
|
53
|
-
transaction: SolanaTransaction
|
|
54
|
-
url?: string
|
|
55
|
-
validateRecentBlockHash?: boolean
|
|
56
|
-
showFullFindings?: boolean
|
|
57
|
-
policy?: string
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export interface ScanSolanaResponse {
|
|
61
|
-
data: {
|
|
62
|
-
rawResponse: {
|
|
63
|
-
success: boolean
|
|
64
|
-
data: SolanaTransactionRiskData
|
|
65
|
-
error: string | null
|
|
66
|
-
version?: string
|
|
67
|
-
service?: string
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export type ScanNftsRequest = ScanNftRequestItem[]
|
|
73
|
-
|
|
74
|
-
export interface ScanNftsResponse {
|
|
75
|
-
data: {
|
|
76
|
-
rawResponse: {
|
|
77
|
-
success: boolean
|
|
78
|
-
data: {
|
|
79
|
-
nfts: ScanNftResponseItem[]
|
|
80
|
-
}
|
|
81
|
-
error: string | null
|
|
82
|
-
version?: string
|
|
83
|
-
service?: string
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export type ScanTokensRequest = ScanTokenRequestItem[]
|
|
89
|
-
|
|
90
|
-
export interface ScanTokensResponse {
|
|
91
|
-
data: {
|
|
92
|
-
rawResponse: {
|
|
93
|
-
success: boolean
|
|
94
|
-
data: {
|
|
95
|
-
tokens: ScanTokenResponseItem[]
|
|
96
|
-
}
|
|
97
|
-
error: string | null
|
|
98
|
-
version?: string
|
|
99
|
-
service?: string
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export type ScanUrlRequest = string
|
|
105
|
-
|
|
106
|
-
export interface ScanUrlResponse {
|
|
107
|
-
data: {
|
|
108
|
-
rawResponse: {
|
|
109
|
-
success: boolean
|
|
110
|
-
data: {
|
|
111
|
-
isMalicious: boolean
|
|
112
|
-
deepScanTriggered?: boolean
|
|
113
|
-
}
|
|
114
|
-
error: string | null
|
|
115
|
-
version?: string
|
|
116
|
-
service?: string
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
export interface ScreenAddressResponse {
|
|
122
|
-
address: string
|
|
123
|
-
recommendation: string
|
|
124
|
-
severity: string
|
|
125
|
-
totalIncomingUsd: number
|
|
126
|
-
policyId: string
|
|
127
|
-
timestamp: string
|
|
128
|
-
flags: Flag[]
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
export interface Flag {
|
|
132
|
-
title: string
|
|
133
|
-
flagId: string
|
|
134
|
-
chain: string
|
|
135
|
-
severity: string
|
|
136
|
-
lastUpdate?: string
|
|
137
|
-
events: HypernativeEvent[]
|
|
138
|
-
exposures: Exposure[]
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
export interface HypernativeEvent {
|
|
142
|
-
eventId: string
|
|
143
|
-
address: string
|
|
144
|
-
chain: string
|
|
145
|
-
flagId: string
|
|
146
|
-
timestampEvent: string
|
|
147
|
-
txHash: string
|
|
148
|
-
direction: string
|
|
149
|
-
hop: number
|
|
150
|
-
counterpartyAddress: string
|
|
151
|
-
counterpartyAlias?: string
|
|
152
|
-
counterpartyFlagId: string
|
|
153
|
-
tokenSymbol: string
|
|
154
|
-
tokenAmount: number
|
|
155
|
-
tokenUsdValue: number
|
|
156
|
-
reason: string
|
|
157
|
-
source: string
|
|
158
|
-
originalFlaggedAddress: string
|
|
159
|
-
originalFlaggedAlias?: string
|
|
160
|
-
originalFlaggedChain: string
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
export interface Exposure {
|
|
164
|
-
exposurePortion: number
|
|
165
|
-
exposureType?: string
|
|
166
|
-
totalExposureUsd: number
|
|
167
|
-
flaggedInteractions: FlaggedInteraction[]
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
export interface FlaggedInteraction {
|
|
171
|
-
address: string
|
|
172
|
-
chain: string
|
|
173
|
-
alias?: string
|
|
174
|
-
minHop: number
|
|
175
|
-
totalExposureUsd: number
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
export interface TransactionRiskData {
|
|
179
|
-
assessmentId?: string
|
|
180
|
-
assessmentTimestamp?: string
|
|
181
|
-
recommendation: 'accept' | 'notes' | 'warn' | 'deny' | 'autoAccept'
|
|
182
|
-
expectedStatus?: 'success' | 'fail'
|
|
183
|
-
findings?: Finding[]
|
|
184
|
-
involvedAssets?: Asset[]
|
|
185
|
-
balanceChanges?: Record<string, BalanceChange[]> | null
|
|
186
|
-
parsedActions?: Record<string, unknown[]>
|
|
187
|
-
blockNumber?: number
|
|
188
|
-
riIds?: string[]
|
|
189
|
-
signature?: string
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
export interface TypedMessageRiskData {
|
|
193
|
-
assessmentId?: string
|
|
194
|
-
assessmentTimestamp?: string
|
|
195
|
-
blockNumber?: number
|
|
196
|
-
recommendation: 'accept' | 'notes' | 'warn' | 'deny' | 'autoAccept'
|
|
197
|
-
findings?: Finding[]
|
|
198
|
-
involvedAssets?: Asset[]
|
|
199
|
-
parsedActions?: Record<string, unknown[]>
|
|
200
|
-
riIds?: string[]
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
export interface SolanaTransactionRiskData {
|
|
204
|
-
recommendation: 'accept' | 'notes' | 'warn' | 'deny' | 'autoAccept'
|
|
205
|
-
expectedStatus?: 'success' | 'fail'
|
|
206
|
-
findings?: Finding[]
|
|
207
|
-
involvedAssets?: Asset[]
|
|
208
|
-
balanceChanges?: Record<string, BalanceChange[]> | null
|
|
209
|
-
parsedActions?: Record<string, unknown[]>
|
|
210
|
-
blockNumber?: number
|
|
211
|
-
riIds?: string[]
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
export interface Finding {
|
|
215
|
-
typeId: string
|
|
216
|
-
title: string
|
|
217
|
-
description: string
|
|
218
|
-
details?: string
|
|
219
|
-
severity: 'Accept' | 'Notes' | 'Warn' | 'Deny' | 'AutoAccept'
|
|
220
|
-
relatedAssets?: Asset[]
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
export interface Asset {
|
|
224
|
-
chain: string
|
|
225
|
-
evmChainId?: string
|
|
226
|
-
address: string
|
|
227
|
-
type: 'Wallet' | 'Contract'
|
|
228
|
-
involvementTypes: string[]
|
|
229
|
-
tag: string
|
|
230
|
-
alias?: string
|
|
231
|
-
note?: string
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
export interface BalanceChange {
|
|
235
|
-
changeType: 'send' | 'receive'
|
|
236
|
-
tokenSymbol: string
|
|
237
|
-
tokenAddress?: string
|
|
238
|
-
usdValue?: string
|
|
239
|
-
amount: string
|
|
240
|
-
chain: string
|
|
241
|
-
evmChainId?: string
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
export interface ScanNftRequestItem {
|
|
245
|
-
address: string
|
|
246
|
-
chain?: string
|
|
247
|
-
evmChainId?: number | string
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
export interface ScanNftResponseItem {
|
|
251
|
-
address: string
|
|
252
|
-
chain: string
|
|
253
|
-
evmChainId: string
|
|
254
|
-
accept: boolean
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
export interface ScanTokenRequestItem {
|
|
258
|
-
address: string
|
|
259
|
-
chain?: string
|
|
260
|
-
evmChainId?: number | string
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
export interface ScanTokenResponseItem {
|
|
264
|
-
address: string
|
|
265
|
-
chain: string
|
|
266
|
-
reputation?: {
|
|
267
|
-
recommendation: 'accept' | 'deny'
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
export interface TransactionObject {
|
|
272
|
-
chain: string
|
|
273
|
-
fromAddress: string
|
|
274
|
-
toAddress: string
|
|
275
|
-
input?: string
|
|
276
|
-
value?: string | number
|
|
277
|
-
nonce?: string | number
|
|
278
|
-
hash?: string
|
|
279
|
-
gas?: string | number
|
|
280
|
-
gasPrice?: string | number
|
|
281
|
-
maxPriorityFeePerGas?: string | number
|
|
282
|
-
maxFeePerGas?: string | number
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
export interface Eip712TypeProperty {
|
|
286
|
-
name: string
|
|
287
|
-
type: string
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
export type Eip712Value =
|
|
291
|
-
| string
|
|
292
|
-
| number
|
|
293
|
-
| boolean
|
|
294
|
-
| null
|
|
295
|
-
| undefined
|
|
296
|
-
| Eip712Value[]
|
|
297
|
-
| { [key: string]: Eip712Value }
|
|
298
|
-
|
|
299
|
-
export interface Eip712Domain {
|
|
300
|
-
name?: string
|
|
301
|
-
version?: string
|
|
302
|
-
chainId?: number | string
|
|
303
|
-
verifyingContract?: string
|
|
304
|
-
salt?: string
|
|
305
|
-
[key: string]: Eip712Value
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
export interface Eip712TypedData {
|
|
309
|
-
primaryType: string
|
|
310
|
-
types: Record<string, Eip712TypeProperty[]>
|
|
311
|
-
domain: Eip712Domain
|
|
312
|
-
message: Record<string, Eip712Value>
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
export interface SolanaHeader {
|
|
316
|
-
numRequiredSignatures?: number
|
|
317
|
-
numReadonlySignedAccounts?: number
|
|
318
|
-
numReadonlyUnsignedAccounts?: number
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
export interface SolanaInstruction {
|
|
322
|
-
accounts: number[]
|
|
323
|
-
data: string
|
|
324
|
-
programIdIndex: number
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
export interface AddressTableLookup {
|
|
328
|
-
accountKey: string
|
|
329
|
-
writableIndexes: number[]
|
|
330
|
-
readonlyIndexes: number[]
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
export interface SolanaMessage {
|
|
334
|
-
accountKeys: string[]
|
|
335
|
-
header: SolanaHeader
|
|
336
|
-
instructions: SolanaInstruction[]
|
|
337
|
-
addressTableLookups?: AddressTableLookup[]
|
|
338
|
-
recentBlockhash: string
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
export interface SolanaTransaction {
|
|
342
|
-
message?: SolanaMessage
|
|
343
|
-
signatures?: string[]
|
|
344
|
-
rawTransaction?: string
|
|
345
|
-
version?: 'legacy' | '0'
|
|
346
|
-
}
|
|
11
|
+
export type {
|
|
12
|
+
AddressTableLookup,
|
|
13
|
+
SolanaMessage,
|
|
14
|
+
SolanaTransaction,
|
|
15
|
+
ScanEVMRequest,
|
|
16
|
+
ScanEVMResponse,
|
|
17
|
+
ScanEip712Request,
|
|
18
|
+
ScanEip712Response,
|
|
19
|
+
ScanSolanaRequest,
|
|
20
|
+
ScanSolanaResponse,
|
|
21
|
+
ScanNftsRequest,
|
|
22
|
+
ScanNftsResponse,
|
|
23
|
+
ScanTokensRequest,
|
|
24
|
+
ScanTokensResponse,
|
|
25
|
+
ScanUrlRequest,
|
|
26
|
+
ScanUrlResponse,
|
|
27
|
+
ScreenAddressResponse,
|
|
28
|
+
Flag,
|
|
29
|
+
HypernativeEvent,
|
|
30
|
+
Exposure,
|
|
31
|
+
FlaggedInteraction,
|
|
32
|
+
TransactionRiskData,
|
|
33
|
+
TypedMessageRiskData,
|
|
34
|
+
SolanaTransactionRiskData,
|
|
35
|
+
Finding,
|
|
36
|
+
Asset,
|
|
37
|
+
BalanceChange,
|
|
38
|
+
ScanNftRequestItem,
|
|
39
|
+
ScanNftResponseItem,
|
|
40
|
+
ScanTokenRequestItem,
|
|
41
|
+
ScanTokenResponseItem,
|
|
42
|
+
TransactionObject,
|
|
43
|
+
Eip712TypeProperty,
|
|
44
|
+
Eip712Value,
|
|
45
|
+
Eip712Domain,
|
|
46
|
+
Eip712TypedData,
|
|
47
|
+
SolanaHeader,
|
|
48
|
+
SolanaInstruction,
|
|
49
|
+
} from './src/shared/types'
|