@rabby-wallet/rabby-api 0.6.14-alpha.0 → 0.6.15-alpha.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/README.md CHANGED
@@ -1,25 +1,25 @@
1
- # rabby-api
2
-
3
- ## Install
4
-
5
- ```bash
6
- npm install rabby-api @debank/common
7
- ```
8
-
9
- ## Usage
10
-
11
- ```ts
12
- import { OpenApiService } from 'rabby-api';
13
-
14
- const service = new OpenApiService({
15
- store: {
16
- host: 'https://api.rabby.io'
17
- }
18
- });
19
-
20
- // init service
21
- await service.init();
22
-
23
- // call api
24
- await service.getTotalBalance('0x1234');
25
- ```
1
+ # rabby-api
2
+
3
+ ## Install
4
+
5
+ ```bash
6
+ npm install rabby-api @debank/common
7
+ ```
8
+
9
+ ## Usage
10
+
11
+ ```ts
12
+ import { OpenApiService } from 'rabby-api';
13
+
14
+ const service = new OpenApiService({
15
+ store: {
16
+ host: 'https://api.rabby.io'
17
+ }
18
+ });
19
+
20
+ // init service
21
+ await service.init();
22
+
23
+ // call api
24
+ await service.getTotalBalance('0x1234');
25
+ ```
package/dist/index.d.ts CHANGED
@@ -1,278 +1,282 @@
1
- import { AxiosAdapter } from 'axios';
2
- import { RateLimitedAxiosInstance } from 'axios-rate-limit';
3
- import { ServerChain, TotalBalanceResponse, ChainWithPendingCount, SecurityCheckResponse, Tx, ExplainTxResponse, GasLevel, GetTxResponse, TokenItem, AssetItem, NFTItem, Collection, TxHistoryResult, TokenApproval, NFTApprovalResponse, ApprovalStatus, UsedChain, Protocol, ComplexProtocol, ExplainTypedDataResponse, SwapTradeList, SlippageStatus, CEXQuote, Summary, Cex, ContractCredit, AddrDescResponse, ParseTxResponse, CollectionWithFloorPrice, ParseTypedDataResponse, ParseTextResponse, CollectionList } from './types';
4
- interface OpenApiStore {
5
- host: string;
6
- }
7
- interface Options {
8
- store: OpenApiStore;
9
- adapter?: AxiosAdapter;
10
- }
11
- export declare class OpenApiService {
12
- store: OpenApiStore;
13
- request: RateLimitedAxiosInstance;
14
- setHost: (host: string) => Promise<void>;
15
- getHost: () => string;
16
- ethRpc: ((chainId: string, arg: {
17
- method: string;
18
- params: Array<any>;
19
- origin?: string;
20
- }) => Promise<any>) | (() => Promise<never>);
21
- adapter?: AxiosAdapter;
22
- constructor({ store, adapter }: Options);
23
- init: (hf?: string) => Promise<void>;
24
- private _mountMethods;
25
- getRecommendChains: (address: string, origin: string) => Promise<ServerChain[]>;
26
- getTotalBalance: (address: string) => Promise<TotalBalanceResponse>;
27
- getPendingCount: (address: string) => Promise<{
28
- total_count: number;
29
- chains: ChainWithPendingCount[];
30
- }>;
31
- checkOrigin: (address: string, origin: string) => Promise<SecurityCheckResponse>;
32
- checkText: (address: string, origin: string, text: string) => Promise<SecurityCheckResponse>;
33
- checkTx: (tx: Tx, origin: string, address: string, update_nonce?: boolean) => Promise<SecurityCheckResponse>;
34
- preExecTx: ({ tx, origin, address, updateNonce, pending_tx_list, }: {
35
- tx: Tx;
36
- origin: string;
37
- address: string;
38
- updateNonce: boolean;
39
- pending_tx_list: Tx[];
40
- }) => Promise<ExplainTxResponse>;
41
- historyGasUsed: (params: {
42
- tx: Tx;
43
- user_addr: string;
44
- }) => Promise<{
45
- gas_used: number;
46
- }>;
47
- pendingTxList: (tx: Tx, origin: string, address: string, update_nonce?: boolean) => Promise<Tx[]>;
48
- traceTx: (txId: string, traceId: string, chainId: string) => Promise<void>;
49
- pushTx: (tx: Tx, traceId?: string) => Promise<any>;
50
- explainText: (origin: string, address: string, text: string) => Promise<{
51
- comment: string;
52
- }>;
53
- gasMarket: (chainId: string, customGas?: number) => Promise<GasLevel[]>;
54
- getTx: (chainId: string, hash: string, gasPrice: number) => Promise<GetTxResponse>;
55
- getEnsAddressByName: (name: string) => Promise<{
56
- addr: string;
57
- name: string;
58
- }>;
59
- searchToken: (id: string, q: string, chainId?: string, is_all?: boolean) => Promise<TokenItem[]>;
60
- searchSwapToken: (id: string, chainId: string, q: string, is_all?: boolean) => Promise<any>;
61
- getToken: (id: string, chainId: string, tokenId: string) => Promise<TokenItem>;
62
- getCachedTokenList: (id: string) => Promise<TokenItem[]>;
63
- listToken: (id: string, chainId?: string, isAll?: boolean) => Promise<TokenItem[]>;
64
- getHistoryTokenList: (params: {
65
- id: string;
66
- chainId?: string;
67
- timeAt?: number;
68
- dateAt?: string;
69
- }) => Promise<TokenItem[]>;
70
- customListToken: (uuids: string[], id: string) => Promise<TokenItem[]>;
71
- listChainAssets: (id: string) => Promise<AssetItem[]>;
72
- listNFT: (id: string, isAll?: boolean) => Promise<NFTItem[]>;
73
- listCollection: (params: {
74
- collection_ids: string;
75
- }) => Promise<Collection[]>;
76
- listTxHisotry: (params: {
77
- id?: string;
78
- chain_id?: string;
79
- token_id?: string;
80
- coin_id?: string;
81
- start_time?: number;
82
- page_count?: number;
83
- }) => Promise<TxHistoryResult>;
84
- tokenPrice: (tokenName: string) => Promise<{
85
- change_percent: number;
86
- last_price: number;
87
- }>;
88
- tokenAuthorizedList: (id: string, chain_id: string) => Promise<TokenApproval[]>;
89
- userNFTAuthorizedList: (id: string, chain_id: string) => Promise<NFTApprovalResponse>;
90
- getDEXList: (chain_id: string) => Promise<{
91
- id: string;
92
- name: string;
93
- logo_url: string;
94
- site_url: string;
95
- type: string;
96
- }[]>;
97
- getSwapQuote: (params: {
98
- id: string;
99
- chain_id: string;
100
- dex_id: string;
101
- pay_token_id: string;
102
- pay_token_raw_amount: string;
103
- receive_token_id: string;
104
- }) => Promise<{
105
- receive_token_raw_amount: number;
106
- dex_approve_to: string;
107
- dex_swap_to: string;
108
- dex_swap_calldata: string;
109
- is_wrapped: boolean;
110
- gas: {
111
- gas_used: number;
112
- gas_price: number;
113
- gas_cost_value: number;
114
- gas_cost_usd_value: number;
115
- };
116
- pay_token: TokenItem;
117
- receive_token: TokenItem;
118
- }>;
119
- getSwapTokenList: (id: string, chainId?: string) => Promise<TokenItem[]>;
120
- postGasStationOrder: (params: {
121
- userAddr: string;
122
- fromChainId: string;
123
- fromTxId: string;
124
- toChainId: string;
125
- toTokenAmount: string;
126
- fromTokenId: string;
127
- fromTokenAmount: string;
128
- fromUsdValue: number;
129
- }) => Promise<any>;
130
- getGasStationChainBalance: (chain_id: string, addr: string) => Promise<{
131
- usd_value: number;
132
- }>;
133
- getGasStationTokenList: () => Promise<TokenItem[]>;
134
- explainTypedData: (user_addr: string, origin: string, data: any) => Promise<ExplainTypedDataResponse>;
135
- checkTypedData: (user_addr: string, origin: string, data: any) => Promise<SecurityCheckResponse>;
136
- approvalStatus: (id: string) => Promise<ApprovalStatus[]>;
137
- usedChainList: (id: string) => Promise<UsedChain[]>;
138
- getLatestVersion: () => Promise<{
139
- version_tag: string;
140
- }>;
141
- addOriginFeedback: (params: {
142
- user_addr: string;
143
- origin: string;
144
- is_safe: boolean;
145
- }) => Promise<{
146
- is_success: boolean;
147
- }>;
148
- getProtocolList: (addr: string) => Promise<Protocol[]>;
149
- getComplexProtocolList: (addr: string) => Promise<ComplexProtocol[]>;
150
- getProtocol: ({ addr, id, }: {
151
- addr: string;
152
- id: string;
153
- }) => Promise<ComplexProtocol>;
154
- getHistoryProtocol: ({ addr, id, timeAt, dateAt, }: {
155
- addr: string;
156
- id: string;
157
- timeAt?: number | undefined;
158
- dateAt?: number | undefined;
159
- }) => Promise<ComplexProtocol>;
160
- getTokenHistoryPrice: ({ chainId, id, timeAt, }: {
161
- chainId: string;
162
- id: string;
163
- timeAt: number;
164
- }) => Promise<{
165
- price: number;
166
- }>;
167
- getTokenHistoryDict: ({ chainId, ids, timeAt, }: {
168
- chainId: string;
169
- ids: string;
170
- timeAt: number;
171
- }) => Promise<Record<string, number>>;
172
- getNetCurve: (addr: string) => Promise<{
173
- timestamp: number;
174
- usd_value: number;
175
- }[]>;
176
- getChainList: () => Promise<ServerChain[]>;
177
- getCEXSwapQuote: (params: {
178
- cex_id: string;
179
- pay_token_id: string;
180
- pay_token_amount: string;
181
- receive_token_id: string;
182
- chain_id: string;
183
- }) => Promise<CEXQuote>;
184
- getSwapTradeList: (params: {
185
- user_addr: string;
186
- start: string;
187
- limit: string;
188
- }) => Promise<SwapTradeList>;
189
- postSwap: (params: {
190
- quote: {
191
- pay_token_id: string;
192
- pay_token_amount: number;
193
- receive_token_id: string;
194
- receive_token_amount: number;
195
- slippage: number;
196
- };
197
- dex_id: string;
198
- tx_id: string;
199
- tx: Tx;
200
- }) => Promise<any>;
201
- checkSlippage: (params: {
202
- chain_id: string;
203
- slippage: string;
204
- from_token_id: string;
205
- to_token_id: string;
206
- }) => Promise<SlippageStatus>;
207
- getOriginPopularityLevel: (origin: string) => Promise<{
208
- level: 'very_low' | 'low' | 'medium' | 'high';
209
- }>;
210
- getOriginIsScam: (origin: string, source: string) => Promise<{
211
- is_scam: boolean;
212
- }>;
213
- getOriginThirdPartyCollectList: (origin: string) => Promise<{
214
- collect_list: {
215
- name: string;
216
- logo_url: string;
217
- }[];
218
- }>;
219
- getSummarizedAssetList: (id: string, chain_id?: string) => Promise<Summary>;
220
- parseTx: ({ chainId, tx, origin, addr, }: {
221
- chainId: string;
222
- tx: Tx;
223
- origin: string;
224
- addr: string;
225
- }) => Promise<ParseTxResponse>;
226
- isSuspiciousToken: (id: string, chainId: string) => Promise<{
227
- is_suspicious: boolean;
228
- }>;
229
- depositCexSupport: (id: string, chainId: string, cexId: string) => Promise<{
230
- support: boolean;
231
- }>;
232
- depositCexList: (id: string, chainId: string) => Promise<{
233
- cex_list: Cex[];
234
- }>;
235
- getContractCredit: (id: string, chainId: string) => Promise<ContractCredit>;
236
- hasInteraction: (addr: string, chainId: string, contractId: string) => Promise<{
237
- has_interaction: boolean;
238
- }>;
239
- tokenApproveExposure: (id: string, chainId: string) => Promise<{
240
- usd_value: number;
241
- }>;
242
- addrDesc: (id: string) => Promise<AddrDescResponse>;
243
- hasTransfer: (chainId: string, from: string, to: string) => Promise<{
244
- has_transfer: boolean;
245
- }>;
246
- isTokenContract: (chainId: string, id: string) => Promise<{
247
- is_token: boolean;
248
- }>;
249
- addrUsedChainList: (id: string) => Promise<UsedChain[]>;
250
- getTokenNFTExposure: (chainId: string, id: string) => Promise<{
251
- usd_value: number;
252
- }>;
253
- getCollection: (chainId: string, id: string) => Promise<{
254
- collection: CollectionWithFloorPrice;
255
- }>;
256
- isSuspiciousCollection: (chainId: string, id: string) => Promise<{
257
- is_suspicious: boolean;
258
- }>;
259
- isOriginVerified: (origin: string) => Promise<{
260
- is_verified: boolean | null;
261
- }>;
262
- parseTypedData: ({ typedData, origin, address, }: {
263
- typedData: Record<string, any>;
264
- origin: string;
265
- address: string;
266
- }) => Promise<ParseTypedDataResponse>;
267
- parseText: ({ text, origin, address, }: {
268
- text: string;
269
- origin: string;
270
- address: string;
271
- }) => Promise<ParseTextResponse>;
272
- collectionList: ({ id, chainId, isAll, }: {
273
- id: string;
274
- chainId?: string | undefined;
275
- isAll: boolean;
276
- }) => Promise<CollectionList[]>;
277
- }
278
- export {};
1
+ import { AxiosAdapter } from 'axios';
2
+ import { RateLimitedAxiosInstance } from 'axios-rate-limit';
3
+ import { ServerChain, TotalBalanceResponse, ChainWithPendingCount, SecurityCheckResponse, Tx, ExplainTxResponse, GasLevel, GetTxResponse, TokenItem, AssetItem, NFTItem, Collection, TxHistoryResult, TokenApproval, NFTApprovalResponse, ApprovalStatus, UsedChain, Protocol, ComplexProtocol, ExplainTypedDataResponse, SwapTradeList, SlippageStatus, CEXQuote, Summary, Cex, ContractCredit, AddrDescResponse, ParseTxResponse, CollectionWithFloorPrice, ParseTypedDataResponse, ParseTextResponse, CollectionList } from './types';
4
+ interface OpenApiStore {
5
+ host: string;
6
+ testnetHost?: string;
7
+ }
8
+ interface Options {
9
+ store: OpenApiStore;
10
+ adapter?: AxiosAdapter;
11
+ }
12
+ export declare class OpenApiService {
13
+ store: OpenApiStore;
14
+ request: RateLimitedAxiosInstance;
15
+ setHost: (host: string) => Promise<void>;
16
+ getHost: () => string;
17
+ setTestnetHost: (host: string) => Promise<void>;
18
+ getTestnetHost: () => string | undefined;
19
+ ethRpc: ((chainId: string, arg: {
20
+ method: string;
21
+ params: Array<any>;
22
+ origin?: string;
23
+ }) => Promise<any>) | (() => Promise<never>);
24
+ adapter?: AxiosAdapter;
25
+ constructor({ store, adapter }: Options);
26
+ init: (hf?: string) => Promise<void>;
27
+ private _getRequestOptions;
28
+ private _mountMethods;
29
+ getRecommendChains: (address: string, origin: string) => Promise<ServerChain[]>;
30
+ getTotalBalance: (address: string) => Promise<TotalBalanceResponse>;
31
+ getPendingCount: (address: string) => Promise<{
32
+ total_count: number;
33
+ chains: ChainWithPendingCount[];
34
+ }>;
35
+ checkOrigin: (address: string, origin: string) => Promise<SecurityCheckResponse>;
36
+ checkText: (address: string, origin: string, text: string) => Promise<SecurityCheckResponse>;
37
+ checkTx: (tx: Tx, origin: string, address: string, update_nonce?: boolean) => Promise<SecurityCheckResponse>;
38
+ preExecTx: ({ tx, origin, address, updateNonce, pending_tx_list, }: {
39
+ tx: Tx;
40
+ origin: string;
41
+ address: string;
42
+ updateNonce: boolean;
43
+ pending_tx_list: Tx[];
44
+ }) => Promise<ExplainTxResponse>;
45
+ historyGasUsed: (params: {
46
+ tx: Tx;
47
+ user_addr: string;
48
+ }) => Promise<{
49
+ gas_used: number;
50
+ }>;
51
+ pendingTxList: (tx: Tx, origin: string, address: string, update_nonce?: boolean) => Promise<Tx[]>;
52
+ traceTx: (txId: string, traceId: string, chainId: string) => Promise<void>;
53
+ pushTx: (tx: Tx, traceId?: string) => Promise<any>;
54
+ explainText: (origin: string, address: string, text: string) => Promise<{
55
+ comment: string;
56
+ }>;
57
+ gasMarket: (chainId: string, customGas?: number) => Promise<GasLevel[]>;
58
+ getTx: (chainId: string, hash: string, gasPrice: number) => Promise<GetTxResponse>;
59
+ getEnsAddressByName: (name: string) => Promise<{
60
+ addr: string;
61
+ name: string;
62
+ }>;
63
+ searchToken: (id: string, q: string, chainId?: string, is_all?: boolean) => Promise<TokenItem[]>;
64
+ searchSwapToken: (id: string, chainId: string, q: string, is_all?: boolean) => Promise<any>;
65
+ getToken: (id: string, chainId: string, tokenId: string) => Promise<TokenItem>;
66
+ getCachedTokenList: (id: string) => Promise<TokenItem[]>;
67
+ listToken: (id: string, chainId?: string, isAll?: boolean) => Promise<TokenItem[]>;
68
+ getHistoryTokenList: (params: {
69
+ id: string;
70
+ chainId?: string;
71
+ timeAt?: number;
72
+ dateAt?: string;
73
+ }) => Promise<TokenItem[]>;
74
+ customListToken: (uuids: string[], id: string) => Promise<TokenItem[]>;
75
+ listChainAssets: (id: string) => Promise<AssetItem[]>;
76
+ listNFT: (id: string, isAll?: boolean) => Promise<NFTItem[]>;
77
+ listCollection: (params: {
78
+ collection_ids: string;
79
+ }) => Promise<Collection[]>;
80
+ listTxHisotry: (params: {
81
+ id?: string;
82
+ chain_id?: string;
83
+ token_id?: string;
84
+ coin_id?: string;
85
+ start_time?: number;
86
+ page_count?: number;
87
+ }) => Promise<TxHistoryResult>;
88
+ tokenPrice: (tokenName: string) => Promise<{
89
+ change_percent: number;
90
+ last_price: number;
91
+ }>;
92
+ tokenAuthorizedList: (id: string, chain_id: string) => Promise<TokenApproval[]>;
93
+ userNFTAuthorizedList: (id: string, chain_id: string) => Promise<NFTApprovalResponse>;
94
+ getDEXList: (chain_id: string) => Promise<{
95
+ id: string;
96
+ name: string;
97
+ logo_url: string;
98
+ site_url: string;
99
+ type: string;
100
+ }[]>;
101
+ getSwapQuote: (params: {
102
+ id: string;
103
+ chain_id: string;
104
+ dex_id: string;
105
+ pay_token_id: string;
106
+ pay_token_raw_amount: string;
107
+ receive_token_id: string;
108
+ }) => Promise<{
109
+ receive_token_raw_amount: number;
110
+ dex_approve_to: string;
111
+ dex_swap_to: string;
112
+ dex_swap_calldata: string;
113
+ is_wrapped: boolean;
114
+ gas: {
115
+ gas_used: number;
116
+ gas_price: number;
117
+ gas_cost_value: number;
118
+ gas_cost_usd_value: number;
119
+ };
120
+ pay_token: TokenItem;
121
+ receive_token: TokenItem;
122
+ }>;
123
+ getSwapTokenList: (id: string, chainId?: string) => Promise<TokenItem[]>;
124
+ postGasStationOrder: (params: {
125
+ userAddr: string;
126
+ fromChainId: string;
127
+ fromTxId: string;
128
+ toChainId: string;
129
+ toTokenAmount: string;
130
+ fromTokenId: string;
131
+ fromTokenAmount: string;
132
+ fromUsdValue: number;
133
+ }) => Promise<any>;
134
+ getGasStationChainBalance: (chain_id: string, addr: string) => Promise<{
135
+ usd_value: number;
136
+ }>;
137
+ getGasStationTokenList: () => Promise<TokenItem[]>;
138
+ explainTypedData: (user_addr: string, origin: string, data: any) => Promise<ExplainTypedDataResponse>;
139
+ checkTypedData: (user_addr: string, origin: string, data: any) => Promise<SecurityCheckResponse>;
140
+ approvalStatus: (id: string) => Promise<ApprovalStatus[]>;
141
+ usedChainList: (id: string) => Promise<UsedChain[]>;
142
+ getLatestVersion: () => Promise<{
143
+ version_tag: string;
144
+ }>;
145
+ addOriginFeedback: (params: {
146
+ user_addr: string;
147
+ origin: string;
148
+ is_safe: boolean;
149
+ }) => Promise<{
150
+ is_success: boolean;
151
+ }>;
152
+ getProtocolList: (addr: string) => Promise<Protocol[]>;
153
+ getComplexProtocolList: (addr: string) => Promise<ComplexProtocol[]>;
154
+ getProtocol: ({ addr, id, }: {
155
+ addr: string;
156
+ id: string;
157
+ }) => Promise<ComplexProtocol>;
158
+ getHistoryProtocol: ({ addr, id, timeAt, dateAt, }: {
159
+ addr: string;
160
+ id: string;
161
+ timeAt?: number | undefined;
162
+ dateAt?: number | undefined;
163
+ }) => Promise<ComplexProtocol>;
164
+ getTokenHistoryPrice: ({ chainId, id, timeAt, }: {
165
+ chainId: string;
166
+ id: string;
167
+ timeAt: number;
168
+ }) => Promise<{
169
+ price: number;
170
+ }>;
171
+ getTokenHistoryDict: ({ chainId, ids, timeAt, }: {
172
+ chainId: string;
173
+ ids: string;
174
+ timeAt: number;
175
+ }) => Promise<Record<string, number>>;
176
+ getNetCurve: (addr: string) => Promise<{
177
+ timestamp: number;
178
+ usd_value: number;
179
+ }[]>;
180
+ getChainList: () => Promise<ServerChain[]>;
181
+ getCEXSwapQuote: (params: {
182
+ cex_id: string;
183
+ pay_token_id: string;
184
+ pay_token_amount: string;
185
+ receive_token_id: string;
186
+ chain_id: string;
187
+ }) => Promise<CEXQuote>;
188
+ getSwapTradeList: (params: {
189
+ user_addr: string;
190
+ start: string;
191
+ limit: string;
192
+ }) => Promise<SwapTradeList>;
193
+ postSwap: (params: {
194
+ quote: {
195
+ pay_token_id: string;
196
+ pay_token_amount: number;
197
+ receive_token_id: string;
198
+ receive_token_amount: number;
199
+ slippage: number;
200
+ };
201
+ dex_id: string;
202
+ tx_id: string;
203
+ tx: Tx;
204
+ }) => Promise<any>;
205
+ checkSlippage: (params: {
206
+ chain_id: string;
207
+ slippage: string;
208
+ from_token_id: string;
209
+ to_token_id: string;
210
+ }) => Promise<SlippageStatus>;
211
+ getOriginPopularityLevel: (origin: string) => Promise<{
212
+ level: 'very_low' | 'low' | 'medium' | 'high';
213
+ }>;
214
+ getOriginIsScam: (origin: string, source: string) => Promise<{
215
+ is_scam: boolean;
216
+ }>;
217
+ getOriginThirdPartyCollectList: (origin: string) => Promise<{
218
+ collect_list: {
219
+ name: string;
220
+ logo_url: string;
221
+ }[];
222
+ }>;
223
+ getSummarizedAssetList: (id: string, chain_id?: string) => Promise<Summary>;
224
+ parseTx: ({ chainId, tx, origin, addr, }: {
225
+ chainId: string;
226
+ tx: Tx;
227
+ origin: string;
228
+ addr: string;
229
+ }) => Promise<ParseTxResponse>;
230
+ isSuspiciousToken: (id: string, chainId: string) => Promise<{
231
+ is_suspicious: boolean;
232
+ }>;
233
+ depositCexSupport: (id: string, chainId: string, cexId: string) => Promise<{
234
+ support: boolean;
235
+ }>;
236
+ depositCexList: (id: string, chainId: string) => Promise<{
237
+ cex_list: Cex[];
238
+ }>;
239
+ getContractCredit: (id: string, chainId: string) => Promise<ContractCredit>;
240
+ hasInteraction: (addr: string, chainId: string, contractId: string) => Promise<{
241
+ has_interaction: boolean;
242
+ }>;
243
+ tokenApproveExposure: (id: string, chainId: string) => Promise<{
244
+ usd_value: number;
245
+ }>;
246
+ addrDesc: (id: string) => Promise<AddrDescResponse>;
247
+ hasTransfer: (chainId: string, from: string, to: string) => Promise<{
248
+ has_transfer: boolean;
249
+ }>;
250
+ isTokenContract: (chainId: string, id: string) => Promise<{
251
+ is_token: boolean;
252
+ }>;
253
+ addrUsedChainList: (id: string) => Promise<UsedChain[]>;
254
+ getTokenNFTExposure: (chainId: string, id: string) => Promise<{
255
+ usd_value: number;
256
+ }>;
257
+ getCollection: (chainId: string, id: string) => Promise<{
258
+ collection: CollectionWithFloorPrice;
259
+ }>;
260
+ isSuspiciousCollection: (chainId: string, id: string) => Promise<{
261
+ is_suspicious: boolean;
262
+ }>;
263
+ isOriginVerified: (origin: string) => Promise<{
264
+ is_verified: boolean | null;
265
+ }>;
266
+ parseTypedData: ({ typedData, origin, address, }: {
267
+ typedData: Record<string, any>;
268
+ origin: string;
269
+ address: string;
270
+ }) => Promise<ParseTypedDataResponse>;
271
+ parseText: ({ text, origin, address, }: {
272
+ text: string;
273
+ origin: string;
274
+ address: string;
275
+ }) => Promise<ParseTextResponse>;
276
+ collectionList: ({ id, chainId, isAll, }: {
277
+ id: string;
278
+ chainId?: string | undefined;
279
+ isAll: boolean;
280
+ }) => Promise<CollectionList[]>;
281
+ }
282
+ export {};