@rabby-wallet/rabby-api 0.9.55-beta.1 → 0.9.55-beta.7

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/types.d.ts CHANGED
@@ -1,2588 +1,2610 @@
1
- import { CHAINS_ENUM } from '@debank/common';
2
- export interface Chain {
3
- id: number;
4
- name: string;
5
- hex: string;
6
- logo: string;
7
- enum: CHAINS_ENUM;
8
- serverId: string;
9
- network: string;
10
- nativeTokenSymbol: string;
11
- whiteLogo?: string;
12
- nativeTokenLogo: string;
13
- nativeTokenAddress: string;
14
- scanLink: string;
15
- nativeTokenDecimals: number;
16
- selectChainLogo?: string;
17
- eip: Record<string, boolean>;
18
- }
19
- export interface ServerChain {
20
- id: string;
21
- community_id: number;
22
- name: string;
23
- native_token_id: string;
24
- logo_url: string;
25
- wrapped_token_id: string;
26
- symbol: string;
27
- is_support_history: boolean;
28
- born_at: number | null;
29
- }
30
- export interface ChainWithBalance extends ServerChain {
31
- usd_value: number;
32
- }
33
- export interface ChainWithPendingCount extends ServerChain {
34
- pending_tx_count: number;
35
- }
36
- export declare type SecurityCheckDecision = 'pass' | 'warning' | 'danger' | 'forbidden' | 'loading' | 'pending';
37
- export interface SecurityCheckItem {
38
- alert: string;
39
- description: string;
40
- is_alert: boolean;
41
- decision: SecurityCheckDecision;
42
- id: number;
43
- }
44
- export interface SecurityCheckResponse {
45
- decision: SecurityCheckDecision;
46
- alert: string;
47
- danger_list: SecurityCheckItem[];
48
- warning_list: SecurityCheckItem[];
49
- forbidden_list: SecurityCheckItem[];
50
- forbidden_count: number;
51
- warning_count: number;
52
- danger_count: number;
53
- alert_count: number;
54
- trace_id: string;
55
- error?: {
56
- code: number;
57
- msg: string;
58
- } | null;
59
- }
60
- export interface Tx {
61
- chainId: number;
62
- data: string;
63
- from: string;
64
- gas?: string;
65
- gasLimit?: string;
66
- maxFeePerGas?: string;
67
- maxPriorityFeePerGas?: string;
68
- gasPrice?: string;
69
- nonce: string;
70
- to: string;
71
- value: string;
72
- r?: string;
73
- s?: string;
74
- v?: string;
75
- }
76
- export interface CopyTradeTokenItem extends TokenItem {
77
- fdv: number | null;
78
- buy_amount_24h: number;
79
- buy_usd_value_24h: number;
80
- price_curve_24h: {
81
- time_at: number;
82
- price: number;
83
- }[];
84
- create_at: number;
85
- }
86
- export interface CopyTradeTokenListResponse {
87
- token_list: CopyTradeTokenItem[];
88
- }
89
- export interface CopyTradeTokenItemV2 extends CopyTradeTokenItem {
90
- buy_address_count: number;
91
- token_create_at: number;
92
- liquidity: number;
93
- buy_amount: number;
94
- buy_usd_value: number;
95
- pnl_usd_value: number;
96
- price_change: number;
97
- }
98
- export interface CopyTradeTokenListV2Response {
99
- token_list: CopyTradeTokenItemV2[];
100
- pagination: {
101
- limit: number;
102
- has_next: boolean;
103
- next_cursor: string;
104
- };
105
- }
106
- export interface CopyTradeSameToken extends TokenItem {
107
- liquidity: number;
108
- }
109
- export interface CopyTradeRecentBuyItem {
110
- id: string;
111
- user_addr: string;
112
- user_addr_pnl: {
113
- id: string;
114
- profit_usd_value: number;
115
- };
116
- chain_id: string;
117
- token_id: string;
118
- token_amount: number;
119
- action: string;
120
- buy_usd_value: number;
121
- create_at: number;
122
- }
123
- export interface CopyTradeRecentBuyListResponse {
124
- recent_buy_list: CopyTradeRecentBuyItem[];
125
- total: number;
126
- }
127
- export interface CopyTradeRecentBuyItemV2 {
128
- user_addr: string;
129
- current_balance: number;
130
- buy_usd_value: number;
131
- buy_amount: number;
132
- buy_price: number;
133
- sell_usd_value: number;
134
- sell_amount: number;
135
- sell_price: number;
136
- pnl_usd_value: number;
137
- realized_pnl_usd_value: number;
138
- unrealized_pnl_usd_value: number;
139
- last_buy_at: string;
140
- }
141
- export interface CopyTradeRecentBuyListV2Response {
142
- recent_buy_list: CopyTradeRecentBuyItemV2[];
143
- pagination: {
144
- limit: number;
145
- has_next: boolean;
146
- next_cursor: string;
147
- };
148
- }
149
- export interface CopyTradePnlItem extends TokenItem {
150
- profit_usd_value: number;
151
- protocol_id?: string;
152
- }
153
- export interface CopyTradePnlListResponse {
154
- pnl_list: CopyTradePnlItem[];
155
- }
156
- export interface Eip1559Tx {
157
- chainId: number;
158
- data: string;
159
- from: string;
160
- gas: string;
161
- maxFeePerGas: string;
162
- maxPriorityFeePerGas: string;
163
- nonce: string;
164
- to: string;
165
- value: string;
166
- r?: string;
167
- s?: string;
168
- v?: string;
169
- }
170
- export interface TotalBalanceResponse {
171
- total_usd_value: number;
172
- chain_list: ChainWithBalance[];
173
- error_code?: number;
174
- err_chain_ids?: string[];
175
- }
176
- export interface TokenEntityDetail {
177
- id: string;
178
- chain: string;
179
- token_id: string;
180
- symbol: string;
181
- domain_id: string;
182
- fdv: number;
183
- is_domain_verified: boolean;
184
- relate_domain_ids: string[];
185
- cmc_id: string;
186
- coingecko_id: string;
187
- bridge_ids: string[];
188
- origin_token?: TokenItem;
189
- tag_ids?: string[];
190
- listed_sites: {
191
- name: string;
192
- url: string;
193
- logo_url: string;
194
- }[];
195
- cex_list: {
196
- id: string;
197
- site_url: string;
198
- name: string;
199
- logo_url: string;
200
- }[];
201
- }
202
- export interface TokenItem {
203
- content_type?: 'image' | 'image_url' | 'video_url' | 'audio_url' | undefined;
204
- content?: string | undefined;
205
- inner_id?: any;
206
- amount: number;
207
- chain: string;
208
- decimals: number;
209
- display_symbol: string | null;
210
- id: string;
211
- is_core: boolean | null;
212
- credit_score?: number;
213
- is_verified: boolean | null;
214
- is_wallet: boolean;
215
- is_scam?: boolean;
216
- is_infinity?: boolean;
217
- is_suspicious?: boolean;
218
- logo_url: string;
219
- name: string;
220
- optimized_symbol: string;
221
- price: number;
222
- symbol: string;
223
- time_at: number;
224
- usd_value?: number;
225
- raw_amount?: string;
226
- raw_amount_hex_str?: string;
227
- protocol_id?: string;
228
- price_24h_change?: number | null;
229
- low_credit_score?: boolean;
230
- cex_ids?: string[];
231
- fdv?: number | null;
232
- support_market_data?: boolean;
233
- }
234
- export interface TokenItemWithEntity extends TokenItem {
235
- identity?: TokenEntityDetail;
236
- }
237
- export interface TransferingNFTItem {
238
- chain: string;
239
- collection: {
240
- id: string;
241
- name: string;
242
- create_at: number;
243
- chains: string[];
244
- is_suspicious?: boolean;
245
- is_verified?: boolean;
246
- floor_price?: number | null;
247
- };
248
- content: string;
249
- content_type: NFTItem['content_type'];
250
- contract_id: string;
251
- description: string | null;
252
- detail_url: string;
253
- id: string;
254
- inner_id: string;
255
- name: string;
256
- total_supply: number;
257
- amount: number;
258
- }
259
- export interface NFTApprovalResponse {
260
- tokens: NFTApproval[];
261
- contracts: NFTApprovalContract[];
262
- total: string;
263
- }
264
- export interface NFTApprovalContract {
265
- chain: string;
266
- contract_name: string;
267
- contract_id: string;
268
- amount: string;
269
- spender: Spender;
270
- is_erc721: boolean;
271
- is_erc1155: boolean;
272
- }
273
- export interface NFTApprovalSpender {
274
- id: string;
275
- protocol: {
276
- id: string;
277
- name: string;
278
- logo_url: string;
279
- chain: string;
280
- } | null;
281
- }
282
- export interface NFTApproval {
283
- id: string;
284
- contract_id: string;
285
- inner_id: string;
286
- chain: string;
287
- name: null;
288
- symbol: string;
289
- description: null;
290
- content_type: 'image' | 'image_url' | 'video_url' | 'audio_url' | undefined;
291
- content: string;
292
- total_supply: number;
293
- detail_url: string;
294
- contract_name: string;
295
- is_erc721: boolean;
296
- is_erc1155: boolean;
297
- amount: string;
298
- spender: Spender;
299
- }
300
- export interface TokenApproval<SpenderType extends Spender = Spender> {
301
- id: string;
302
- name: string;
303
- symbol: string;
304
- logo_url: string;
305
- chain: string;
306
- price: number;
307
- balance: number;
308
- spenders: SpenderType[];
309
- sum_exposure_usd: number;
310
- /** @deprecated */
311
- exposure_balance?: number;
312
- }
313
- export interface Spender {
314
- id: string;
315
- permit2_id?: string;
316
- value: number;
317
- exposure_usd: number;
318
- protocol: {
319
- id: string;
320
- name: string;
321
- logo_url: string;
322
- chain: string;
323
- };
324
- /** @deprecated */
325
- is_contract?: boolean;
326
- /** @deprecated */
327
- is_open_source?: boolean;
328
- /** @deprecated */
329
- is_hacked?: boolean;
330
- /** @deprecated */
331
- is_abandoned?: boolean;
332
- risk_alert: string;
333
- risk_level: string;
334
- exposure_nft_usd_value?: number | null;
335
- exposure_usd_value?: number | null;
336
- spend_usd_value?: number | null;
337
- approve_user_count?: number | null;
338
- revoke_user_count?: number | null;
339
- last_approve_at: number | null;
340
- }
341
- export interface AssetItem {
342
- id: string;
343
- chain: string;
344
- name: string;
345
- site_url: string;
346
- logo_url: string;
347
- has_supported_portfolio: boolean;
348
- tvl: number;
349
- net_usd_value: number;
350
- asset_usd_value: number;
351
- debt_usd_value: number;
352
- }
353
- export interface NFTCollection {
354
- create_at: string;
355
- id: string;
356
- is_core: boolean;
357
- name: string;
358
- price: number;
359
- chain: string;
360
- tokens: NFTItem[];
361
- floor_price: number;
362
- is_scam: boolean;
363
- is_suspicious: boolean;
364
- is_verified: boolean;
365
- }
366
- export interface UserCollection {
367
- collection: Collection;
368
- list: NFTItem[];
369
- }
370
- export interface NFTItem {
371
- chain: string;
372
- id: string;
373
- contract_id: string;
374
- inner_id: string;
375
- token_id?: string;
376
- name: string;
377
- contract_name: string;
378
- description: string;
379
- usd_price?: number;
380
- amount: number;
381
- collection_id?: string;
382
- collection_name?: string;
383
- is_core?: boolean;
384
- pay_token?: {
385
- id: string;
386
- name: string;
387
- symbol: string;
388
- amount: number;
389
- logo_url: string;
390
- time_at: number;
391
- date_at?: string;
392
- price?: number;
393
- };
394
- content_type: 'image' | 'image_url' | 'video_url' | 'audio_url';
395
- content: string;
396
- detail_url: string;
397
- total_supply?: string;
398
- collection?: Collection | null;
399
- is_erc1155?: boolean;
400
- is_erc721: boolean;
401
- thumbnail_url?: string;
402
- }
403
- export interface Collection {
404
- id: string;
405
- name: string;
406
- description: null | string;
407
- logo_url: string;
408
- is_core: boolean;
409
- is_suspicious?: boolean;
410
- is_verified?: boolean;
411
- contract_uuids: string[];
412
- create_at: number;
413
- floor_price: number;
414
- is_scam: boolean;
415
- opensea_floor_price?: {
416
- price: number;
417
- token: {
418
- id: string;
419
- symbol: string;
420
- decimals: number;
421
- price: number;
422
- };
423
- };
424
- is_tradable?: boolean;
425
- is_erc721?: boolean;
426
- is_erc1155?: boolean;
427
- }
428
- export interface CollectionList {
429
- id: string;
430
- chain: string;
431
- name: string;
432
- description: string;
433
- logo_url: string;
434
- is_verified: boolean;
435
- credit_score: number;
436
- receive_addr_count: number;
437
- is_scam: boolean;
438
- is_suspicious: boolean;
439
- is_core: boolean;
440
- floor_price: number;
441
- nft_list: NFTItem[];
442
- native_token: TokenItem;
443
- is_hidden?: boolean;
444
- is_tradable?: boolean;
445
- }
446
- export interface TxDisplayItem extends TxHistoryItem {
447
- projectDict: TxHistoryResult['project_dict'];
448
- cateDict: TxHistoryResult['cate_dict'];
449
- tokenDict: TxHistoryResult['token_dict'];
450
- }
451
- export interface TxHistoryItem {
452
- cate_id: string | null;
453
- chain: string;
454
- debt_liquidated: null;
455
- id: string;
456
- is_scam: boolean;
457
- other_addr: string;
458
- project_id: null | string;
459
- receives: {
460
- amount: number;
461
- from_addr: string;
462
- token_id: string;
463
- price?: number;
464
- }[];
465
- sends: {
466
- amount: number;
467
- to_addr: string;
468
- token_id: string;
469
- price?: number;
470
- }[];
471
- time_at: number;
472
- token_approve: {
473
- spender: string;
474
- token_id: string;
475
- value: number;
476
- price?: number;
477
- } | null;
478
- tx: {
479
- eth_gas_fee: number;
480
- from_addr: string;
481
- name: string;
482
- params: any[];
483
- status: number;
484
- to_addr: string;
485
- usd_gas_fee: number;
486
- value: number;
487
- message: string | null;
488
- } | null;
489
- }
490
- export interface TxHistoryResult {
491
- cate_dict: Record<string, {
492
- id: string;
493
- name: string;
494
- }>;
495
- history_list: TxHistoryItem[];
496
- project_dict: Record<string, {
497
- chain: string;
498
- id: string;
499
- logo_url: string;
500
- name: string;
501
- }>;
502
- token_dict: Record<string, TokenItem>;
503
- }
504
- export interface TxAllHistoryResult extends Omit<TxHistoryResult, 'token_dict'> {
505
- token_uuid_dict: Record<string, TokenItem>;
506
- project_dict: TxHistoryResult['project_dict'];
507
- }
508
- export interface GasResult {
509
- estimated_gas_cost_usd_value: number;
510
- estimated_gas_cost_value: number;
511
- estimated_gas_used: number;
512
- estimated_seconds: number;
513
- front_tx_count: number;
514
- max_gas_cost_usd_value: number;
515
- max_gas_cost_value: number;
516
- fail?: boolean;
517
- }
518
- export interface GasLevel {
519
- level: string;
520
- price: number;
521
- front_tx_count: number;
522
- estimated_seconds: number;
523
- priority_price: number | null;
524
- base_fee: number;
525
- }
526
- export interface BalanceChange<T = TokenItem, N = TransferingNFTItem> {
527
- error?: {
528
- code: number;
529
- msg: string;
530
- } | null;
531
- receive_nft_list: N[];
532
- receive_token_list: T[];
533
- send_nft_list: N[];
534
- send_token_list: T[];
535
- success: boolean;
536
- usd_value_change: number;
537
- }
538
- interface NFTContractItem {
539
- id: string;
540
- chain: string;
541
- name: string;
542
- symbol: string;
543
- is_core: boolean;
544
- time_at: number;
545
- collection: {
546
- id: string;
547
- name: string;
548
- create_at: number;
549
- };
550
- }
551
- export interface ExplainTxResponse {
552
- pre_exec_version: 'v0' | 'v1' | 'v2';
553
- abi?: {
554
- func: string;
555
- params: Array<string[] | number | string>;
556
- };
557
- abi_str?: string;
558
- balance_change: BalanceChange;
559
- gas: {
560
- success?: boolean;
561
- error?: {
562
- code: number;
563
- msg: string;
564
- } | null;
565
- gas_used: number;
566
- gas_ratio: number;
567
- gas_limit: number;
568
- estimated_gas_cost_usd_value: number;
569
- estimated_gas_cost_value: number;
570
- estimated_gas_used: number;
571
- estimated_seconds: number;
572
- };
573
- native_token: TokenItem;
574
- pre_exec: {
575
- success: boolean;
576
- error?: {
577
- code: number;
578
- msg: string;
579
- } | null;
580
- };
581
- trace_id: string;
582
- recommend: {
583
- gas: string;
584
- nonce: string;
585
- };
586
- support_balance_change: true;
587
- type_call?: {
588
- action: string;
589
- contract: string;
590
- contract_protocol_logo_url: string;
591
- contract_protocol_name: string;
592
- };
593
- type_send?: {
594
- to_addr: string;
595
- token_symbol: string;
596
- token_amount: number;
597
- token: TokenItem;
598
- };
599
- type_token_approval?: {
600
- spender: string;
601
- spender_protocol_logo_url: string;
602
- spender_protocol_name: string;
603
- token_symbol: string;
604
- token_amount: number;
605
- is_infinity: boolean;
606
- token: TokenItem;
607
- };
608
- type_cancel_token_approval?: {
609
- spender: string;
610
- spender_protocol_logo_url: string;
611
- spender_protocol_name: string;
612
- token_symbol: string;
613
- };
614
- type_cancel_tx?: any;
615
- type_deploy_contract?: any;
616
- is_gnosis?: boolean;
617
- gnosis?: ExplainTxResponse;
618
- type_cancel_single_nft_approval?: {
619
- spender: string;
620
- spender_protocol_name: null;
621
- spender_protocol_logo_url: string;
622
- token_symbol: null;
623
- is_nft: boolean;
624
- nft: NFTItem;
625
- };
626
- type_cancel_nft_collection_approval?: {
627
- spender: string;
628
- spender_protocol_name: string;
629
- spender_protocol_logo_url: string;
630
- token_symbol: string;
631
- is_nft: boolean;
632
- nft_contract: NFTContractItem;
633
- token: TokenItem;
634
- };
635
- type_nft_collection_approval?: {
636
- spender: string;
637
- spender_protocol_name: string;
638
- spender_protocol_logo_url: string;
639
- token_symbol: string;
640
- is_nft: boolean;
641
- nft_contract: NFTContractItem;
642
- token: TokenItem;
643
- token_amount: number;
644
- is_infinity: boolean;
645
- };
646
- type_single_nft_approval?: {
647
- spender: string;
648
- spender_protocol_name: string;
649
- spender_protocol_logo_url: string;
650
- token_symbol: string;
651
- is_nft: boolean;
652
- nft: NFTItem;
653
- token: TokenItem;
654
- token_amount: number;
655
- is_infinity: boolean;
656
- };
657
- type_nft_send?: {
658
- spender: string;
659
- spender_protocol_name: null;
660
- spender_protocol_logo_url: string;
661
- token_symbol: string;
662
- token_amount: number;
663
- is_infinity: boolean;
664
- is_nft: boolean;
665
- nft: NFTItem;
666
- };
667
- type_list_nft?: {
668
- action: string;
669
- contract: string;
670
- contract_protocol_logo_url: string;
671
- contract_protocol_name: string;
672
- offerer: string;
673
- total_usd_value: number;
674
- offer_list: {
675
- item_type: number;
676
- amount: number;
677
- nft: NFTItem;
678
- }[];
679
- buyer_list: {
680
- id: string;
681
- }[];
682
- };
683
- }
684
- export interface LatestExplainTxResponse {
685
- id: string;
686
- tx_id: string;
687
- block_height: number;
688
- gas_used: number;
689
- pre_exec_result: PreExecResult;
690
- create_at: number;
691
- }
692
- export interface RPCResponse<T> {
693
- result: T;
694
- id: number;
695
- jsonrpc: string;
696
- error?: {
697
- code: number;
698
- message: string;
699
- };
700
- }
701
- export interface GetTxResponse {
702
- blockHash: string;
703
- blockNumber: string;
704
- from: string;
705
- gas: string;
706
- gasPrice: string;
707
- hash: string;
708
- input: string;
709
- nonce: string;
710
- to: string;
711
- transactionIndex: string;
712
- value: string;
713
- type: string;
714
- v: string;
715
- r: string;
716
- s: string;
717
- front_tx_count: number;
718
- code: 0 | -1;
719
- status: -1 | 0 | 1;
720
- gas_used: number;
721
- token: TokenItem;
722
- }
723
- export interface ApprovalStatus {
724
- chain: string;
725
- token_approval_danger_cnt: number;
726
- nft_approval_danger_cnt: number;
727
- }
728
- export interface UsedChain {
729
- id: string;
730
- community_id: number;
731
- name: string;
732
- native_token_id: string;
733
- logo_url: string;
734
- wrapped_token_id: string;
735
- }
736
- export interface ProjectItem {
737
- id: string;
738
- name: string;
739
- site_url: string;
740
- logo_url: string;
741
- }
742
- export interface PoolItem {
743
- id: string;
744
- chain: string;
745
- project_id: string;
746
- adapter_id: string;
747
- controller: string;
748
- time_at: number;
749
- index?: number;
750
- }
751
- export interface PortfolioItemToken extends TokenItem {
752
- claimable_amount?: number;
753
- }
754
- export declare type NftCollection = {
755
- chain_id: string;
756
- id: string;
757
- name: string;
758
- symbol?: string;
759
- logo_url: string;
760
- is_core: boolean;
761
- amount?: number;
762
- floor_price_token?: PortfolioItemToken;
763
- };
764
- export declare type PortfolioItemNft = {
765
- id: string;
766
- contract_id: string;
767
- inner_id: string;
768
- name: string;
769
- content_url: string;
770
- thumbnail_url: string;
771
- collection: NftCollection;
772
- amount: number;
773
- };
774
- export interface PortfolioItemDetail {
775
- supply_token_list?: PortfolioItemToken[];
776
- borrow_token_list?: PortfolioItemToken[];
777
- health_rate?: number;
778
- reward_token_list?: PortfolioItemToken[];
779
- collateral_token_list?: PortfolioItemToken[];
780
- token_list?: PortfolioItemToken[];
781
- base_token?: PortfolioItemToken;
782
- position_token?: PortfolioItemToken;
783
- description?: string;
784
- token?: PortfolioItemToken;
785
- underlying_token?: PortfolioItemToken;
786
- strike_token?: PortfolioItemToken;
787
- quote_token?: PortfolioItemToken;
788
- margin_token?: PortfolioItemToken;
789
- supply_nft_list?: PortfolioItemNft[];
790
- nft_list?: PortfolioItemNft[];
791
- collection?: NftCollection;
792
- share_token?: PortfolioItemToken;
793
- exercise_end_at?: number;
794
- type?: string;
795
- side?: number;
796
- leverage?: number;
797
- expired_at: number;
798
- end_at: number;
799
- unlock_at: number;
800
- debt_ratio?: number;
801
- usd_value?: number;
802
- daily_unlock_amount: number;
803
- pnl_usd_value: number;
804
- amount?: number;
805
- price?: number;
806
- name?: string;
807
- }
808
- export interface PortfolioItem {
809
- asset_token_list: TokenItem[];
810
- stats: {
811
- asset_usd_value: number;
812
- debt_usd_value: number;
813
- net_usd_value: number;
814
- };
815
- asset_dict: Record<string, number>;
816
- update_at: number;
817
- name: string;
818
- detail_types: string[];
819
- detail: PortfolioItemDetail;
820
- proxy_detail: {
821
- project: ProjectItem;
822
- proxy_contract_id: string;
823
- };
824
- pool: PoolItem;
825
- position_index: string;
826
- withdraw_actions?: WithdrawAction[];
827
- }
828
- export interface WithdrawAction {
829
- type: 'withdraw' | 'claim' | 'queue';
830
- contract_id: string;
831
- func: string;
832
- params?: string[];
833
- str_params?: string[];
834
- need_approve: {
835
- token_id?: string;
836
- to?: string;
837
- raw_amount?: number;
838
- str_raw_amount?: string;
839
- };
840
- }
841
- export interface Protocol {
842
- chain: string;
843
- dao_id: null | string;
844
- has_supported_portfolio: boolean;
845
- id: string;
846
- is_tvl: boolean;
847
- logo_url: string;
848
- name: string;
849
- platform_token_id: string;
850
- site_url: string;
851
- tag_ids: string[];
852
- tvl: number;
853
- }
854
- export interface ComplexProtocol {
855
- id: string;
856
- chain: string;
857
- name: string;
858
- site_url: string;
859
- logo_url: string;
860
- has_supported_portfolio: boolean;
861
- tvl: number;
862
- portfolio_item_list: PortfolioItem[];
863
- }
864
- export interface ExplainTypedDataResponse {
865
- type_list_nft?: ExplainTxResponse['type_list_nft'];
866
- type_token_approval?: ExplainTxResponse['type_token_approval'];
867
- type_common_sign?: {
868
- contract: string;
869
- contract_protocol_logo_url?: string;
870
- contract_protocol_name?: string;
871
- };
872
- }
873
- export interface CEXQuote {
874
- pay_token: TokenItem;
875
- receive_token: TokenItem;
876
- }
877
- export interface SwapItem {
878
- chain: string;
879
- tx_id: string;
880
- create_at: number;
881
- finished_at: number;
882
- status: 'Pending' | 'Completed' | 'Finished';
883
- dex_id: string;
884
- pay_token: TokenItem;
885
- receive_token: TokenItem;
886
- gas: {
887
- native_token: TokenItem;
888
- native_gas_fee: number;
889
- usd_gas_fee: number;
890
- gas_price: number;
891
- };
892
- quote: {
893
- pay_token_amount: number;
894
- receive_token_amount: number;
895
- slippage: number;
896
- };
897
- actual: {
898
- pay_token_amount: number;
899
- receive_token_amount: number;
900
- slippage: number;
901
- };
902
- }
903
- export interface SwapTradeList {
904
- history_list: SwapItem[];
905
- total_cnt: number;
906
- }
907
- export interface SlippageStatus {
908
- is_valid: boolean;
909
- suggest_slippage: number;
910
- }
911
- export interface SummaryToken {
912
- id: string;
913
- chain: string;
914
- name: string;
915
- symbol: string;
916
- display_symbol?: string;
917
- optimized_symbol: string;
918
- decimals: number;
919
- logo_url?: string;
920
- protocol_id: string;
921
- price: number;
922
- is_verified: boolean;
923
- is_core: boolean;
924
- is_wallet: boolean;
925
- time_at?: number;
926
- amount: number;
927
- }
928
- export interface SummaryCoin {
929
- id: string;
930
- symbol: string;
931
- logo_url: string;
932
- parent_coin_id?: string;
933
- token_uuids: string[];
934
- peg_token_uuids: string[];
935
- circulating_supply: number;
936
- total_supply: number;
937
- price: number;
938
- amount: number;
939
- }
940
- export interface Summary {
941
- token_list: SummaryToken[];
942
- coin_list: SummaryCoin[];
943
- }
944
- export interface Cex {
945
- id: string;
946
- logo_url: string;
947
- name: string;
948
- is_deposit: boolean;
949
- }
950
- export interface ContractCredit {
951
- value: null | number;
952
- rank_at: number | null;
953
- }
954
- export interface ContractDesc {
955
- multisig?: {
956
- id: string;
957
- logo_url: string;
958
- name: string;
959
- };
960
- create_at: number;
961
- is_danger?: boolean | null;
962
- }
963
- export interface AddrDescResponse {
964
- desc: {
965
- cex?: Cex;
966
- contract?: Record<string, ContractDesc>;
967
- usd_value: number;
968
- protocol?: Record<string, {
969
- id: string;
970
- logo_url: string;
971
- name: string;
972
- }>;
973
- born_at: number;
974
- is_danger: boolean | null;
975
- is_spam: boolean | null;
976
- is_scam: boolean | null;
977
- name: string;
978
- id: string;
979
- };
980
- }
981
- export interface SendAction {
982
- to: string;
983
- token: TokenItem;
984
- }
985
- export interface RevokeTokenApproveAction {
986
- spender: string;
987
- token: TokenItem;
988
- }
989
- export interface WrapTokenAction {
990
- pay_token: TokenItem;
991
- receive_token: SwapReceiveToken;
992
- receiver: string;
993
- }
994
- export interface UnWrapTokenAction {
995
- pay_token: TokenItem;
996
- receive_token: SwapReceiveToken;
997
- receiver: string;
998
- }
999
- export interface ApproveAction {
1000
- spender: string;
1001
- token: TokenItem;
1002
- }
1003
- export interface SwapReceiveToken extends TokenItem {
1004
- min_amount: number;
1005
- min_raw_amount: string;
1006
- }
1007
- export interface CrossSwapAction {
1008
- pay_token: TokenItem;
1009
- receive_token: SwapReceiveToken;
1010
- receiver: string;
1011
- }
1012
- export interface CrossTokenAction {
1013
- pay_token: TokenItem;
1014
- receive_token: SwapReceiveToken;
1015
- receiver: string;
1016
- }
1017
- export interface RevokePermit2Action {
1018
- spender: string;
1019
- token: TokenItem;
1020
- }
1021
- export interface SwapOrderAction {
1022
- pay_token_list: TokenItem[];
1023
- pay_nft_list: NFTItem[];
1024
- takers: string[];
1025
- receive_token_list: TokenItem[];
1026
- receive_nft_list: NFTItem[];
1027
- receiver: string | null;
1028
- expire_at: string | null;
1029
- }
1030
- export interface MaxPayTokenItem extends TokenItem {
1031
- max_amount: number;
1032
- max_raw_amount: string;
1033
- }
1034
- export interface SwapLimitPay {
1035
- pay_token: MaxPayTokenItem;
1036
- receive_token: TokenItem;
1037
- receiver: string;
1038
- }
1039
- export interface MultiSwapAction {
1040
- pay_token_list: TokenItem[];
1041
- receive_token_list: SwapReceiveToken[];
1042
- receiver: string;
1043
- }
1044
- export interface TransferOwnerAction {
1045
- description: string;
1046
- from_addr: string;
1047
- to_addr: string;
1048
- }
1049
- export interface SwapAction {
1050
- pay_token: TokenItem;
1051
- receive_token: SwapReceiveToken;
1052
- receiver: string;
1053
- }
1054
- export interface SendNFTAction {
1055
- to: string;
1056
- nft: NFTItem;
1057
- }
1058
- export interface ApproveNFTAction {
1059
- spender: string;
1060
- nft: NFTItem;
1061
- }
1062
- export declare type RevokeNFTAction = ApproveNFTAction;
1063
- export interface ApproveNFTCollectionAction {
1064
- spender: string;
1065
- collection: NFTCollection;
1066
- }
1067
- export interface PushMultiSigAction {
1068
- multisig_id: string;
1069
- }
1070
- export declare type RevokeNFTCollectionAction = ApproveNFTCollectionAction;
1071
- export declare type MultiAction = TransactionAction[];
1072
- export declare type TransactionActionDataItem = SwapAction | ApproveAction | SendAction | SendNFTAction | ApproveNFTAction | RevokeNFTAction | ApproveNFTCollectionAction | RevokeNFTCollectionAction | RevokeTokenApproveAction | WrapTokenAction | UnWrapTokenAction | PushMultiSigAction | CrossSwapAction | CrossTokenAction | RevokePermit2Action | SwapOrderAction | TransferOwnerAction | MultiSwapAction | SwapLimitPay | MultiAction | null;
1073
- export interface TransactionAction {
1074
- type: string;
1075
- data: TransactionActionDataItem;
1076
- }
1077
- export interface ParseTxResponse {
1078
- action: TransactionAction;
1079
- contract_call?: {
1080
- func: string;
1081
- contract: {
1082
- id: string;
1083
- protocol: {
1084
- name: string;
1085
- logo_url: string;
1086
- };
1087
- };
1088
- };
1089
- log_id: string;
1090
- }
1091
- export interface CollectionWithFloorPrice {
1092
- id: string;
1093
- name: string;
1094
- floor_price: number;
1095
- }
1096
- export declare type TypedDataActionName = 'permit1_approve_token' | 'swap_token_order' | 'permit2_approve_token' | 'sell_nft_order' | 'sign_multisig' | 'buy_nft_order' | 'create_key' | 'verify_address' | 'sell_nft_list_order' | 'permit2_approve_token_list' | 'create_cobo_safe' | 'submit_safe_role_modification' | 'submit_delegated_address_modification' | 'submit_token_approval_modification' | 'send_token' | 'permit1_revoke_token' | 'swap_order' | 'approve_nft' | 'multi_actions';
1097
- export interface BuyNFTOrderAction {
1098
- expire_at: string;
1099
- pay_token: TokenItem;
1100
- receive_nft: NFTItem;
1101
- receiver: string;
1102
- takers: string[];
1103
- }
1104
- export interface SellNFTOrderAction {
1105
- pay_nft: NFTItem;
1106
- receive_token: TokenItem;
1107
- receiver: string;
1108
- takers: string[];
1109
- expire_at: string;
1110
- }
1111
- export interface BatchSellNFTOrderAction {
1112
- pay_nft_list: NFTItem[];
1113
- receive_token: TokenItem;
1114
- receiver: string;
1115
- takers: string[];
1116
- expire_at: string;
1117
- }
1118
- export interface SwapTokenOrderAction {
1119
- pay_token: TokenItem;
1120
- receive_token: TokenItem;
1121
- receiver: string;
1122
- takers: string[];
1123
- expire_at: number | null;
1124
- }
1125
- export interface PermitAction {
1126
- spender: string;
1127
- token: TokenItem;
1128
- }
1129
- export interface PermitTokenItem extends TokenItem {
1130
- permit2_allowance_amount: number;
1131
- permit2_allowance_raw_amount: string;
1132
- }
1133
- export interface Permit2Action {
1134
- permit2_id: string;
1135
- spender: string;
1136
- token: PermitTokenItem;
1137
- expire_at: number | null;
1138
- }
1139
- export interface BatchPermit2Action {
1140
- permit2_id: string;
1141
- spender: string;
1142
- token_list: PermitTokenItem[];
1143
- expire_at: number | null;
1144
- }
1145
- export interface SignMultiSigActions {
1146
- multisig_id: string;
1147
- }
1148
- export interface CreateCoboSafeAction {
1149
- multisig_id: string;
1150
- desc: string;
1151
- brand: {
1152
- name: string;
1153
- logo_url: string;
1154
- };
1155
- }
1156
- export interface SubmitSafeRoleModificationAction {
1157
- multisig_id: string;
1158
- desc: string;
1159
- brand: {
1160
- name: string;
1161
- logo_url: string;
1162
- };
1163
- }
1164
- export interface SubmitDelegatedAddressModificationAction {
1165
- multisig_id: string;
1166
- desc: string;
1167
- brand: {
1168
- name: string;
1169
- logo_url: string;
1170
- };
1171
- }
1172
- export interface SubmitTokenApprovalModificationAction {
1173
- multisig_id: string;
1174
- desc: string;
1175
- brand: {
1176
- name: string;
1177
- logo_url: string;
1178
- };
1179
- }
1180
- export declare type TypeDataActionDataItem = SellNFTOrderAction | BuyNFTOrderAction | SwapTokenOrderAction | PermitAction | Permit2Action | SignMultiSigActions | CreateKeyAction | VerifyAddressAction | BatchSellNFTOrderAction | BatchPermit2Action | CreateCoboSafeAction | SubmitSafeRoleModificationAction | SubmitDelegatedAddressModificationAction | SubmitTokenApprovalModificationAction | SendAction | SwapOrderAction | RevokeTokenApproveAction | ApproveNFTAction | MultiAction;
1181
- export interface TypeDataActionItem {
1182
- type: TypedDataActionName;
1183
- expire_at?: number;
1184
- data: TypeDataActionDataItem;
1185
- }
1186
- export interface ParseTypedDataResponse {
1187
- action: TypeDataActionItem | null;
1188
- log_id: string;
1189
- }
1190
- export declare type TextActionName = 'create_key' | 'verify_address';
1191
- export interface CreateKeyAction {
1192
- user: string;
1193
- allow_origins: string[];
1194
- protocol: {
1195
- name: string;
1196
- logo_url: string;
1197
- } | null;
1198
- desc: string;
1199
- }
1200
- export interface VerifyAddressAction {
1201
- user: string;
1202
- allow_origins: string[];
1203
- protocol: {
1204
- name: string;
1205
- logo_url: string;
1206
- } | null;
1207
- desc: string;
1208
- }
1209
- export interface ParseTextResponse {
1210
- action: {
1211
- type: TextActionName;
1212
- data: CreateKeyAction | VerifyAddressAction;
1213
- } | null;
1214
- log_id: string;
1215
- }
1216
- export declare type TxPushType = 'default' | 'low_gas' | 'mev';
1217
- export interface TxRequest {
1218
- id: string;
1219
- chain_id: string;
1220
- user_addr: string;
1221
- nonce: number;
1222
- signed_tx: Tx;
1223
- tx_id?: null | string;
1224
- push_type: TxPushType;
1225
- push_status?: 'success' | 'failed';
1226
- push_at?: number | null;
1227
- is_withdraw: boolean;
1228
- create_at: number;
1229
- low_gas_deadline?: number;
1230
- is_finished: boolean;
1231
- predict_packed_at?: number;
1232
- predict_err_code?: number;
1233
- push_at_list?: number[];
1234
- }
1235
- export interface MempoolCheckDetail {
1236
- id: string;
1237
- chain_id: string;
1238
- tx_id: string;
1239
- check_at: string;
1240
- check_success: boolean;
1241
- rpc: string;
1242
- name?: string;
1243
- operator?: string;
1244
- packed_rate?: number;
1245
- }
1246
- export interface JobResponse<T = any> {
1247
- create_at: number;
1248
- id: string;
1249
- result: {
1250
- create_at: number;
1251
- id: string;
1252
- data: T;
1253
- };
1254
- job: {
1255
- create_at: number;
1256
- id: string;
1257
- status: 'pending' | 'running';
1258
- } | null;
1259
- }
1260
- export interface PreExecResult {
1261
- balance_change: BalanceChange;
1262
- gas: {
1263
- success?: boolean;
1264
- error?: {
1265
- code: number;
1266
- msg: string;
1267
- } | null;
1268
- gas_used: number;
1269
- gas_limit: number;
1270
- };
1271
- is_multisig: boolean;
1272
- multisig?: any;
1273
- pre_exec: {
1274
- success: boolean;
1275
- error?: {
1276
- code: number;
1277
- msg: string;
1278
- } | null;
1279
- };
1280
- }
1281
- export interface PendingTxItem {
1282
- id: string;
1283
- action_data: ParseTxResponse['action']['data'];
1284
- action_type: ParseTxResponse['action']['type'];
1285
- block_height?: number | null;
1286
- gas_price?: number | null;
1287
- gas_used?: number | null;
1288
- pre_exec_at?: number | null;
1289
- pre_exec_result?: Omit<PreExecResult, 'balance_change'> & {
1290
- balance_change: BalanceChange<{
1291
- chain: string;
1292
- token_id: string;
1293
- amount: number;
1294
- }, {
1295
- chain: string;
1296
- token_id: string;
1297
- amount: number;
1298
- }>;
1299
- };
1300
- to_addr: string;
1301
- to_addr_desc: {
1302
- cex?: Cex | null;
1303
- protocol?: {
1304
- id: string;
1305
- logo_url: string;
1306
- name: string;
1307
- };
1308
- };
1309
- }
1310
- export interface BasicDappInfo {
1311
- id: string;
1312
- name: string;
1313
- logo_url: string | null;
1314
- description: string;
1315
- user_range: string;
1316
- tags: string[];
1317
- chain_ids: string[];
1318
- collected_list?: {
1319
- name: string;
1320
- logo_url: string;
1321
- }[];
1322
- }
1323
- export interface SupportedChain {
1324
- id: string;
1325
- community_id: number;
1326
- name: string;
1327
- native_token: {
1328
- id: string;
1329
- symbol: string;
1330
- logo: string;
1331
- decimals: number;
1332
- };
1333
- logo_url: string;
1334
- white_logo_url?: string;
1335
- need_estimate_gas?: boolean;
1336
- eip_1559: boolean;
1337
- is_disabled: boolean;
1338
- explorer_host: string;
1339
- block_interval: number;
1340
- severity?: number;
1341
- }
1342
- export interface ChainListItem {
1343
- chain_id: number;
1344
- name: string;
1345
- short_name: string;
1346
- native_currency: {
1347
- name: string;
1348
- symbol: string;
1349
- decimals: number;
1350
- };
1351
- explorer: string | null;
1352
- rpc: null | string;
1353
- rpc_list?: string[];
1354
- }
1355
- export interface HistoryCurve {
1356
- create_at: number;
1357
- executor_name: string;
1358
- executor_params: {
1359
- addr: string;
1360
- };
1361
- executor_version: string;
1362
- id: string;
1363
- job?: null | {
1364
- create_at: number;
1365
- id: string;
1366
- status: 'pending' | 'running';
1367
- };
1368
- result?: null | {
1369
- create_at: number;
1370
- data: {
1371
- usd_value_list: number[][];
1372
- };
1373
- id: number;
1374
- };
1375
- }
1376
- export interface NodeStatus {
1377
- id: string;
1378
- chain_id: string;
1379
- features: {
1380
- signature_decode: boolean;
1381
- tx_simulation: boolean;
1382
- security_check: boolean;
1383
- evm_tracing: boolean;
1384
- };
1385
- tags: string[];
1386
- official_node_height: number;
1387
- official_node_timestamp: number;
1388
- rabby_node_height: number;
1389
- rabby_data_service_height: number;
1390
- chain: {
1391
- id: string;
1392
- network_id: number;
1393
- name: string;
1394
- token_id: string;
1395
- token_symbol: string;
1396
- logo_url: string;
1397
- svg_logo_url: string;
1398
- block_interval: number;
1399
- start_at: string;
1400
- prefix: string;
1401
- wrapped: string;
1402
- explorer_host: string;
1403
- is_support_archive: boolean;
1404
- eip_1559: boolean;
1405
- white_logo_url: string;
1406
- };
1407
- }
1408
- interface NodeServiceData {
1409
- node: NodeDetails;
1410
- height_list: [number, number, number][];
1411
- }
1412
- interface NodeDetails {
1413
- name: string;
1414
- tag: string[];
1415
- }
1416
- export interface NodeStatusDetail {
1417
- rabby_rpc: NodeServiceData[];
1418
- rabby_data_service: NodeServiceData[];
1419
- }
1420
- interface BridgeItem {
1421
- id: string;
1422
- name: string;
1423
- logo_url: string;
1424
- }
1425
- export interface BridgeAggregator {
1426
- id: string;
1427
- name: string;
1428
- logo_url: string;
1429
- bridge_list: BridgeItem[];
1430
- }
1431
- export interface BridgeTokenPair {
1432
- aggregator_id: string;
1433
- from_token: TokenItem;
1434
- to_token: TokenItem;
1435
- from_token_amount: number;
1436
- from_token_raw_amount_hex_str: string;
1437
- from_token_usd_value: number;
1438
- }
1439
- export interface BridgeQuote {
1440
- aggregator: Exclude<BridgeAggregator, 'bridge_list'>;
1441
- bridge_id: string;
1442
- bridge: BridgeItem;
1443
- to_token_amount: number;
1444
- to_token_raw_amount: number;
1445
- to_token_raw_amount_hex_str: string;
1446
- gas_fee: {
1447
- raw_amount_hex_str: string;
1448
- usd_value: number;
1449
- };
1450
- protocol_fee: {
1451
- raw_amount_hex_str: string;
1452
- usd_value: number;
1453
- };
1454
- rabby_fee: {
1455
- raw_amount_hex_str: string;
1456
- usd_value: number;
1457
- };
1458
- duration: number;
1459
- routePath: string;
1460
- approve_contract_id: string;
1461
- tx: {
1462
- chainId: number;
1463
- data: string;
1464
- from: string;
1465
- gasLimit: string;
1466
- gasPrice: string;
1467
- to: string;
1468
- value: string;
1469
- };
1470
- quote_key: Record<string, any>;
1471
- }
1472
- export interface BridgeHistory {
1473
- aggregator: Exclude<BridgeAggregator, 'bridge_list'>;
1474
- bridge: BridgeItem;
1475
- from_token: TokenItem;
1476
- to_token: TokenItem;
1477
- to_actual_token: TokenItem;
1478
- quote: {
1479
- pay_token_amount: number;
1480
- receive_token_amount: number;
1481
- };
1482
- actual: {
1483
- pay_token_amount: number;
1484
- receive_token_amount: number;
1485
- };
1486
- detail_url: string;
1487
- status: 'pending' | 'completed' | 'failed';
1488
- create_at: number;
1489
- from_tx: {
1490
- tx_id: string;
1491
- };
1492
- to_tx: {
1493
- tx_id?: string;
1494
- };
1495
- from_gas: {
1496
- native_token: TokenItem;
1497
- gas_amount: number;
1498
- usd_gas_fee: number;
1499
- gas_price: number;
1500
- };
1501
- }
1502
- export interface DbkBridgeHistoryItem {
1503
- user_addr: string;
1504
- from_chain_id: string;
1505
- to_chain_id: string;
1506
- is_deposit: boolean;
1507
- tx_id: string;
1508
- create_at: number;
1509
- from_token_amount: number;
1510
- from_token_id: string;
1511
- }
1512
- export interface ContractInfo {
1513
- id: string;
1514
- credit: ContractCredit;
1515
- is_token: boolean;
1516
- token_approval_exposure: number;
1517
- top_nft_approval_exposure: number;
1518
- spend_usd_value: number;
1519
- top_nft_spend_usd_value: number;
1520
- create_at: number;
1521
- name: string | null;
1522
- protocol: {
1523
- id: string;
1524
- logo_url: string;
1525
- name: string;
1526
- } | null;
1527
- is_danger: {
1528
- auto: null | boolean;
1529
- edit: null | boolean;
1530
- };
1531
- is_phishing: boolean | null;
1532
- }
1533
- export interface PerpTopToken {
1534
- id: number;
1535
- name: string;
1536
- full_logo_url: string | null;
1537
- daily_volume: number;
1538
- dex_id: string;
1539
- }
1540
- export interface GasAccountCheckResult {
1541
- gas_account_cost: {
1542
- total_cost: number;
1543
- tx_cost: number;
1544
- gas_cost: number;
1545
- estimate_tx_cost: number;
1546
- };
1547
- is_gas_account: boolean;
1548
- balance_is_enough: boolean;
1549
- chain_not_support: boolean;
1550
- err_msg: string;
1551
- }
1552
- export interface ParseCommonResponse {
1553
- input_type: 'typed_data' | 'text' | 'tx';
1554
- output_type: 'typed_data' | 'text' | 'tx';
1555
- action: ParseTypedDataResponse['action'] | ParseTextResponse['action'] | ParseTxResponse['action'];
1556
- log_id: string;
1557
- pre_exec_result: ExplainTxResponse | null;
1558
- contract_call_data: ParseTxResponse['contract_call'] | null;
1559
- pre_exec?: PreExecResult['pre_exec'];
1560
- }
1561
- export interface RechargeChainItem {
1562
- chain_id: string;
1563
- withdraw_limit: number;
1564
- withdraw_fee: number;
1565
- l1_balance: number;
1566
- }
1567
- export interface WithdrawListAddressItem {
1568
- recharge_addr: string;
1569
- total_withdraw_limit: number;
1570
- recharge_chain_list: RechargeChainItem[];
1571
- }
1572
- export interface BuyCountryItem {
1573
- id: string;
1574
- name: string;
1575
- image_url: string;
1576
- regions: null | {
1577
- regionCode: string;
1578
- name: string;
1579
- };
1580
- }
1581
- export interface BuyServiceProvider {
1582
- id: string;
1583
- name: string;
1584
- website_url: string;
1585
- customer_support_url: string;
1586
- image_url: string;
1587
- logo_url: string;
1588
- }
1589
- export interface BuyQuoteItem {
1590
- service_provider: BuyServiceProvider;
1591
- token_amount: number;
1592
- payment_method_type: string;
1593
- }
1594
- export interface BuyHistoryItem {
1595
- id: string;
1596
- user_addr: string;
1597
- status: string;
1598
- create_at: number;
1599
- service_provider: BuyServiceProvider;
1600
- service_provider_url: null | string;
1601
- pay_usd_amount: number;
1602
- pay_currency_code: string;
1603
- payment_type: string;
1604
- receive_chain_id: string;
1605
- receive_tx_id: string;
1606
- receive_token_id: string;
1607
- receive_amount: number;
1608
- receive_token: TokenItem;
1609
- }
1610
- export interface BuyHistoryList {
1611
- pagination: {
1612
- start: number;
1613
- limit: number;
1614
- total: number;
1615
- };
1616
- histories: BuyHistoryItem[];
1617
- }
1618
- export interface BuyPaymentMethod {
1619
- id: string;
1620
- name: string;
1621
- type: string;
1622
- logo_url: string;
1623
- }
1624
- export interface GasAccountInfo {
1625
- id: string;
1626
- balance: number;
1627
- create_at: number;
1628
- nonce: number;
1629
- uuid: string;
1630
- has_iap_order: boolean;
1631
- no_register: boolean;
1632
- non_withdrawable_balance: number | undefined;
1633
- withdrawable_balance: number | undefined;
1634
- }
1635
- export interface AppChainItem {
1636
- id: string;
1637
- name: string;
1638
- site_url: string;
1639
- logo_url: string;
1640
- is_support_portfolio: boolean;
1641
- is_visible: boolean;
1642
- portfolio_item_list: PortfolioItem[];
1643
- }
1644
- export interface AppChainListResponse {
1645
- apps: AppChainItem[];
1646
- error_apps: {
1647
- create_at: number;
1648
- id: string;
1649
- is_support_portfolio: boolean;
1650
- is_visible: boolean;
1651
- logo_url: string;
1652
- name: string;
1653
- site_url: string;
1654
- update_at: number;
1655
- }[];
1656
- }
1657
- export declare type DefaultRPCRes = {
1658
- message: string;
1659
- status: string;
1660
- rpcs: RPCDefaultItem[];
1661
- };
1662
- declare type RPCDefaultItem = {
1663
- chainId: string;
1664
- rpcUrl: string[];
1665
- txPushToRPC: boolean;
1666
- };
1667
- export interface TokenDetailWithPriceCurve extends TokenItemWithEntity {
1668
- price_curve_24h: {
1669
- time_at: number;
1670
- price: number;
1671
- }[];
1672
- }
1673
- export declare type GiftEligibilityItem = {
1674
- id?: string;
1675
- has_eligibility: boolean;
1676
- can_claimed_usd_value: number;
1677
- };
1678
- export declare type KlineDataItem = [
1679
- time_at: number,
1680
- open: number,
1681
- high: number,
1682
- low: number,
1683
- close: number,
1684
- volume_amount: number,
1685
- volume_usd_value: number
1686
- ];
1687
- export declare type TokenMarketInfo = {
1688
- market: {
1689
- volume_amount_24h: number | null;
1690
- volume_usd_value_24h: number | null;
1691
- txns_24h: number | null;
1692
- };
1693
- };
1694
- export declare type TokenHolderInfo = {
1695
- holder_count: number | null;
1696
- };
1697
- export declare type TokenSupplyInfo = {
1698
- market_cap_usd_value: number | null;
1699
- total_supply: number | null;
1700
- circulating_supply: number | null;
1701
- max_supply: number | null;
1702
- };
1703
- export declare type UserFeedbackItem = {
1704
- id: string;
1705
- title: string;
1706
- content: string;
1707
- image_url_list: string[];
1708
- status: 'pending' | 'complete' | 'closed';
1709
- create_at: number;
1710
- comment: string | null;
1711
- comment_at: number | null;
1712
- extra?: any | null;
1713
- };
1714
- export declare type CurrencyItem = {
1715
- symbol: string;
1716
- code: string;
1717
- logo_url: string;
1718
- usd_rate: number;
1719
- };
1720
- export interface PerpBridgeQuote {
1721
- tx: {
1722
- chainId: number;
1723
- data: string;
1724
- from: string;
1725
- gas: string;
1726
- gasPrice: string;
1727
- nonce: string;
1728
- to: string;
1729
- value: string;
1730
- };
1731
- bridge_id: string;
1732
- bridge: BridgeItem | null;
1733
- to_token_raw_amount: number;
1734
- to_token_raw_amount_hex_str: string;
1735
- to_token_amount: number;
1736
- approve_contract_id: string;
1737
- protocol_fee: {
1738
- raw_amount_hex_str: string;
1739
- usd_value: number;
1740
- };
1741
- rabby_fee: {
1742
- raw_amount_hex_str: string;
1743
- usd_value: number;
1744
- };
1745
- gas_fee: {
1746
- raw_amount_hex_str: string;
1747
- usd_value: number;
1748
- };
1749
- duration: number;
1750
- }
1751
- export declare type MarketSummaryItem = {
1752
- price?: {
1753
- open?: number;
1754
- close?: number;
1755
- change?: number;
1756
- };
1757
- summary: {
1758
- buy?: {
1759
- count?: number;
1760
- volume_amount?: number;
1761
- volume_usd_value?: number;
1762
- };
1763
- sell?: {
1764
- count?: number;
1765
- volume_amount?: number;
1766
- volume_usd_value?: number;
1767
- };
1768
- totals?: {
1769
- trading_count?: number;
1770
- volume_amount?: number;
1771
- volume_usd_value?: number;
1772
- addresses?: number;
1773
- };
1774
- };
1775
- };
1776
- export declare type MarketSummary = {
1777
- '5m'?: MarketSummaryItem | null;
1778
- '1h'?: MarketSummaryItem | null;
1779
- '6h'?: MarketSummaryItem | null;
1780
- '24h'?: MarketSummaryItem | null;
1781
- };
1782
- export declare type MarketTradingHistoryItem = {
1783
- id: string;
1784
- time_at?: number;
1785
- action?: 'buy' | 'sell';
1786
- price?: number;
1787
- amount?: number;
1788
- usd_value?: number;
1789
- tx_id?: string;
1790
- user_addr?: string;
1791
- };
1792
- export declare type TokenHolderSummary = {
1793
- ratio_top10?: number;
1794
- ratio_top100?: number;
1795
- };
1796
- export declare type TokenHolderItem = {
1797
- user_addr?: string;
1798
- amount?: number;
1799
- ratio?: number;
1800
- };
1801
- export declare type LiquidityPoolItem = {
1802
- id: string;
1803
- tokens: {
1804
- id: string;
1805
- amount: number;
1806
- symbol: string;
1807
- price: number;
1808
- usd_value: number;
1809
- }[];
1810
- project: {
1811
- id: string;
1812
- name: string;
1813
- logo_url: string;
1814
- };
1815
- pool_id: string;
1816
- usd_value: number;
1817
- };
1818
- export declare type LiquidityPoolHistoryItem = {
1819
- id: string;
1820
- tx_id: string;
1821
- time_at: number;
1822
- usd_value: number;
1823
- action: 'add' | 'remove';
1824
- tokens: {
1825
- id: string;
1826
- amount: number;
1827
- symbol: string;
1828
- price: number;
1829
- usd_value: number;
1830
- }[];
1831
- };
1832
- export declare type NFTTradingConfig = Record<string, {
1833
- currency: string[];
1834
- seaport_v16_address: string;
1835
- opensea_chain_id: string;
1836
- opensea_fee_recipient: string;
1837
- opensea_conduit_address: string;
1838
- listing_currency: {
1839
- symbol: string;
1840
- token_id: string;
1841
- };
1842
- offer_currency: {
1843
- symbol: string;
1844
- token_id: string;
1845
- };
1846
- }>;
1847
- export interface NFTDetail extends NFTItem {
1848
- best_offer_order: {
1849
- order_hash: string;
1850
- chain: string;
1851
- protocol_data: {
1852
- parameters: {
1853
- offerer: string;
1854
- offer: Array<{
1855
- itemType: number;
1856
- token: string;
1857
- identifierOrCriteria: string;
1858
- startAmount: string;
1859
- endAmount: string;
1860
- }>;
1861
- consideration: Array<{
1862
- itemType: number;
1863
- token: string;
1864
- identifierOrCriteria: string;
1865
- startAmount: string;
1866
- endAmount: string;
1867
- recipient: string;
1868
- }>;
1869
- startTime: string;
1870
- endTime: string;
1871
- orderType: number;
1872
- zone: string;
1873
- zoneHash: string;
1874
- salt: string;
1875
- conduitKey: string;
1876
- totalOriginalConsiderationItems: number;
1877
- counter: number;
1878
- };
1879
- signature: null;
1880
- };
1881
- protocol_address: string;
1882
- remaining_quantity: number;
1883
- criteria: {
1884
- collection: {
1885
- slug: string;
1886
- };
1887
- contract: {
1888
- address: string;
1889
- };
1890
- trait: null;
1891
- traits: null;
1892
- encoded_token_ids: string;
1893
- };
1894
- price: {
1895
- currency: string;
1896
- decimals: number;
1897
- value: string;
1898
- };
1899
- status: 'ACTIVE' | string;
1900
- } | null;
1901
- rarity: {
1902
- strategy_id: 'openrarity' | string;
1903
- strategy_version: string;
1904
- rank: number;
1905
- } | null;
1906
- last_sale?: {
1907
- event_type: 'sale' | string;
1908
- event_timestamp: number;
1909
- transaction: string;
1910
- payment: {
1911
- quantity: string;
1912
- decimals: number;
1913
- symbol: string;
1914
- token_id: string;
1915
- price: number;
1916
- };
1917
- seller: string;
1918
- buyer: string;
1919
- quantity: number;
1920
- } | null;
1921
- }
1922
- export interface NFTListingOrder {
1923
- created_date: string;
1924
- closing_date: string;
1925
- listing_time: number;
1926
- expiration_time: number;
1927
- order_hash: string;
1928
- protocol_data: {
1929
- parameters: {
1930
- offerer: string;
1931
- offer: Array<{
1932
- itemType: number;
1933
- token: string;
1934
- identifierOrCriteria: string;
1935
- startAmount: string;
1936
- endAmount: string;
1937
- }>;
1938
- consideration: Array<{
1939
- itemType: number;
1940
- token: string;
1941
- identifierOrCriteria: string;
1942
- startAmount: string;
1943
- endAmount: string;
1944
- recipient: string;
1945
- }>;
1946
- startTime: string;
1947
- endTime: string;
1948
- orderType: number;
1949
- zone: string;
1950
- zoneHash: string;
1951
- salt: string;
1952
- conduitKey: string;
1953
- totalOriginalConsiderationItems: number;
1954
- counter: number;
1955
- };
1956
- signature: null;
1957
- };
1958
- protocol_address: string;
1959
- current_price: string;
1960
- maker: {
1961
- address: string;
1962
- profile_img_url: null;
1963
- config: null;
1964
- };
1965
- taker: null;
1966
- maker_fees: any[];
1967
- taker_fees: any[];
1968
- side: 'ask' | 'bid';
1969
- order_type: 'basic' | string;
1970
- cancelled: boolean;
1971
- finalized: boolean;
1972
- marked_invalid: boolean;
1973
- remaining_quantity: number;
1974
- maker_asset_bundle: {
1975
- assets: Array<{
1976
- id: null;
1977
- token_id: string;
1978
- num_sales: null;
1979
- background_color: null;
1980
- image_url: string | null;
1981
- image_preview_url: null;
1982
- image_thumbnail_url: null;
1983
- image_original_url: null;
1984
- animation_url: null;
1985
- animation_original_url: null;
1986
- name: string;
1987
- description: string | null;
1988
- external_link: null;
1989
- asset_contract: {
1990
- address: string;
1991
- chain_identifier: string;
1992
- schema_name: 'ERC721' | 'ERC1155' | 'NATIVE' | string;
1993
- asset_contract_type: 'non-fungible' | 'semi-fungible' | 'unknown';
1994
- };
1995
- permalink: string | null;
1996
- collection: {
1997
- collection: string;
1998
- name: string;
1999
- description: string;
2000
- image_url: string;
2001
- banner_image_url: string;
2002
- owner: string;
2003
- safelist_status: 'not_requested' | 'verified' | string;
2004
- category: string;
2005
- is_disabled: boolean;
2006
- is_nsfw: boolean;
2007
- trait_offers_enabled: boolean;
2008
- collection_offers_enabled: boolean;
2009
- opensea_url: string;
2010
- project_url: string;
2011
- wiki_url: string;
2012
- discord_url: string;
2013
- telegram_url: string;
2014
- twitter_username: string;
2015
- instagram_username: string;
2016
- contracts: Array<{
2017
- address: string;
2018
- chain: string;
2019
- }>;
2020
- } | null;
2021
- decimals: number | null;
2022
- token_metadata: null;
2023
- is_nsfw: boolean | null;
2024
- owner: {
2025
- address: string;
2026
- profile_img_url: null;
2027
- config: null;
2028
- } | null;
2029
- }>;
2030
- maker: null;
2031
- asset_contract: null;
2032
- slug: null;
2033
- name: null;
2034
- description: null;
2035
- external_link: null;
2036
- permalink: null;
2037
- seaport_sell_orders: null;
2038
- };
2039
- taker_asset_bundle: {
2040
- assets: Array<{
2041
- id: null;
2042
- token_id: string;
2043
- num_sales: null;
2044
- background_color: null;
2045
- image_url: string | null;
2046
- image_preview_url: null;
2047
- image_thumbnail_url: null;
2048
- image_original_url: null;
2049
- animation_url: null;
2050
- animation_original_url: null;
2051
- name: string;
2052
- description: string | null;
2053
- external_link: null;
2054
- asset_contract: {
2055
- address: string;
2056
- chain_identifier: string;
2057
- schema_name: 'ERC721' | 'ERC1155' | 'NATIVE' | string;
2058
- asset_contract_type: 'non-fungible' | 'semi-fungible' | 'unknown';
2059
- };
2060
- permalink: string | null;
2061
- collection: {
2062
- collection: string;
2063
- name: string;
2064
- description: string;
2065
- image_url: string;
2066
- banner_image_url: string;
2067
- owner: string;
2068
- safelist_status: 'not_requested' | 'verified' | string;
2069
- category: string;
2070
- is_disabled: boolean;
2071
- is_nsfw: boolean;
2072
- trait_offers_enabled: boolean;
2073
- collection_offers_enabled: boolean;
2074
- opensea_url: string;
2075
- project_url: string;
2076
- wiki_url: string;
2077
- discord_url: string;
2078
- telegram_url: string;
2079
- twitter_username: string;
2080
- instagram_username: string;
2081
- contracts: Array<{
2082
- address: string;
2083
- chain: string;
2084
- }>;
2085
- } | null;
2086
- decimals: number | null;
2087
- token_metadata: null;
2088
- is_nsfw: boolean | null;
2089
- owner: {
2090
- address: string;
2091
- profile_img_url: null;
2092
- config: null;
2093
- } | null;
2094
- }>;
2095
- maker: null;
2096
- asset_contract: null;
2097
- slug: null;
2098
- name: null;
2099
- description: null;
2100
- external_link: null;
2101
- permalink: null;
2102
- seaport_sell_orders: null;
2103
- };
2104
- }
2105
- export interface NFTListingResponse {
2106
- orders: NFTListingOrder[];
2107
- next: string | null;
2108
- }
2109
- export interface PrepareListingNFTResponse {
2110
- data: {
2111
- sign: {
2112
- signatureKind: string;
2113
- domain: {
2114
- name: string;
2115
- version: string;
2116
- chainId: number;
2117
- verifyingContract: string;
2118
- };
2119
- types: {
2120
- EIP712Domain: Array<{
2121
- name: string;
2122
- type: string;
2123
- }>;
2124
- OrderComponents: Array<{
2125
- name: string;
2126
- type: string;
2127
- }>;
2128
- OfferItem: Array<{
2129
- name: string;
2130
- type: string;
2131
- }>;
2132
- ConsiderationItem: Array<{
2133
- name: string;
2134
- type: string;
2135
- }>;
2136
- };
2137
- value: {
2138
- offerer: string;
2139
- zone: string;
2140
- offer: Array<{
2141
- itemType: number;
2142
- token: string;
2143
- identifierOrCriteria: string;
2144
- startAmount: string;
2145
- endAmount: string;
2146
- }>;
2147
- consideration: Array<{
2148
- itemType: number;
2149
- token: string;
2150
- identifierOrCriteria: string;
2151
- startAmount: string;
2152
- endAmount: string;
2153
- recipient: string;
2154
- }>;
2155
- orderType: number;
2156
- startTime: string;
2157
- endTime: string;
2158
- zoneHash: string;
2159
- salt: string;
2160
- conduitKey: string;
2161
- counter: string;
2162
- };
2163
- primaryType: string;
2164
- };
2165
- post: {
2166
- endpoint: string;
2167
- method: string;
2168
- body: {
2169
- order: {
2170
- kind: string;
2171
- data: {
2172
- offerer: string;
2173
- zone: string;
2174
- offer: Array<{
2175
- itemType: number;
2176
- token: string;
2177
- identifierOrCriteria: string;
2178
- startAmount: string;
2179
- endAmount: string;
2180
- }>;
2181
- consideration: Array<{
2182
- itemType: number;
2183
- token: string;
2184
- identifierOrCriteria: string;
2185
- startAmount: string;
2186
- endAmount: string;
2187
- recipient: string;
2188
- }>;
2189
- orderType: number;
2190
- startTime: string;
2191
- endTime: string;
2192
- zoneHash: string;
2193
- salt: string;
2194
- conduitKey: string;
2195
- counter: string;
2196
- };
2197
- };
2198
- };
2199
- };
2200
- };
2201
- }
2202
- export interface PrepareAcceptNFTOfferResponse {
2203
- data: {
2204
- protocol: string;
2205
- fulfillment_data: {
2206
- transaction: {
2207
- function: string;
2208
- chain: number;
2209
- to: string;
2210
- value: number;
2211
- input_data: {
2212
- advancedOrder: {
2213
- parameters: {
2214
- offerer: string;
2215
- zone: string;
2216
- zoneHash: string;
2217
- startTime: string;
2218
- endTime: string;
2219
- orderType: number;
2220
- salt: string;
2221
- conduitKey: string;
2222
- totalOriginalConsiderationItems: number;
2223
- offer: Array<{
2224
- itemType: number;
2225
- token: string;
2226
- identifierOrCriteria: string;
2227
- startAmount: string;
2228
- endAmount: string;
2229
- }>;
2230
- consideration: Array<{
2231
- itemType: number;
2232
- token: string;
2233
- identifierOrCriteria: string;
2234
- startAmount: string;
2235
- endAmount: string;
2236
- recipient: string;
2237
- }>;
2238
- counter: number;
2239
- };
2240
- numerator: string;
2241
- denominator: string;
2242
- signature: string;
2243
- extraData: string;
2244
- };
2245
- criteriaResolvers?: Array<{
2246
- orderIndex: number;
2247
- side: number;
2248
- index: number;
2249
- identifier: string;
2250
- criteriaProof: string[];
2251
- }>;
2252
- fulfillerConduitKey?: string;
2253
- recipient: string;
2254
- } | {
2255
- basicOrderParameters: {
2256
- considerationToken: string;
2257
- considerationIdentifier: string;
2258
- considerationAmount: string;
2259
- offerer: string;
2260
- zone: string;
2261
- offerToken: string;
2262
- offerIdentifier: string;
2263
- offerAmount: string;
2264
- basicOrderType: number;
2265
- startTime: string;
2266
- endTime: string;
2267
- zoneHash: string;
2268
- salt: string;
2269
- offererConduitKey: string;
2270
- fulfillerConduitKey: string;
2271
- totalOriginalAdditionalRecipients: number;
2272
- additionalRecipients: Array<{
2273
- amount: string;
2274
- recipient: string;
2275
- }>;
2276
- signature: string;
2277
- };
2278
- } | {
2279
- order: {
2280
- parameters: {
2281
- offerer: string;
2282
- zone: string;
2283
- zoneHash: string;
2284
- startTime: string;
2285
- endTime: string;
2286
- orderType: number;
2287
- salt: string;
2288
- conduitKey: string;
2289
- totalOriginalConsiderationItems: number;
2290
- offer: Array<{
2291
- itemType: number;
2292
- token: string;
2293
- identifierOrCriteria: string;
2294
- startAmount: string;
2295
- endAmount: string;
2296
- }>;
2297
- consideration: Array<{
2298
- itemType: number;
2299
- token: string;
2300
- identifierOrCriteria: string;
2301
- startAmount: string;
2302
- endAmount: string;
2303
- recipient: string;
2304
- }>;
2305
- counter: number;
2306
- };
2307
- signature: string;
2308
- };
2309
- fulfillerConduitKey?: string;
2310
- recipient: string;
2311
- } | {
2312
- orders: Array<{
2313
- parameters: {
2314
- offerer: string;
2315
- zone: string;
2316
- zoneHash: string;
2317
- startTime: string;
2318
- endTime: string;
2319
- orderType: number;
2320
- salt: string;
2321
- conduitKey: string;
2322
- totalOriginalConsiderationItems: number;
2323
- offer: Array<{
2324
- itemType: number;
2325
- token: string;
2326
- identifierOrCriteria: string;
2327
- startAmount: string;
2328
- endAmount: string;
2329
- }>;
2330
- consideration: Array<{
2331
- itemType: number;
2332
- token: string;
2333
- identifierOrCriteria: string;
2334
- startAmount: string;
2335
- endAmount: string;
2336
- recipient: string;
2337
- }>;
2338
- counter: number;
2339
- };
2340
- signature: string;
2341
- } | {
2342
- parameters: {
2343
- offerer: string;
2344
- zone: string;
2345
- zoneHash: string;
2346
- startTime: string;
2347
- endTime: string;
2348
- orderType: number;
2349
- salt: string;
2350
- conduitKey: string;
2351
- totalOriginalConsiderationItems: number;
2352
- offer: Array<{
2353
- itemType: number;
2354
- token: string;
2355
- identifierOrCriteria: string;
2356
- startAmount: string;
2357
- endAmount: string;
2358
- }>;
2359
- consideration: Array<{
2360
- itemType: number;
2361
- token: string;
2362
- identifierOrCriteria: string;
2363
- startAmount: string;
2364
- endAmount: string;
2365
- recipient: string;
2366
- }>;
2367
- counter: number;
2368
- };
2369
- numerator: string;
2370
- denominator: string;
2371
- signature: string;
2372
- extraData: string;
2373
- } | {
2374
- considerationToken: string;
2375
- considerationIdentifier: string;
2376
- considerationAmount: string;
2377
- offerer: string;
2378
- zone: string;
2379
- offerToken: string;
2380
- offerIdentifier: string;
2381
- offerAmount: string;
2382
- basicOrderType: number;
2383
- startTime: string;
2384
- endTime: string;
2385
- zoneHash: string;
2386
- salt: string;
2387
- offererConduitKey: string;
2388
- fulfillerConduitKey: string;
2389
- totalOriginalAdditionalRecipients: number;
2390
- additionalRecipients: Array<{
2391
- amount: string;
2392
- recipient: string;
2393
- }>;
2394
- signature: string;
2395
- }>;
2396
- };
2397
- };
2398
- orders: Array<{
2399
- parameters: {
2400
- offerer: string;
2401
- zone: string;
2402
- zoneHash: string;
2403
- startTime: string;
2404
- endTime: string;
2405
- orderType: number;
2406
- salt: string;
2407
- conduitKey: string;
2408
- totalOriginalConsiderationItems: number;
2409
- offer: Array<{
2410
- itemType: number;
2411
- token: string;
2412
- identifierOrCriteria: string;
2413
- startAmount: string;
2414
- endAmount: string;
2415
- }>;
2416
- consideration: Array<{
2417
- itemType: number;
2418
- token: string;
2419
- identifierOrCriteria: string;
2420
- startAmount: string;
2421
- endAmount: string;
2422
- recipient: string;
2423
- }>;
2424
- counter: number;
2425
- };
2426
- signature: string;
2427
- }>;
2428
- };
2429
- };
2430
- }
2431
- export interface CreateListingNFTOfferResponse {
2432
- order: {
2433
- created_date: string;
2434
- closing_date: string;
2435
- listing_time: number;
2436
- expiration_time: number;
2437
- order_hash: string;
2438
- protocol_data: {
2439
- parameters: {
2440
- offerer: string;
2441
- offer: Array<{
2442
- itemType: number;
2443
- token: string;
2444
- identifierOrCriteria: string;
2445
- startAmount: string;
2446
- endAmount: string;
2447
- }>;
2448
- consideration: Array<{
2449
- itemType: number;
2450
- token: string;
2451
- identifierOrCriteria: string;
2452
- startAmount: string;
2453
- endAmount: string;
2454
- recipient: string;
2455
- }>;
2456
- startTime: string;
2457
- endTime: string;
2458
- orderType: number;
2459
- zone: string;
2460
- zoneHash: string;
2461
- salt: string;
2462
- conduitKey: string;
2463
- totalOriginalConsiderationItems: number;
2464
- counter: number;
2465
- };
2466
- signature: null;
2467
- };
2468
- protocol_address: string;
2469
- current_price: string;
2470
- maker: {
2471
- address: string;
2472
- profile_img_url: null;
2473
- config: null;
2474
- };
2475
- taker: null;
2476
- maker_fees: any[];
2477
- taker_fees: any[];
2478
- side: 'ask' | 'bid';
2479
- order_type: 'basic' | string;
2480
- cancelled: boolean;
2481
- finalized: boolean;
2482
- marked_invalid: boolean;
2483
- remaining_quantity: number;
2484
- maker_asset_bundle: {
2485
- assets: Array<{
2486
- id: null;
2487
- token_id: string;
2488
- num_sales: null;
2489
- background_color: null;
2490
- image_url: string | null;
2491
- image_preview_url: null;
2492
- image_thumbnail_url: null;
2493
- image_original_url: null;
2494
- animation_url: null;
2495
- animation_original_url: null;
2496
- name: string;
2497
- description: string | null;
2498
- external_link: null;
2499
- asset_contract: {
2500
- address: string;
2501
- chain_identifier: string;
2502
- schema_name: 'ERC721' | 'ERC1155' | 'NATIVE' | string;
2503
- asset_contract_type: 'non-fungible' | 'semi-fungible' | 'unknown';
2504
- };
2505
- permalink: string | null;
2506
- collection: {
2507
- collection: string;
2508
- name: string;
2509
- description: string;
2510
- image_url: string;
2511
- banner_image_url: string;
2512
- owner: string;
2513
- safelist_status: 'not_requested' | 'verified' | string;
2514
- category: string;
2515
- is_disabled: boolean;
2516
- is_nsfw: boolean;
2517
- trait_offers_enabled: boolean;
2518
- collection_offers_enabled: boolean;
2519
- opensea_url: string;
2520
- project_url: string;
2521
- wiki_url: string;
2522
- discord_url: string;
2523
- telegram_url: string;
2524
- twitter_username: string;
2525
- instagram_username: string;
2526
- contracts: Array<{
2527
- address: string;
2528
- chain: string;
2529
- }>;
2530
- } | null;
2531
- decimals: number | null;
2532
- token_metadata: null;
2533
- is_nsfw: boolean | null;
2534
- owner: {
2535
- address: string;
2536
- profile_img_url: null;
2537
- config: null;
2538
- } | null;
2539
- }>;
2540
- maker: null;
2541
- asset_contract: null;
2542
- slug: null;
2543
- name: null;
2544
- description: null;
2545
- external_link: null;
2546
- permalink: null;
2547
- seaport_sell_orders: null;
2548
- };
2549
- taker_asset_bundle: {
2550
- assets: Array<{
2551
- id: null;
2552
- token_id: string;
2553
- num_sales: null;
2554
- background_color: null;
2555
- image_url: null;
2556
- image_preview_url: null;
2557
- image_thumbnail_url: null;
2558
- image_original_url: null;
2559
- animation_url: null;
2560
- animation_original_url: null;
2561
- name: string;
2562
- description: null;
2563
- external_link: null;
2564
- asset_contract: {
2565
- address: string;
2566
- chain_identifier: string;
2567
- schema_name: 'NATIVE' | string;
2568
- asset_contract_type: 'unknown';
2569
- };
2570
- permalink: null;
2571
- collection: null;
2572
- decimals: number;
2573
- token_metadata: null;
2574
- is_nsfw: null;
2575
- owner: null;
2576
- }>;
2577
- maker: null;
2578
- asset_contract: null;
2579
- slug: null;
2580
- name: null;
2581
- description: null;
2582
- external_link: null;
2583
- permalink: null;
2584
- seaport_sell_orders: null;
2585
- };
2586
- };
2587
- }
2588
- export {};
1
+ import { CHAINS_ENUM } from '@debank/common';
2
+ export interface Chain {
3
+ id: number;
4
+ name: string;
5
+ hex: string;
6
+ logo: string;
7
+ enum: CHAINS_ENUM;
8
+ serverId: string;
9
+ network: string;
10
+ nativeTokenSymbol: string;
11
+ whiteLogo?: string;
12
+ nativeTokenLogo: string;
13
+ nativeTokenAddress: string;
14
+ scanLink: string;
15
+ nativeTokenDecimals: number;
16
+ selectChainLogo?: string;
17
+ eip: Record<string, boolean>;
18
+ }
19
+ export interface ServerChain {
20
+ id: string;
21
+ community_id: number;
22
+ name: string;
23
+ native_token_id: string;
24
+ logo_url: string;
25
+ wrapped_token_id: string;
26
+ symbol: string;
27
+ is_support_history: boolean;
28
+ born_at: number | null;
29
+ }
30
+ export interface ChainWithBalance extends ServerChain {
31
+ usd_value: number;
32
+ }
33
+ export interface ChainWithPendingCount extends ServerChain {
34
+ pending_tx_count: number;
35
+ }
36
+ export declare type SecurityCheckDecision = 'pass' | 'warning' | 'danger' | 'forbidden' | 'loading' | 'pending';
37
+ export interface SecurityCheckItem {
38
+ alert: string;
39
+ description: string;
40
+ is_alert: boolean;
41
+ decision: SecurityCheckDecision;
42
+ id: number;
43
+ }
44
+ export interface SecurityCheckResponse {
45
+ decision: SecurityCheckDecision;
46
+ alert: string;
47
+ danger_list: SecurityCheckItem[];
48
+ warning_list: SecurityCheckItem[];
49
+ forbidden_list: SecurityCheckItem[];
50
+ forbidden_count: number;
51
+ warning_count: number;
52
+ danger_count: number;
53
+ alert_count: number;
54
+ trace_id: string;
55
+ error?: {
56
+ code: number;
57
+ msg: string;
58
+ } | null;
59
+ }
60
+ export interface Tx {
61
+ chainId: number;
62
+ data: string;
63
+ from: string;
64
+ gas?: string;
65
+ gasLimit?: string;
66
+ maxFeePerGas?: string;
67
+ maxPriorityFeePerGas?: string;
68
+ gasPrice?: string;
69
+ nonce: string;
70
+ to: string;
71
+ value: string;
72
+ r?: string;
73
+ s?: string;
74
+ v?: string;
75
+ }
76
+ export interface CopyTradeTokenItem extends TokenItem {
77
+ fdv: number | null;
78
+ buy_amount_24h: number;
79
+ buy_usd_value_24h: number;
80
+ price_curve_24h: {
81
+ time_at: number;
82
+ price: number;
83
+ }[];
84
+ create_at: number;
85
+ }
86
+ export interface CopyTradeTokenListResponse {
87
+ token_list: CopyTradeTokenItem[];
88
+ }
89
+ export interface CopyTradeTokenItemV2 extends CopyTradeTokenItem {
90
+ buy_address_count: number;
91
+ token_create_at: number;
92
+ liquidity: number;
93
+ buy_amount: number;
94
+ buy_usd_value: number;
95
+ pnl_usd_value: number;
96
+ price_change: number;
97
+ }
98
+ export interface CopyTradeTokenListV2Response {
99
+ token_list: CopyTradeTokenItemV2[];
100
+ pagination: {
101
+ limit: number;
102
+ has_next: boolean;
103
+ next_cursor: string;
104
+ };
105
+ }
106
+ export interface CopyTradeSameToken extends TokenItem {
107
+ liquidity: number;
108
+ }
109
+ export interface CopyTradeRecentBuyItem {
110
+ id: string;
111
+ user_addr: string;
112
+ user_addr_pnl: {
113
+ id: string;
114
+ profit_usd_value: number;
115
+ };
116
+ chain_id: string;
117
+ token_id: string;
118
+ token_amount: number;
119
+ action: string;
120
+ buy_usd_value: number;
121
+ create_at: number;
122
+ }
123
+ export interface CopyTradeRecentBuyListResponse {
124
+ recent_buy_list: CopyTradeRecentBuyItem[];
125
+ total: number;
126
+ }
127
+ export interface CopyTradeRecentBuyItemV2 {
128
+ user_addr: string;
129
+ current_balance: number;
130
+ buy_usd_value: number;
131
+ buy_amount: number;
132
+ buy_price: number;
133
+ sell_usd_value: number;
134
+ sell_amount: number;
135
+ sell_price: number;
136
+ pnl_usd_value: number;
137
+ realized_pnl_usd_value: number;
138
+ unrealized_pnl_usd_value: number;
139
+ last_buy_at: string;
140
+ }
141
+ export interface CopyTradeRecentBuyListV2Response {
142
+ recent_buy_list: CopyTradeRecentBuyItemV2[];
143
+ pagination: {
144
+ limit: number;
145
+ has_next: boolean;
146
+ next_cursor: string;
147
+ };
148
+ }
149
+ export interface CopyTradePnlItem extends TokenItem {
150
+ profit_usd_value: number;
151
+ protocol_id?: string;
152
+ }
153
+ export interface CopyTradePnlListResponse {
154
+ pnl_list: CopyTradePnlItem[];
155
+ }
156
+ export interface Eip1559Tx {
157
+ chainId: number;
158
+ data: string;
159
+ from: string;
160
+ gas: string;
161
+ maxFeePerGas: string;
162
+ maxPriorityFeePerGas: string;
163
+ nonce: string;
164
+ to: string;
165
+ value: string;
166
+ r?: string;
167
+ s?: string;
168
+ v?: string;
169
+ }
170
+ export interface TotalBalanceResponse {
171
+ total_usd_value: number;
172
+ chain_list: ChainWithBalance[];
173
+ error_code?: number;
174
+ err_chain_ids?: string[];
175
+ }
176
+ export interface TokenEntityDetail {
177
+ id: string;
178
+ chain: string;
179
+ token_id: string;
180
+ symbol: string;
181
+ domain_id: string;
182
+ fdv: number;
183
+ is_domain_verified: boolean;
184
+ relate_domain_ids: string[];
185
+ cmc_id: string;
186
+ coingecko_id: string;
187
+ bridge_ids: string[];
188
+ origin_token?: TokenItem;
189
+ tag_ids?: string[];
190
+ listed_sites: {
191
+ name: string;
192
+ url: string;
193
+ logo_url: string;
194
+ }[];
195
+ cex_list: {
196
+ id: string;
197
+ site_url: string;
198
+ name: string;
199
+ logo_url: string;
200
+ }[];
201
+ }
202
+ export interface TokenItem {
203
+ content_type?: 'image' | 'image_url' | 'video_url' | 'audio_url' | undefined;
204
+ content?: string | undefined;
205
+ inner_id?: any;
206
+ amount: number;
207
+ chain: string;
208
+ decimals: number;
209
+ display_symbol: string | null;
210
+ id: string;
211
+ is_core: boolean | null;
212
+ credit_score?: number;
213
+ is_verified: boolean | null;
214
+ is_wallet: boolean;
215
+ is_scam?: boolean;
216
+ is_infinity?: boolean;
217
+ is_suspicious?: boolean;
218
+ logo_url: string;
219
+ name: string;
220
+ optimized_symbol: string;
221
+ price: number;
222
+ symbol: string;
223
+ time_at: number;
224
+ usd_value?: number;
225
+ raw_amount?: string;
226
+ raw_amount_hex_str?: string;
227
+ protocol_id?: string;
228
+ price_24h_change?: number | null;
229
+ low_credit_score?: boolean;
230
+ cex_ids?: string[];
231
+ fdv?: number | null;
232
+ support_market_data?: boolean;
233
+ }
234
+ export interface TokenItemWithEntity extends TokenItem {
235
+ identity?: TokenEntityDetail;
236
+ }
237
+ export interface TransferingNFTItem {
238
+ chain: string;
239
+ collection: {
240
+ id: string;
241
+ name: string;
242
+ create_at: number;
243
+ chains: string[];
244
+ is_suspicious?: boolean;
245
+ is_verified?: boolean;
246
+ floor_price?: number | null;
247
+ };
248
+ content: string;
249
+ content_type: NFTItem['content_type'];
250
+ contract_id: string;
251
+ description: string | null;
252
+ detail_url: string;
253
+ id: string;
254
+ inner_id: string;
255
+ name: string;
256
+ total_supply: number;
257
+ amount: number;
258
+ }
259
+ export interface NFTApprovalResponse {
260
+ tokens: NFTApproval[];
261
+ contracts: NFTApprovalContract[];
262
+ total: string;
263
+ }
264
+ export interface NFTApprovalContract {
265
+ chain: string;
266
+ contract_name: string;
267
+ contract_id: string;
268
+ amount: string;
269
+ spender: Spender;
270
+ is_erc721: boolean;
271
+ is_erc1155: boolean;
272
+ }
273
+ export interface NFTApprovalSpender {
274
+ id: string;
275
+ protocol: {
276
+ id: string;
277
+ name: string;
278
+ logo_url: string;
279
+ chain: string;
280
+ } | null;
281
+ }
282
+ export interface NFTApproval {
283
+ id: string;
284
+ contract_id: string;
285
+ inner_id: string;
286
+ chain: string;
287
+ name: null;
288
+ symbol: string;
289
+ description: null;
290
+ content_type: 'image' | 'image_url' | 'video_url' | 'audio_url' | undefined;
291
+ content: string;
292
+ total_supply: number;
293
+ detail_url: string;
294
+ contract_name: string;
295
+ is_erc721: boolean;
296
+ is_erc1155: boolean;
297
+ amount: string;
298
+ spender: Spender;
299
+ }
300
+ export interface TokenApproval<SpenderType extends Spender = Spender> {
301
+ id: string;
302
+ name: string;
303
+ symbol: string;
304
+ logo_url: string;
305
+ chain: string;
306
+ price: number;
307
+ balance: number;
308
+ spenders: SpenderType[];
309
+ sum_exposure_usd: number;
310
+ /** @deprecated */
311
+ exposure_balance?: number;
312
+ }
313
+ export interface Spender {
314
+ id: string;
315
+ permit2_id?: string;
316
+ value: number;
317
+ exposure_usd: number;
318
+ protocol: {
319
+ id: string;
320
+ name: string;
321
+ logo_url: string;
322
+ chain: string;
323
+ };
324
+ /** @deprecated */
325
+ is_contract?: boolean;
326
+ /** @deprecated */
327
+ is_open_source?: boolean;
328
+ /** @deprecated */
329
+ is_hacked?: boolean;
330
+ /** @deprecated */
331
+ is_abandoned?: boolean;
332
+ risk_alert: string;
333
+ risk_level: string;
334
+ exposure_nft_usd_value?: number | null;
335
+ exposure_usd_value?: number | null;
336
+ spend_usd_value?: number | null;
337
+ approve_user_count?: number | null;
338
+ revoke_user_count?: number | null;
339
+ last_approve_at: number | null;
340
+ }
341
+ export interface AssetItem {
342
+ id: string;
343
+ chain: string;
344
+ name: string;
345
+ site_url: string;
346
+ logo_url: string;
347
+ has_supported_portfolio: boolean;
348
+ tvl: number;
349
+ net_usd_value: number;
350
+ asset_usd_value: number;
351
+ debt_usd_value: number;
352
+ }
353
+ export interface NFTCollection {
354
+ create_at: string;
355
+ id: string;
356
+ is_core: boolean;
357
+ name: string;
358
+ price: number;
359
+ chain: string;
360
+ tokens: NFTItem[];
361
+ floor_price: number;
362
+ is_scam: boolean;
363
+ is_suspicious: boolean;
364
+ is_verified: boolean;
365
+ }
366
+ export interface UserCollection {
367
+ collection: Collection;
368
+ list: NFTItem[];
369
+ }
370
+ export interface NFTItem {
371
+ chain: string;
372
+ id: string;
373
+ contract_id: string;
374
+ inner_id: string;
375
+ token_id?: string;
376
+ name: string;
377
+ contract_name: string;
378
+ description: string;
379
+ usd_price?: number;
380
+ amount: number;
381
+ collection_id?: string;
382
+ collection_name?: string;
383
+ is_core?: boolean;
384
+ pay_token?: {
385
+ id: string;
386
+ name: string;
387
+ symbol: string;
388
+ amount: number;
389
+ logo_url: string;
390
+ time_at: number;
391
+ date_at?: string;
392
+ price?: number;
393
+ };
394
+ content_type: 'image' | 'image_url' | 'video_url' | 'audio_url';
395
+ content: string;
396
+ detail_url: string;
397
+ total_supply?: string;
398
+ collection?: Collection | null;
399
+ is_erc1155?: boolean;
400
+ is_erc721: boolean;
401
+ thumbnail_url?: string;
402
+ }
403
+ export interface Collection {
404
+ id: string;
405
+ name: string;
406
+ description: null | string;
407
+ logo_url: string;
408
+ is_core: boolean;
409
+ is_suspicious?: boolean;
410
+ is_verified?: boolean;
411
+ contract_uuids: string[];
412
+ create_at: number;
413
+ floor_price: number;
414
+ is_scam: boolean;
415
+ opensea_floor_price?: {
416
+ price: number;
417
+ token: {
418
+ id: string;
419
+ symbol: string;
420
+ decimals: number;
421
+ price: number;
422
+ };
423
+ };
424
+ is_tradable?: boolean;
425
+ is_erc721?: boolean;
426
+ is_erc1155?: boolean;
427
+ }
428
+ export interface CollectionList {
429
+ id: string;
430
+ chain: string;
431
+ name: string;
432
+ description: string;
433
+ logo_url: string;
434
+ is_verified: boolean;
435
+ credit_score: number;
436
+ receive_addr_count: number;
437
+ is_scam: boolean;
438
+ is_suspicious: boolean;
439
+ is_core: boolean;
440
+ floor_price: number;
441
+ nft_list: NFTItem[];
442
+ native_token: TokenItem;
443
+ is_hidden?: boolean;
444
+ is_tradable?: boolean;
445
+ }
446
+ export interface TxDisplayItem extends TxHistoryItem {
447
+ projectDict: TxHistoryResult['project_dict'];
448
+ cateDict: TxHistoryResult['cate_dict'];
449
+ tokenDict: TxHistoryResult['token_dict'];
450
+ }
451
+ export interface TxHistoryItem {
452
+ cate_id: string | null;
453
+ chain: string;
454
+ debt_liquidated: null;
455
+ id: string;
456
+ is_scam: boolean;
457
+ other_addr: string;
458
+ project_id: null | string;
459
+ receives: {
460
+ amount: number;
461
+ from_addr: string;
462
+ token_id: string;
463
+ price?: number;
464
+ }[];
465
+ sends: {
466
+ amount: number;
467
+ to_addr: string;
468
+ token_id: string;
469
+ price?: number;
470
+ }[];
471
+ time_at: number;
472
+ token_approve: {
473
+ spender: string;
474
+ token_id: string;
475
+ value: number;
476
+ price?: number;
477
+ } | null;
478
+ tx: {
479
+ eth_gas_fee: number;
480
+ from_addr: string;
481
+ name: string;
482
+ params: any[];
483
+ status: number;
484
+ to_addr: string;
485
+ usd_gas_fee: number;
486
+ value: number;
487
+ message: string | null;
488
+ } | null;
489
+ }
490
+ export interface TxHistoryResult {
491
+ cate_dict: Record<string, {
492
+ id: string;
493
+ name: string;
494
+ }>;
495
+ history_list: TxHistoryItem[];
496
+ project_dict: Record<string, {
497
+ chain: string;
498
+ id: string;
499
+ logo_url: string;
500
+ name: string;
501
+ }>;
502
+ token_dict: Record<string, TokenItem>;
503
+ }
504
+ export interface TxAllHistoryResult extends Omit<TxHistoryResult, 'token_dict'> {
505
+ token_uuid_dict: Record<string, TokenItem>;
506
+ project_dict: TxHistoryResult['project_dict'];
507
+ }
508
+ export interface GasResult {
509
+ estimated_gas_cost_usd_value: number;
510
+ estimated_gas_cost_value: number;
511
+ estimated_gas_used: number;
512
+ estimated_seconds: number;
513
+ front_tx_count: number;
514
+ max_gas_cost_usd_value: number;
515
+ max_gas_cost_value: number;
516
+ fail?: boolean;
517
+ }
518
+ export interface GasLevel {
519
+ level: string;
520
+ price: number;
521
+ front_tx_count: number;
522
+ estimated_seconds: number;
523
+ priority_price: number | null;
524
+ base_fee: number;
525
+ }
526
+ export interface BalanceChange<T = TokenItem, N = TransferingNFTItem> {
527
+ error?: {
528
+ code: number;
529
+ msg: string;
530
+ } | null;
531
+ receive_nft_list: N[];
532
+ receive_token_list: T[];
533
+ send_nft_list: N[];
534
+ send_token_list: T[];
535
+ success: boolean;
536
+ usd_value_change: number;
537
+ }
538
+ interface NFTContractItem {
539
+ id: string;
540
+ chain: string;
541
+ name: string;
542
+ symbol: string;
543
+ is_core: boolean;
544
+ time_at: number;
545
+ collection: {
546
+ id: string;
547
+ name: string;
548
+ create_at: number;
549
+ };
550
+ }
551
+ export interface ExplainTxResponse {
552
+ pre_exec_version: 'v0' | 'v1' | 'v2';
553
+ abi?: {
554
+ func: string;
555
+ params: Array<string[] | number | string>;
556
+ };
557
+ abi_str?: string;
558
+ balance_change: BalanceChange;
559
+ gas: {
560
+ success?: boolean;
561
+ error?: {
562
+ code: number;
563
+ msg: string;
564
+ } | null;
565
+ gas_used: number;
566
+ gas_ratio: number;
567
+ gas_limit: number;
568
+ estimated_gas_cost_usd_value: number;
569
+ estimated_gas_cost_value: number;
570
+ estimated_gas_used: number;
571
+ estimated_seconds: number;
572
+ };
573
+ native_token: TokenItem;
574
+ pre_exec: {
575
+ success: boolean;
576
+ error?: {
577
+ code: number;
578
+ msg: string;
579
+ } | null;
580
+ };
581
+ trace_id: string;
582
+ recommend: {
583
+ gas: string;
584
+ nonce: string;
585
+ };
586
+ support_balance_change: true;
587
+ type_call?: {
588
+ action: string;
589
+ contract: string;
590
+ contract_protocol_logo_url: string;
591
+ contract_protocol_name: string;
592
+ };
593
+ type_send?: {
594
+ to_addr: string;
595
+ token_symbol: string;
596
+ token_amount: number;
597
+ token: TokenItem;
598
+ };
599
+ type_token_approval?: {
600
+ spender: string;
601
+ spender_protocol_logo_url: string;
602
+ spender_protocol_name: string;
603
+ token_symbol: string;
604
+ token_amount: number;
605
+ is_infinity: boolean;
606
+ token: TokenItem;
607
+ };
608
+ type_cancel_token_approval?: {
609
+ spender: string;
610
+ spender_protocol_logo_url: string;
611
+ spender_protocol_name: string;
612
+ token_symbol: string;
613
+ };
614
+ type_cancel_tx?: any;
615
+ type_deploy_contract?: any;
616
+ is_gnosis?: boolean;
617
+ gnosis?: ExplainTxResponse;
618
+ type_cancel_single_nft_approval?: {
619
+ spender: string;
620
+ spender_protocol_name: null;
621
+ spender_protocol_logo_url: string;
622
+ token_symbol: null;
623
+ is_nft: boolean;
624
+ nft: NFTItem;
625
+ };
626
+ type_cancel_nft_collection_approval?: {
627
+ spender: string;
628
+ spender_protocol_name: string;
629
+ spender_protocol_logo_url: string;
630
+ token_symbol: string;
631
+ is_nft: boolean;
632
+ nft_contract: NFTContractItem;
633
+ token: TokenItem;
634
+ };
635
+ type_nft_collection_approval?: {
636
+ spender: string;
637
+ spender_protocol_name: string;
638
+ spender_protocol_logo_url: string;
639
+ token_symbol: string;
640
+ is_nft: boolean;
641
+ nft_contract: NFTContractItem;
642
+ token: TokenItem;
643
+ token_amount: number;
644
+ is_infinity: boolean;
645
+ };
646
+ type_single_nft_approval?: {
647
+ spender: string;
648
+ spender_protocol_name: string;
649
+ spender_protocol_logo_url: string;
650
+ token_symbol: string;
651
+ is_nft: boolean;
652
+ nft: NFTItem;
653
+ token: TokenItem;
654
+ token_amount: number;
655
+ is_infinity: boolean;
656
+ };
657
+ type_nft_send?: {
658
+ spender: string;
659
+ spender_protocol_name: null;
660
+ spender_protocol_logo_url: string;
661
+ token_symbol: string;
662
+ token_amount: number;
663
+ is_infinity: boolean;
664
+ is_nft: boolean;
665
+ nft: NFTItem;
666
+ };
667
+ type_list_nft?: {
668
+ action: string;
669
+ contract: string;
670
+ contract_protocol_logo_url: string;
671
+ contract_protocol_name: string;
672
+ offerer: string;
673
+ total_usd_value: number;
674
+ offer_list: {
675
+ item_type: number;
676
+ amount: number;
677
+ nft: NFTItem;
678
+ }[];
679
+ buyer_list: {
680
+ id: string;
681
+ }[];
682
+ };
683
+ }
684
+ export interface LatestExplainTxResponse {
685
+ id: string;
686
+ tx_id: string;
687
+ block_height: number;
688
+ gas_used: number;
689
+ pre_exec_result: PreExecResult;
690
+ create_at: number;
691
+ }
692
+ export interface RPCResponse<T> {
693
+ result: T;
694
+ id: number;
695
+ jsonrpc: string;
696
+ error?: {
697
+ code: number;
698
+ message: string;
699
+ };
700
+ }
701
+ export interface GetTxResponse {
702
+ blockHash: string;
703
+ blockNumber: string;
704
+ from: string;
705
+ gas: string;
706
+ gasPrice: string;
707
+ hash: string;
708
+ input: string;
709
+ nonce: string;
710
+ to: string;
711
+ transactionIndex: string;
712
+ value: string;
713
+ type: string;
714
+ v: string;
715
+ r: string;
716
+ s: string;
717
+ front_tx_count: number;
718
+ code: 0 | -1;
719
+ status: -1 | 0 | 1;
720
+ gas_used: number;
721
+ token: TokenItem;
722
+ }
723
+ export interface ApprovalStatus {
724
+ chain: string;
725
+ token_approval_danger_cnt: number;
726
+ nft_approval_danger_cnt: number;
727
+ }
728
+ export interface UsedChain {
729
+ id: string;
730
+ community_id: number;
731
+ name: string;
732
+ native_token_id: string;
733
+ logo_url: string;
734
+ wrapped_token_id: string;
735
+ }
736
+ export interface ProjectItem {
737
+ id: string;
738
+ name: string;
739
+ site_url: string;
740
+ logo_url: string;
741
+ }
742
+ export interface PoolItem {
743
+ id: string;
744
+ chain: string;
745
+ project_id: string;
746
+ adapter_id: string;
747
+ controller: string;
748
+ time_at: number;
749
+ index?: number;
750
+ }
751
+ export interface PortfolioItemToken extends TokenItem {
752
+ claimable_amount?: number;
753
+ }
754
+ export declare type NftCollection = {
755
+ chain_id: string;
756
+ id: string;
757
+ name: string;
758
+ symbol?: string;
759
+ logo_url: string;
760
+ is_core: boolean;
761
+ amount?: number;
762
+ floor_price_token?: PortfolioItemToken;
763
+ };
764
+ export declare type PortfolioItemNft = {
765
+ id: string;
766
+ contract_id: string;
767
+ inner_id: string;
768
+ name: string;
769
+ content_url: string;
770
+ thumbnail_url: string;
771
+ collection: NftCollection;
772
+ amount: number;
773
+ };
774
+ export interface PortfolioItemDetail {
775
+ supply_token_list?: PortfolioItemToken[];
776
+ borrow_token_list?: PortfolioItemToken[];
777
+ health_rate?: number;
778
+ reward_token_list?: PortfolioItemToken[];
779
+ collateral_token_list?: PortfolioItemToken[];
780
+ token_list?: PortfolioItemToken[];
781
+ base_token?: PortfolioItemToken;
782
+ position_token?: PortfolioItemToken;
783
+ description?: string;
784
+ token?: PortfolioItemToken;
785
+ underlying_token?: PortfolioItemToken;
786
+ strike_token?: PortfolioItemToken;
787
+ quote_token?: PortfolioItemToken;
788
+ margin_token?: PortfolioItemToken;
789
+ supply_nft_list?: PortfolioItemNft[];
790
+ nft_list?: PortfolioItemNft[];
791
+ collection?: NftCollection;
792
+ share_token?: PortfolioItemToken;
793
+ exercise_end_at?: number;
794
+ type?: string;
795
+ side?: number;
796
+ leverage?: number;
797
+ expired_at: number;
798
+ end_at: number;
799
+ unlock_at: number;
800
+ debt_ratio?: number;
801
+ usd_value?: number;
802
+ daily_unlock_amount: number;
803
+ pnl_usd_value: number;
804
+ amount?: number;
805
+ price?: number;
806
+ name?: string;
807
+ }
808
+ export interface PortfolioItem {
809
+ asset_token_list: TokenItem[];
810
+ stats: {
811
+ asset_usd_value: number;
812
+ debt_usd_value: number;
813
+ net_usd_value: number;
814
+ };
815
+ asset_dict: Record<string, number>;
816
+ update_at: number;
817
+ name: string;
818
+ detail_types: string[];
819
+ detail: PortfolioItemDetail;
820
+ proxy_detail: {
821
+ project: ProjectItem;
822
+ proxy_contract_id: string;
823
+ };
824
+ pool: PoolItem;
825
+ position_index: string;
826
+ withdraw_actions?: WithdrawAction[];
827
+ }
828
+ export interface WithdrawAction {
829
+ type: 'withdraw' | 'claim' | 'queue';
830
+ contract_id: string;
831
+ func: string;
832
+ params?: string[];
833
+ str_params?: string[];
834
+ need_approve: {
835
+ token_id?: string;
836
+ to?: string;
837
+ raw_amount?: number;
838
+ str_raw_amount?: string;
839
+ };
840
+ }
841
+ export interface Protocol {
842
+ chain: string;
843
+ dao_id: null | string;
844
+ has_supported_portfolio: boolean;
845
+ id: string;
846
+ is_tvl: boolean;
847
+ logo_url: string;
848
+ name: string;
849
+ platform_token_id: string;
850
+ site_url: string;
851
+ tag_ids: string[];
852
+ tvl: number;
853
+ }
854
+ export interface ComplexProtocol {
855
+ id: string;
856
+ chain: string;
857
+ name: string;
858
+ site_url: string;
859
+ logo_url: string;
860
+ has_supported_portfolio: boolean;
861
+ tvl: number;
862
+ portfolio_item_list: PortfolioItem[];
863
+ }
864
+ export interface ExplainTypedDataResponse {
865
+ type_list_nft?: ExplainTxResponse['type_list_nft'];
866
+ type_token_approval?: ExplainTxResponse['type_token_approval'];
867
+ type_common_sign?: {
868
+ contract: string;
869
+ contract_protocol_logo_url?: string;
870
+ contract_protocol_name?: string;
871
+ };
872
+ }
873
+ export interface CEXQuote {
874
+ pay_token: TokenItem;
875
+ receive_token: TokenItem;
876
+ }
877
+ export interface SwapItem {
878
+ chain: string;
879
+ tx_id: string;
880
+ create_at: number;
881
+ finished_at: number;
882
+ status: 'Pending' | 'Completed' | 'Finished';
883
+ dex_id: string;
884
+ pay_token: TokenItem;
885
+ receive_token: TokenItem;
886
+ gas: {
887
+ native_token: TokenItem;
888
+ native_gas_fee: number;
889
+ usd_gas_fee: number;
890
+ gas_price: number;
891
+ };
892
+ quote: {
893
+ pay_token_amount: number;
894
+ receive_token_amount: number;
895
+ slippage: number;
896
+ };
897
+ actual: {
898
+ pay_token_amount: number;
899
+ receive_token_amount: number;
900
+ slippage: number;
901
+ };
902
+ }
903
+ export interface SwapTradeList {
904
+ history_list: SwapItem[];
905
+ total_cnt: number;
906
+ }
907
+ export interface SlippageStatus {
908
+ is_valid: boolean;
909
+ suggest_slippage: number;
910
+ }
911
+ export interface SummaryToken {
912
+ id: string;
913
+ chain: string;
914
+ name: string;
915
+ symbol: string;
916
+ display_symbol?: string;
917
+ optimized_symbol: string;
918
+ decimals: number;
919
+ logo_url?: string;
920
+ protocol_id: string;
921
+ price: number;
922
+ is_verified: boolean;
923
+ is_core: boolean;
924
+ is_wallet: boolean;
925
+ time_at?: number;
926
+ amount: number;
927
+ }
928
+ export interface SummaryCoin {
929
+ id: string;
930
+ symbol: string;
931
+ logo_url: string;
932
+ parent_coin_id?: string;
933
+ token_uuids: string[];
934
+ peg_token_uuids: string[];
935
+ circulating_supply: number;
936
+ total_supply: number;
937
+ price: number;
938
+ amount: number;
939
+ }
940
+ export interface Summary {
941
+ token_list: SummaryToken[];
942
+ coin_list: SummaryCoin[];
943
+ }
944
+ export interface Cex {
945
+ id: string;
946
+ logo_url: string;
947
+ name: string;
948
+ is_deposit: boolean;
949
+ }
950
+ export interface ContractCredit {
951
+ value: null | number;
952
+ rank_at: number | null;
953
+ }
954
+ export interface ContractDesc {
955
+ multisig?: {
956
+ id: string;
957
+ logo_url: string;
958
+ name: string;
959
+ };
960
+ create_at: number;
961
+ is_danger?: boolean | null;
962
+ }
963
+ export interface AddrDescResponse {
964
+ desc: {
965
+ cex?: Cex;
966
+ contract?: Record<string, ContractDesc>;
967
+ usd_value: number;
968
+ protocol?: Record<string, {
969
+ id: string;
970
+ logo_url: string;
971
+ name: string;
972
+ }>;
973
+ born_at: number;
974
+ is_danger: boolean | null;
975
+ is_spam: boolean | null;
976
+ is_scam: boolean | null;
977
+ name: string;
978
+ id: string;
979
+ };
980
+ }
981
+ export interface SendAction {
982
+ to: string;
983
+ token: TokenItem;
984
+ }
985
+ export interface RevokeTokenApproveAction {
986
+ spender: string;
987
+ token: TokenItem;
988
+ }
989
+ export interface WrapTokenAction {
990
+ pay_token: TokenItem;
991
+ receive_token: SwapReceiveToken;
992
+ receiver: string;
993
+ }
994
+ export interface UnWrapTokenAction {
995
+ pay_token: TokenItem;
996
+ receive_token: SwapReceiveToken;
997
+ receiver: string;
998
+ }
999
+ export interface ApproveAction {
1000
+ spender: string;
1001
+ token: TokenItem;
1002
+ }
1003
+ export interface SwapReceiveToken extends TokenItem {
1004
+ min_amount: number;
1005
+ min_raw_amount: string;
1006
+ }
1007
+ export interface CrossSwapAction {
1008
+ pay_token: TokenItem;
1009
+ receive_token: SwapReceiveToken;
1010
+ receiver: string;
1011
+ }
1012
+ export interface CrossTokenAction {
1013
+ pay_token: TokenItem;
1014
+ receive_token: SwapReceiveToken;
1015
+ receiver: string;
1016
+ }
1017
+ export interface RevokePermit2Action {
1018
+ spender: string;
1019
+ token: TokenItem;
1020
+ }
1021
+ export interface SwapOrderAction {
1022
+ pay_token_list: TokenItem[];
1023
+ pay_nft_list: NFTItem[];
1024
+ takers: string[];
1025
+ receive_token_list: TokenItem[];
1026
+ receive_nft_list: NFTItem[];
1027
+ receiver: string | null;
1028
+ expire_at: string | null;
1029
+ }
1030
+ export interface MaxPayTokenItem extends TokenItem {
1031
+ max_amount: number;
1032
+ max_raw_amount: string;
1033
+ }
1034
+ export interface SwapLimitPay {
1035
+ pay_token: MaxPayTokenItem;
1036
+ receive_token: TokenItem;
1037
+ receiver: string;
1038
+ }
1039
+ export interface MultiSwapAction {
1040
+ pay_token_list: TokenItem[];
1041
+ receive_token_list: SwapReceiveToken[];
1042
+ receiver: string;
1043
+ }
1044
+ export interface TransferOwnerAction {
1045
+ description: string;
1046
+ from_addr: string;
1047
+ to_addr: string;
1048
+ }
1049
+ export interface SwapAction {
1050
+ pay_token: TokenItem;
1051
+ receive_token: SwapReceiveToken;
1052
+ receiver: string;
1053
+ }
1054
+ export interface SendNFTAction {
1055
+ to: string;
1056
+ nft: NFTItem;
1057
+ }
1058
+ export interface ApproveNFTAction {
1059
+ spender: string;
1060
+ nft: NFTItem;
1061
+ }
1062
+ export declare type RevokeNFTAction = ApproveNFTAction;
1063
+ export interface ApproveNFTCollectionAction {
1064
+ spender: string;
1065
+ collection: NFTCollection;
1066
+ }
1067
+ export interface PushMultiSigAction {
1068
+ multisig_id: string;
1069
+ }
1070
+ export declare type RevokeNFTCollectionAction = ApproveNFTCollectionAction;
1071
+ export declare type MultiAction = TransactionAction[];
1072
+ export declare type TransactionActionDataItem = SwapAction | ApproveAction | SendAction | SendNFTAction | ApproveNFTAction | RevokeNFTAction | ApproveNFTCollectionAction | RevokeNFTCollectionAction | RevokeTokenApproveAction | WrapTokenAction | UnWrapTokenAction | PushMultiSigAction | CrossSwapAction | CrossTokenAction | RevokePermit2Action | SwapOrderAction | TransferOwnerAction | MultiSwapAction | SwapLimitPay | MultiAction | null;
1073
+ export interface TransactionAction {
1074
+ type: string;
1075
+ data: TransactionActionDataItem;
1076
+ }
1077
+ export interface ParseTxResponse {
1078
+ action: TransactionAction;
1079
+ contract_call?: {
1080
+ func: string;
1081
+ contract: {
1082
+ id: string;
1083
+ protocol: {
1084
+ name: string;
1085
+ logo_url: string;
1086
+ };
1087
+ };
1088
+ };
1089
+ log_id: string;
1090
+ }
1091
+ export interface CollectionWithFloorPrice {
1092
+ id: string;
1093
+ name: string;
1094
+ floor_price: number;
1095
+ }
1096
+ export declare type TypedDataActionName = 'permit1_approve_token' | 'swap_token_order' | 'permit2_approve_token' | 'sell_nft_order' | 'sign_multisig' | 'buy_nft_order' | 'create_key' | 'verify_address' | 'sell_nft_list_order' | 'permit2_approve_token_list' | 'create_cobo_safe' | 'submit_safe_role_modification' | 'submit_delegated_address_modification' | 'submit_token_approval_modification' | 'send_token' | 'permit1_revoke_token' | 'swap_order' | 'approve_nft' | 'multi_actions';
1097
+ export interface BuyNFTOrderAction {
1098
+ expire_at: string;
1099
+ pay_token: TokenItem;
1100
+ receive_nft: NFTItem;
1101
+ receiver: string;
1102
+ takers: string[];
1103
+ }
1104
+ export interface SellNFTOrderAction {
1105
+ pay_nft: NFTItem;
1106
+ receive_token: TokenItem;
1107
+ receiver: string;
1108
+ takers: string[];
1109
+ expire_at: string;
1110
+ }
1111
+ export interface BatchSellNFTOrderAction {
1112
+ pay_nft_list: NFTItem[];
1113
+ receive_token: TokenItem;
1114
+ receiver: string;
1115
+ takers: string[];
1116
+ expire_at: string;
1117
+ }
1118
+ export interface SwapTokenOrderAction {
1119
+ pay_token: TokenItem;
1120
+ receive_token: TokenItem;
1121
+ receiver: string;
1122
+ takers: string[];
1123
+ expire_at: number | null;
1124
+ }
1125
+ export interface PermitAction {
1126
+ spender: string;
1127
+ token: TokenItem;
1128
+ }
1129
+ export interface PermitTokenItem extends TokenItem {
1130
+ permit2_allowance_amount: number;
1131
+ permit2_allowance_raw_amount: string;
1132
+ }
1133
+ export interface Permit2Action {
1134
+ permit2_id: string;
1135
+ spender: string;
1136
+ token: PermitTokenItem;
1137
+ expire_at: number | null;
1138
+ }
1139
+ export interface BatchPermit2Action {
1140
+ permit2_id: string;
1141
+ spender: string;
1142
+ token_list: PermitTokenItem[];
1143
+ expire_at: number | null;
1144
+ }
1145
+ export interface SignMultiSigActions {
1146
+ multisig_id: string;
1147
+ }
1148
+ export interface CreateCoboSafeAction {
1149
+ multisig_id: string;
1150
+ desc: string;
1151
+ brand: {
1152
+ name: string;
1153
+ logo_url: string;
1154
+ };
1155
+ }
1156
+ export interface SubmitSafeRoleModificationAction {
1157
+ multisig_id: string;
1158
+ desc: string;
1159
+ brand: {
1160
+ name: string;
1161
+ logo_url: string;
1162
+ };
1163
+ }
1164
+ export interface SubmitDelegatedAddressModificationAction {
1165
+ multisig_id: string;
1166
+ desc: string;
1167
+ brand: {
1168
+ name: string;
1169
+ logo_url: string;
1170
+ };
1171
+ }
1172
+ export interface SubmitTokenApprovalModificationAction {
1173
+ multisig_id: string;
1174
+ desc: string;
1175
+ brand: {
1176
+ name: string;
1177
+ logo_url: string;
1178
+ };
1179
+ }
1180
+ export declare type TypeDataActionDataItem = SellNFTOrderAction | BuyNFTOrderAction | SwapTokenOrderAction | PermitAction | Permit2Action | SignMultiSigActions | CreateKeyAction | VerifyAddressAction | BatchSellNFTOrderAction | BatchPermit2Action | CreateCoboSafeAction | SubmitSafeRoleModificationAction | SubmitDelegatedAddressModificationAction | SubmitTokenApprovalModificationAction | SendAction | SwapOrderAction | RevokeTokenApproveAction | ApproveNFTAction | MultiAction;
1181
+ export interface TypeDataActionItem {
1182
+ type: TypedDataActionName;
1183
+ expire_at?: number;
1184
+ data: TypeDataActionDataItem;
1185
+ }
1186
+ export interface ParseTypedDataResponse {
1187
+ action: TypeDataActionItem | null;
1188
+ log_id: string;
1189
+ }
1190
+ export declare type TextActionName = 'create_key' | 'verify_address';
1191
+ export interface CreateKeyAction {
1192
+ user: string;
1193
+ allow_origins: string[];
1194
+ protocol: {
1195
+ name: string;
1196
+ logo_url: string;
1197
+ } | null;
1198
+ desc: string;
1199
+ }
1200
+ export interface VerifyAddressAction {
1201
+ user: string;
1202
+ allow_origins: string[];
1203
+ protocol: {
1204
+ name: string;
1205
+ logo_url: string;
1206
+ } | null;
1207
+ desc: string;
1208
+ }
1209
+ export interface ParseTextResponse {
1210
+ action: {
1211
+ type: TextActionName;
1212
+ data: CreateKeyAction | VerifyAddressAction;
1213
+ } | null;
1214
+ log_id: string;
1215
+ }
1216
+ export declare type TxPushType = 'default' | 'low_gas' | 'mev';
1217
+ export interface TxRequest {
1218
+ id: string;
1219
+ chain_id: string;
1220
+ user_addr: string;
1221
+ nonce: number;
1222
+ signed_tx: Tx;
1223
+ tx_id?: null | string;
1224
+ push_type: TxPushType;
1225
+ push_status?: 'success' | 'failed';
1226
+ push_at?: number | null;
1227
+ is_withdraw: boolean;
1228
+ create_at: number;
1229
+ low_gas_deadline?: number;
1230
+ is_finished: boolean;
1231
+ predict_packed_at?: number;
1232
+ predict_err_code?: number;
1233
+ push_at_list?: number[];
1234
+ }
1235
+ export interface MempoolCheckDetail {
1236
+ id: string;
1237
+ chain_id: string;
1238
+ tx_id: string;
1239
+ check_at: string;
1240
+ check_success: boolean;
1241
+ rpc: string;
1242
+ name?: string;
1243
+ operator?: string;
1244
+ packed_rate?: number;
1245
+ }
1246
+ export interface JobResponse<T = any> {
1247
+ create_at: number;
1248
+ id: string;
1249
+ result: {
1250
+ create_at: number;
1251
+ id: string;
1252
+ data: T;
1253
+ };
1254
+ job: {
1255
+ create_at: number;
1256
+ id: string;
1257
+ status: 'pending' | 'running';
1258
+ } | null;
1259
+ }
1260
+ export interface PreExecResult {
1261
+ balance_change: BalanceChange;
1262
+ gas: {
1263
+ success?: boolean;
1264
+ error?: {
1265
+ code: number;
1266
+ msg: string;
1267
+ } | null;
1268
+ gas_used: number;
1269
+ gas_limit: number;
1270
+ };
1271
+ is_multisig: boolean;
1272
+ multisig?: any;
1273
+ pre_exec: {
1274
+ success: boolean;
1275
+ error?: {
1276
+ code: number;
1277
+ msg: string;
1278
+ } | null;
1279
+ };
1280
+ }
1281
+ export interface PendingTxItem {
1282
+ id: string;
1283
+ action_data: ParseTxResponse['action']['data'];
1284
+ action_type: ParseTxResponse['action']['type'];
1285
+ block_height?: number | null;
1286
+ gas_price?: number | null;
1287
+ gas_used?: number | null;
1288
+ pre_exec_at?: number | null;
1289
+ pre_exec_result?: Omit<PreExecResult, 'balance_change'> & {
1290
+ balance_change: BalanceChange<{
1291
+ chain: string;
1292
+ token_id: string;
1293
+ amount: number;
1294
+ }, {
1295
+ chain: string;
1296
+ token_id: string;
1297
+ amount: number;
1298
+ }>;
1299
+ };
1300
+ to_addr: string;
1301
+ to_addr_desc: {
1302
+ cex?: Cex | null;
1303
+ protocol?: {
1304
+ id: string;
1305
+ logo_url: string;
1306
+ name: string;
1307
+ };
1308
+ };
1309
+ }
1310
+ export interface BasicDappInfo {
1311
+ id: string;
1312
+ name: string;
1313
+ logo_url: string | null;
1314
+ description: string;
1315
+ user_range: string;
1316
+ tags: string[];
1317
+ chain_ids: string[];
1318
+ collected_list?: {
1319
+ name: string;
1320
+ logo_url: string;
1321
+ }[];
1322
+ }
1323
+ export interface SupportedChain {
1324
+ id: string;
1325
+ community_id: number;
1326
+ name: string;
1327
+ native_token: {
1328
+ id: string;
1329
+ symbol: string;
1330
+ logo: string;
1331
+ decimals: number;
1332
+ };
1333
+ logo_url: string;
1334
+ white_logo_url?: string;
1335
+ need_estimate_gas?: boolean;
1336
+ eip_1559: boolean;
1337
+ is_disabled: boolean;
1338
+ explorer_host: string;
1339
+ block_interval: number;
1340
+ severity?: number;
1341
+ }
1342
+ export interface ChainListItem {
1343
+ chain_id: number;
1344
+ name: string;
1345
+ short_name: string;
1346
+ native_currency: {
1347
+ name: string;
1348
+ symbol: string;
1349
+ decimals: number;
1350
+ };
1351
+ explorer: string | null;
1352
+ rpc: null | string;
1353
+ rpc_list?: string[];
1354
+ }
1355
+ export interface HistoryCurve {
1356
+ create_at: number;
1357
+ executor_name: string;
1358
+ executor_params: {
1359
+ addr: string;
1360
+ };
1361
+ executor_version: string;
1362
+ id: string;
1363
+ job?: null | {
1364
+ create_at: number;
1365
+ id: string;
1366
+ status: 'pending' | 'running';
1367
+ };
1368
+ result?: null | {
1369
+ create_at: number;
1370
+ data: {
1371
+ usd_value_list: number[][];
1372
+ };
1373
+ id: number;
1374
+ };
1375
+ }
1376
+ export interface NodeStatus {
1377
+ id: string;
1378
+ chain_id: string;
1379
+ features: {
1380
+ signature_decode: boolean;
1381
+ tx_simulation: boolean;
1382
+ security_check: boolean;
1383
+ evm_tracing: boolean;
1384
+ };
1385
+ tags: string[];
1386
+ official_node_height: number;
1387
+ official_node_timestamp: number;
1388
+ rabby_node_height: number;
1389
+ rabby_data_service_height: number;
1390
+ chain: {
1391
+ id: string;
1392
+ network_id: number;
1393
+ name: string;
1394
+ token_id: string;
1395
+ token_symbol: string;
1396
+ logo_url: string;
1397
+ svg_logo_url: string;
1398
+ block_interval: number;
1399
+ start_at: string;
1400
+ prefix: string;
1401
+ wrapped: string;
1402
+ explorer_host: string;
1403
+ is_support_archive: boolean;
1404
+ eip_1559: boolean;
1405
+ white_logo_url: string;
1406
+ };
1407
+ }
1408
+ interface NodeServiceData {
1409
+ node: NodeDetails;
1410
+ height_list: [number, number, number][];
1411
+ }
1412
+ interface NodeDetails {
1413
+ name: string;
1414
+ tag: string[];
1415
+ }
1416
+ export interface NodeStatusDetail {
1417
+ rabby_rpc: NodeServiceData[];
1418
+ rabby_data_service: NodeServiceData[];
1419
+ }
1420
+ interface BridgeItem {
1421
+ id: string;
1422
+ name: string;
1423
+ logo_url: string;
1424
+ }
1425
+ export interface BridgeAggregator {
1426
+ id: string;
1427
+ name: string;
1428
+ logo_url: string;
1429
+ bridge_list: BridgeItem[];
1430
+ }
1431
+ export interface BridgeTokenPair {
1432
+ aggregator_id: string;
1433
+ from_token: TokenItem;
1434
+ to_token: TokenItem;
1435
+ from_token_amount: number;
1436
+ from_token_raw_amount_hex_str: string;
1437
+ from_token_usd_value: number;
1438
+ }
1439
+ export interface BridgeQuote {
1440
+ aggregator: Exclude<BridgeAggregator, 'bridge_list'>;
1441
+ bridge_id: string;
1442
+ bridge: BridgeItem;
1443
+ to_token_amount: number;
1444
+ to_token_raw_amount: number;
1445
+ to_token_raw_amount_hex_str: string;
1446
+ gas_fee: {
1447
+ raw_amount_hex_str: string;
1448
+ usd_value: number;
1449
+ };
1450
+ protocol_fee: {
1451
+ raw_amount_hex_str: string;
1452
+ usd_value: number;
1453
+ };
1454
+ rabby_fee: {
1455
+ raw_amount_hex_str: string;
1456
+ usd_value: number;
1457
+ };
1458
+ duration: number;
1459
+ routePath: string;
1460
+ approve_contract_id: string;
1461
+ tx: {
1462
+ chainId: number;
1463
+ data: string;
1464
+ from: string;
1465
+ gasLimit: string;
1466
+ gasPrice: string;
1467
+ to: string;
1468
+ value: string;
1469
+ };
1470
+ quote_key: Record<string, any>;
1471
+ }
1472
+ export interface BridgeHistory {
1473
+ aggregator: Exclude<BridgeAggregator, 'bridge_list'>;
1474
+ bridge: BridgeItem;
1475
+ from_token: TokenItem;
1476
+ to_token: TokenItem;
1477
+ to_actual_token: TokenItem;
1478
+ quote: {
1479
+ pay_token_amount: number;
1480
+ receive_token_amount: number;
1481
+ };
1482
+ actual: {
1483
+ pay_token_amount: number;
1484
+ receive_token_amount: number;
1485
+ };
1486
+ detail_url: string;
1487
+ status: 'pending' | 'completed' | 'failed';
1488
+ create_at: number;
1489
+ from_tx: {
1490
+ tx_id: string;
1491
+ };
1492
+ to_tx: {
1493
+ tx_id?: string;
1494
+ };
1495
+ from_gas: {
1496
+ native_token: TokenItem;
1497
+ gas_amount: number;
1498
+ usd_gas_fee: number;
1499
+ gas_price: number;
1500
+ };
1501
+ }
1502
+ export interface DbkBridgeHistoryItem {
1503
+ user_addr: string;
1504
+ from_chain_id: string;
1505
+ to_chain_id: string;
1506
+ is_deposit: boolean;
1507
+ tx_id: string;
1508
+ create_at: number;
1509
+ from_token_amount: number;
1510
+ from_token_id: string;
1511
+ }
1512
+ export interface ContractInfo {
1513
+ id: string;
1514
+ credit: ContractCredit;
1515
+ is_token: boolean;
1516
+ token_approval_exposure: number;
1517
+ top_nft_approval_exposure: number;
1518
+ spend_usd_value: number;
1519
+ top_nft_spend_usd_value: number;
1520
+ create_at: number;
1521
+ name: string | null;
1522
+ protocol: {
1523
+ id: string;
1524
+ logo_url: string;
1525
+ name: string;
1526
+ } | null;
1527
+ is_danger: {
1528
+ auto: null | boolean;
1529
+ edit: null | boolean;
1530
+ };
1531
+ is_phishing: boolean | null;
1532
+ }
1533
+ export interface PerpTopToken {
1534
+ id: number;
1535
+ name: string;
1536
+ full_logo_url: string | null;
1537
+ daily_volume: number;
1538
+ dex_id: string;
1539
+ }
1540
+ export interface GasAccountCheckResult {
1541
+ gas_account_cost: {
1542
+ total_cost: number;
1543
+ tx_cost: number;
1544
+ gas_cost: number;
1545
+ estimate_tx_cost: number;
1546
+ };
1547
+ is_gas_account: boolean;
1548
+ balance_is_enough: boolean;
1549
+ chain_not_support: boolean;
1550
+ err_msg: string;
1551
+ }
1552
+ export interface ParseCommonResponse {
1553
+ input_type: 'typed_data' | 'text' | 'tx';
1554
+ output_type: 'typed_data' | 'text' | 'tx';
1555
+ action: ParseTypedDataResponse['action'] | ParseTextResponse['action'] | ParseTxResponse['action'];
1556
+ log_id: string;
1557
+ pre_exec_result: ExplainTxResponse | null;
1558
+ contract_call_data: ParseTxResponse['contract_call'] | null;
1559
+ pre_exec?: PreExecResult['pre_exec'];
1560
+ }
1561
+ export interface RechargeChainItem {
1562
+ chain_id: string;
1563
+ withdraw_limit: number;
1564
+ withdraw_fee: number;
1565
+ l1_balance: number;
1566
+ }
1567
+ export interface WithdrawListAddressItem {
1568
+ recharge_addr: string;
1569
+ total_withdraw_limit: number;
1570
+ recharge_chain_list: RechargeChainItem[];
1571
+ }
1572
+ export interface BuyCountryItem {
1573
+ id: string;
1574
+ name: string;
1575
+ image_url: string;
1576
+ regions: null | {
1577
+ regionCode: string;
1578
+ name: string;
1579
+ };
1580
+ }
1581
+ export interface BuyServiceProvider {
1582
+ id: string;
1583
+ name: string;
1584
+ website_url: string;
1585
+ customer_support_url: string;
1586
+ image_url: string;
1587
+ logo_url: string;
1588
+ }
1589
+ export interface BuyQuoteItem {
1590
+ service_provider: BuyServiceProvider;
1591
+ token_amount: number;
1592
+ payment_method_type: string;
1593
+ }
1594
+ export interface BuyHistoryItem {
1595
+ id: string;
1596
+ user_addr: string;
1597
+ status: string;
1598
+ create_at: number;
1599
+ service_provider: BuyServiceProvider;
1600
+ service_provider_url: null | string;
1601
+ pay_usd_amount: number;
1602
+ pay_currency_code: string;
1603
+ payment_type: string;
1604
+ receive_chain_id: string;
1605
+ receive_tx_id: string;
1606
+ receive_token_id: string;
1607
+ receive_amount: number;
1608
+ receive_token: TokenItem;
1609
+ }
1610
+ export interface BuyHistoryList {
1611
+ pagination: {
1612
+ start: number;
1613
+ limit: number;
1614
+ total: number;
1615
+ };
1616
+ histories: BuyHistoryItem[];
1617
+ }
1618
+ export interface BuyPaymentMethod {
1619
+ id: string;
1620
+ name: string;
1621
+ type: string;
1622
+ logo_url: string;
1623
+ }
1624
+ export interface GasAccountInfo {
1625
+ id: string;
1626
+ balance: number;
1627
+ create_at: number;
1628
+ nonce: number;
1629
+ uuid: string;
1630
+ has_iap_order: boolean;
1631
+ no_register: boolean;
1632
+ non_withdrawable_balance: number | undefined;
1633
+ withdrawable_balance: number | undefined;
1634
+ }
1635
+ export interface AppChainItem {
1636
+ id: string;
1637
+ name: string;
1638
+ site_url: string;
1639
+ logo_url: string;
1640
+ is_support_portfolio: boolean;
1641
+ is_visible: boolean;
1642
+ portfolio_item_list: PortfolioItem[];
1643
+ }
1644
+ export interface AppChainListResponse {
1645
+ apps: AppChainItem[];
1646
+ error_apps: {
1647
+ create_at: number;
1648
+ id: string;
1649
+ is_support_portfolio: boolean;
1650
+ is_visible: boolean;
1651
+ logo_url: string;
1652
+ name: string;
1653
+ site_url: string;
1654
+ update_at: number;
1655
+ }[];
1656
+ }
1657
+ export declare type DefaultRPCRes = {
1658
+ message: string;
1659
+ status: string;
1660
+ rpcs: RPCDefaultItem[];
1661
+ };
1662
+ declare type RPCDefaultItem = {
1663
+ chainId: string;
1664
+ rpcUrl: string[];
1665
+ txPushToRPC: boolean;
1666
+ };
1667
+ export interface TokenDetailWithPriceCurve extends TokenItemWithEntity {
1668
+ price_curve_24h: {
1669
+ time_at: number;
1670
+ price: number;
1671
+ }[];
1672
+ }
1673
+ export declare type GiftEligibilityItem = {
1674
+ id?: string;
1675
+ has_eligibility: boolean;
1676
+ can_claimed_usd_value: number;
1677
+ };
1678
+ export declare type KlineDataItem = [
1679
+ time_at: number,
1680
+ open: number,
1681
+ high: number,
1682
+ low: number,
1683
+ close: number,
1684
+ volume_amount: number,
1685
+ volume_usd_value: number
1686
+ ];
1687
+ export declare type TokenMarketInfo = {
1688
+ market: {
1689
+ volume_amount_24h: number | null;
1690
+ volume_usd_value_24h: number | null;
1691
+ txns_24h: number | null;
1692
+ };
1693
+ };
1694
+ export declare type TokenHolderInfo = {
1695
+ holder_count: number | null;
1696
+ };
1697
+ export declare type TokenSupplyInfo = {
1698
+ market_cap_usd_value: number | null;
1699
+ total_supply: number | null;
1700
+ circulating_supply: number | null;
1701
+ max_supply: number | null;
1702
+ };
1703
+ export declare type UserFeedbackItem = {
1704
+ id: string;
1705
+ title: string;
1706
+ content: string;
1707
+ image_url_list: string[];
1708
+ status: 'pending' | 'complete' | 'closed';
1709
+ create_at: number;
1710
+ comment: string | null;
1711
+ comment_at: number | null;
1712
+ extra?: any | null;
1713
+ };
1714
+ export declare type CurrencyItem = {
1715
+ symbol: string;
1716
+ code: string;
1717
+ logo_url: string;
1718
+ usd_rate: number;
1719
+ };
1720
+ export interface PerpBridgeQuote {
1721
+ tx: {
1722
+ chainId: number;
1723
+ data: string;
1724
+ from: string;
1725
+ gas: string;
1726
+ gasPrice: string;
1727
+ nonce: string;
1728
+ to: string;
1729
+ value: string;
1730
+ };
1731
+ bridge_id: string;
1732
+ bridge: BridgeItem | null;
1733
+ to_token_raw_amount: number;
1734
+ to_token_raw_amount_hex_str: string;
1735
+ to_token_amount: number;
1736
+ approve_contract_id: string;
1737
+ protocol_fee: {
1738
+ raw_amount_hex_str: string;
1739
+ usd_value: number;
1740
+ };
1741
+ rabby_fee: {
1742
+ raw_amount_hex_str: string;
1743
+ usd_value: number;
1744
+ };
1745
+ gas_fee: {
1746
+ raw_amount_hex_str: string;
1747
+ usd_value: number;
1748
+ };
1749
+ duration: number;
1750
+ }
1751
+ export declare type MarketSummaryItem = {
1752
+ price?: {
1753
+ open?: number;
1754
+ close?: number;
1755
+ change?: number;
1756
+ };
1757
+ summary: {
1758
+ buy?: {
1759
+ count?: number;
1760
+ volume_amount?: number;
1761
+ volume_usd_value?: number;
1762
+ };
1763
+ sell?: {
1764
+ count?: number;
1765
+ volume_amount?: number;
1766
+ volume_usd_value?: number;
1767
+ };
1768
+ totals?: {
1769
+ trading_count?: number;
1770
+ volume_amount?: number;
1771
+ volume_usd_value?: number;
1772
+ addresses?: number;
1773
+ };
1774
+ };
1775
+ };
1776
+ export declare type MarketSummary = {
1777
+ '5m'?: MarketSummaryItem | null;
1778
+ '1h'?: MarketSummaryItem | null;
1779
+ '6h'?: MarketSummaryItem | null;
1780
+ '24h'?: MarketSummaryItem | null;
1781
+ };
1782
+ export declare type MarketTradingHistoryItem = {
1783
+ id: string;
1784
+ time_at?: number;
1785
+ action?: 'buy' | 'sell';
1786
+ price?: number;
1787
+ amount?: number;
1788
+ usd_value?: number;
1789
+ tx_id?: string;
1790
+ user_addr?: string;
1791
+ };
1792
+ export declare type TokenHolderSummary = {
1793
+ ratio_top10?: number;
1794
+ ratio_top100?: number;
1795
+ };
1796
+ export declare type TokenHolderItem = {
1797
+ user_addr?: string;
1798
+ amount?: number;
1799
+ ratio?: number;
1800
+ };
1801
+ export declare type LiquidityPoolItem = {
1802
+ id: string;
1803
+ tokens: {
1804
+ id: string;
1805
+ amount: number;
1806
+ symbol: string;
1807
+ price: number;
1808
+ usd_value: number;
1809
+ }[];
1810
+ project: {
1811
+ id: string;
1812
+ name: string;
1813
+ logo_url: string;
1814
+ };
1815
+ pool_id: string;
1816
+ usd_value: number;
1817
+ };
1818
+ export declare type LiquidityPoolHistoryItem = {
1819
+ id: string;
1820
+ tx_id: string;
1821
+ time_at: number;
1822
+ usd_value: number;
1823
+ action: 'add' | 'remove';
1824
+ tokens: {
1825
+ id: string;
1826
+ amount: number;
1827
+ symbol: string;
1828
+ price: number;
1829
+ usd_value: number;
1830
+ }[];
1831
+ };
1832
+ export declare type NFTTradingConfig = Record<string, {
1833
+ currency: string[];
1834
+ seaport_v16_address: string;
1835
+ opensea_chain_id: string;
1836
+ opensea_fee_recipient: string;
1837
+ opensea_conduit_address: string;
1838
+ listing_currency: {
1839
+ symbol: string;
1840
+ token_id: string;
1841
+ };
1842
+ offer_currency: {
1843
+ symbol: string;
1844
+ token_id: string;
1845
+ };
1846
+ }>;
1847
+ export interface NFTDetail extends NFTItem {
1848
+ best_offer_order: {
1849
+ order_hash: string;
1850
+ chain: string;
1851
+ protocol_data: {
1852
+ parameters: {
1853
+ offerer: string;
1854
+ offer: Array<{
1855
+ itemType: number;
1856
+ token: string;
1857
+ identifierOrCriteria: string;
1858
+ startAmount: string;
1859
+ endAmount: string;
1860
+ }>;
1861
+ consideration: Array<{
1862
+ itemType: number;
1863
+ token: string;
1864
+ identifierOrCriteria: string;
1865
+ startAmount: string;
1866
+ endAmount: string;
1867
+ recipient: string;
1868
+ }>;
1869
+ startTime: string;
1870
+ endTime: string;
1871
+ orderType: number;
1872
+ zone: string;
1873
+ zoneHash: string;
1874
+ salt: string;
1875
+ conduitKey: string;
1876
+ totalOriginalConsiderationItems: number;
1877
+ counter: number;
1878
+ };
1879
+ signature: null;
1880
+ };
1881
+ protocol_address: string;
1882
+ remaining_quantity: number;
1883
+ criteria: {
1884
+ collection: {
1885
+ slug: string;
1886
+ };
1887
+ contract: {
1888
+ address: string;
1889
+ };
1890
+ trait: null;
1891
+ traits: null;
1892
+ encoded_token_ids: string;
1893
+ };
1894
+ price: {
1895
+ currency: string;
1896
+ decimals: number;
1897
+ value: string;
1898
+ };
1899
+ status: 'ACTIVE' | string;
1900
+ } | null;
1901
+ rarity: {
1902
+ strategy_id: 'openrarity' | string;
1903
+ strategy_version: string;
1904
+ rank: number;
1905
+ } | null;
1906
+ last_sale?: {
1907
+ event_type: 'sale' | string;
1908
+ event_timestamp: number;
1909
+ transaction: string;
1910
+ payment: {
1911
+ quantity: string;
1912
+ decimals: number;
1913
+ symbol: string;
1914
+ token_id: string;
1915
+ price: number;
1916
+ };
1917
+ seller: string;
1918
+ buyer: string;
1919
+ quantity: number;
1920
+ } | null;
1921
+ }
1922
+ export interface NFTListingOrder {
1923
+ created_date: string;
1924
+ closing_date: string;
1925
+ listing_time: number;
1926
+ expiration_time: number;
1927
+ order_hash: string;
1928
+ protocol_data: {
1929
+ parameters: {
1930
+ offerer: string;
1931
+ offer: Array<{
1932
+ itemType: number;
1933
+ token: string;
1934
+ identifierOrCriteria: string;
1935
+ startAmount: string;
1936
+ endAmount: string;
1937
+ }>;
1938
+ consideration: Array<{
1939
+ itemType: number;
1940
+ token: string;
1941
+ identifierOrCriteria: string;
1942
+ startAmount: string;
1943
+ endAmount: string;
1944
+ recipient: string;
1945
+ }>;
1946
+ startTime: string;
1947
+ endTime: string;
1948
+ orderType: number;
1949
+ zone: string;
1950
+ zoneHash: string;
1951
+ salt: string;
1952
+ conduitKey: string;
1953
+ totalOriginalConsiderationItems: number;
1954
+ counter: number;
1955
+ };
1956
+ signature: null;
1957
+ };
1958
+ protocol_address: string;
1959
+ current_price: string;
1960
+ maker: {
1961
+ address: string;
1962
+ profile_img_url: null;
1963
+ config: null;
1964
+ };
1965
+ taker: null;
1966
+ maker_fees: any[];
1967
+ taker_fees: any[];
1968
+ side: 'ask' | 'bid';
1969
+ order_type: 'basic' | string;
1970
+ cancelled: boolean;
1971
+ finalized: boolean;
1972
+ marked_invalid: boolean;
1973
+ remaining_quantity: number;
1974
+ maker_asset_bundle: {
1975
+ assets: Array<{
1976
+ id: null;
1977
+ token_id: string;
1978
+ num_sales: null;
1979
+ background_color: null;
1980
+ image_url: string | null;
1981
+ image_preview_url: null;
1982
+ image_thumbnail_url: null;
1983
+ image_original_url: null;
1984
+ animation_url: null;
1985
+ animation_original_url: null;
1986
+ name: string;
1987
+ description: string | null;
1988
+ external_link: null;
1989
+ asset_contract: {
1990
+ address: string;
1991
+ chain_identifier: string;
1992
+ schema_name: 'ERC721' | 'ERC1155' | 'NATIVE' | string;
1993
+ asset_contract_type: 'non-fungible' | 'semi-fungible' | 'unknown';
1994
+ };
1995
+ permalink: string | null;
1996
+ collection: {
1997
+ collection: string;
1998
+ name: string;
1999
+ description: string;
2000
+ image_url: string;
2001
+ banner_image_url: string;
2002
+ owner: string;
2003
+ safelist_status: 'not_requested' | 'verified' | string;
2004
+ category: string;
2005
+ is_disabled: boolean;
2006
+ is_nsfw: boolean;
2007
+ trait_offers_enabled: boolean;
2008
+ collection_offers_enabled: boolean;
2009
+ opensea_url: string;
2010
+ project_url: string;
2011
+ wiki_url: string;
2012
+ discord_url: string;
2013
+ telegram_url: string;
2014
+ twitter_username: string;
2015
+ instagram_username: string;
2016
+ contracts: Array<{
2017
+ address: string;
2018
+ chain: string;
2019
+ }>;
2020
+ } | null;
2021
+ decimals: number | null;
2022
+ token_metadata: null;
2023
+ is_nsfw: boolean | null;
2024
+ owner: {
2025
+ address: string;
2026
+ profile_img_url: null;
2027
+ config: null;
2028
+ } | null;
2029
+ }>;
2030
+ maker: null;
2031
+ asset_contract: null;
2032
+ slug: null;
2033
+ name: null;
2034
+ description: null;
2035
+ external_link: null;
2036
+ permalink: null;
2037
+ seaport_sell_orders: null;
2038
+ };
2039
+ taker_asset_bundle: {
2040
+ assets: Array<{
2041
+ id: null;
2042
+ token_id: string;
2043
+ num_sales: null;
2044
+ background_color: null;
2045
+ image_url: string | null;
2046
+ image_preview_url: null;
2047
+ image_thumbnail_url: null;
2048
+ image_original_url: null;
2049
+ animation_url: null;
2050
+ animation_original_url: null;
2051
+ name: string;
2052
+ description: string | null;
2053
+ external_link: null;
2054
+ asset_contract: {
2055
+ address: string;
2056
+ chain_identifier: string;
2057
+ schema_name: 'ERC721' | 'ERC1155' | 'NATIVE' | string;
2058
+ asset_contract_type: 'non-fungible' | 'semi-fungible' | 'unknown';
2059
+ };
2060
+ permalink: string | null;
2061
+ collection: {
2062
+ collection: string;
2063
+ name: string;
2064
+ description: string;
2065
+ image_url: string;
2066
+ banner_image_url: string;
2067
+ owner: string;
2068
+ safelist_status: 'not_requested' | 'verified' | string;
2069
+ category: string;
2070
+ is_disabled: boolean;
2071
+ is_nsfw: boolean;
2072
+ trait_offers_enabled: boolean;
2073
+ collection_offers_enabled: boolean;
2074
+ opensea_url: string;
2075
+ project_url: string;
2076
+ wiki_url: string;
2077
+ discord_url: string;
2078
+ telegram_url: string;
2079
+ twitter_username: string;
2080
+ instagram_username: string;
2081
+ contracts: Array<{
2082
+ address: string;
2083
+ chain: string;
2084
+ }>;
2085
+ } | null;
2086
+ decimals: number | null;
2087
+ token_metadata: null;
2088
+ is_nsfw: boolean | null;
2089
+ owner: {
2090
+ address: string;
2091
+ profile_img_url: null;
2092
+ config: null;
2093
+ } | null;
2094
+ }>;
2095
+ maker: null;
2096
+ asset_contract: null;
2097
+ slug: null;
2098
+ name: null;
2099
+ description: null;
2100
+ external_link: null;
2101
+ permalink: null;
2102
+ seaport_sell_orders: null;
2103
+ };
2104
+ }
2105
+ export interface NFTListingResponse {
2106
+ orders: NFTListingOrder[];
2107
+ next: string | null;
2108
+ }
2109
+ export interface PrepareListingNFTResponse {
2110
+ data: {
2111
+ sign: {
2112
+ signatureKind: string;
2113
+ domain: {
2114
+ name: string;
2115
+ version: string;
2116
+ chainId: number;
2117
+ verifyingContract: string;
2118
+ };
2119
+ types: {
2120
+ EIP712Domain: Array<{
2121
+ name: string;
2122
+ type: string;
2123
+ }>;
2124
+ OrderComponents: Array<{
2125
+ name: string;
2126
+ type: string;
2127
+ }>;
2128
+ OfferItem: Array<{
2129
+ name: string;
2130
+ type: string;
2131
+ }>;
2132
+ ConsiderationItem: Array<{
2133
+ name: string;
2134
+ type: string;
2135
+ }>;
2136
+ };
2137
+ value: {
2138
+ offerer: string;
2139
+ zone: string;
2140
+ offer: Array<{
2141
+ itemType: number;
2142
+ token: string;
2143
+ identifierOrCriteria: string;
2144
+ startAmount: string;
2145
+ endAmount: string;
2146
+ }>;
2147
+ consideration: Array<{
2148
+ itemType: number;
2149
+ token: string;
2150
+ identifierOrCriteria: string;
2151
+ startAmount: string;
2152
+ endAmount: string;
2153
+ recipient: string;
2154
+ }>;
2155
+ orderType: number;
2156
+ startTime: string;
2157
+ endTime: string;
2158
+ zoneHash: string;
2159
+ salt: string;
2160
+ conduitKey: string;
2161
+ counter: string;
2162
+ };
2163
+ primaryType: string;
2164
+ };
2165
+ post: {
2166
+ endpoint: string;
2167
+ method: string;
2168
+ body: {
2169
+ order: {
2170
+ kind: string;
2171
+ data: {
2172
+ offerer: string;
2173
+ zone: string;
2174
+ offer: Array<{
2175
+ itemType: number;
2176
+ token: string;
2177
+ identifierOrCriteria: string;
2178
+ startAmount: string;
2179
+ endAmount: string;
2180
+ }>;
2181
+ consideration: Array<{
2182
+ itemType: number;
2183
+ token: string;
2184
+ identifierOrCriteria: string;
2185
+ startAmount: string;
2186
+ endAmount: string;
2187
+ recipient: string;
2188
+ }>;
2189
+ orderType: number;
2190
+ startTime: string;
2191
+ endTime: string;
2192
+ zoneHash: string;
2193
+ salt: string;
2194
+ conduitKey: string;
2195
+ counter: string;
2196
+ };
2197
+ };
2198
+ };
2199
+ };
2200
+ };
2201
+ }
2202
+ export interface PrepareAcceptNFTOfferResponse {
2203
+ data: {
2204
+ protocol: string;
2205
+ fulfillment_data: {
2206
+ transaction: {
2207
+ function: string;
2208
+ chain: number;
2209
+ to: string;
2210
+ value: number;
2211
+ input_data: {
2212
+ advancedOrder: {
2213
+ parameters: {
2214
+ offerer: string;
2215
+ zone: string;
2216
+ zoneHash: string;
2217
+ startTime: string;
2218
+ endTime: string;
2219
+ orderType: number;
2220
+ salt: string;
2221
+ conduitKey: string;
2222
+ totalOriginalConsiderationItems: number;
2223
+ offer: Array<{
2224
+ itemType: number;
2225
+ token: string;
2226
+ identifierOrCriteria: string;
2227
+ startAmount: string;
2228
+ endAmount: string;
2229
+ }>;
2230
+ consideration: Array<{
2231
+ itemType: number;
2232
+ token: string;
2233
+ identifierOrCriteria: string;
2234
+ startAmount: string;
2235
+ endAmount: string;
2236
+ recipient: string;
2237
+ }>;
2238
+ counter: number;
2239
+ };
2240
+ numerator: string;
2241
+ denominator: string;
2242
+ signature: string;
2243
+ extraData: string;
2244
+ };
2245
+ criteriaResolvers?: Array<{
2246
+ orderIndex: number;
2247
+ side: number;
2248
+ index: number;
2249
+ identifier: string;
2250
+ criteriaProof: string[];
2251
+ }>;
2252
+ fulfillerConduitKey?: string;
2253
+ recipient: string;
2254
+ } | {
2255
+ basicOrderParameters: {
2256
+ considerationToken: string;
2257
+ considerationIdentifier: string;
2258
+ considerationAmount: string;
2259
+ offerer: string;
2260
+ zone: string;
2261
+ offerToken: string;
2262
+ offerIdentifier: string;
2263
+ offerAmount: string;
2264
+ basicOrderType: number;
2265
+ startTime: string;
2266
+ endTime: string;
2267
+ zoneHash: string;
2268
+ salt: string;
2269
+ offererConduitKey: string;
2270
+ fulfillerConduitKey: string;
2271
+ totalOriginalAdditionalRecipients: number;
2272
+ additionalRecipients: Array<{
2273
+ amount: string;
2274
+ recipient: string;
2275
+ }>;
2276
+ signature: string;
2277
+ };
2278
+ } | {
2279
+ order: {
2280
+ parameters: {
2281
+ offerer: string;
2282
+ zone: string;
2283
+ zoneHash: string;
2284
+ startTime: string;
2285
+ endTime: string;
2286
+ orderType: number;
2287
+ salt: string;
2288
+ conduitKey: string;
2289
+ totalOriginalConsiderationItems: number;
2290
+ offer: Array<{
2291
+ itemType: number;
2292
+ token: string;
2293
+ identifierOrCriteria: string;
2294
+ startAmount: string;
2295
+ endAmount: string;
2296
+ }>;
2297
+ consideration: Array<{
2298
+ itemType: number;
2299
+ token: string;
2300
+ identifierOrCriteria: string;
2301
+ startAmount: string;
2302
+ endAmount: string;
2303
+ recipient: string;
2304
+ }>;
2305
+ counter: number;
2306
+ };
2307
+ signature: string;
2308
+ };
2309
+ fulfillerConduitKey?: string;
2310
+ recipient: string;
2311
+ } | {
2312
+ orders: Array<{
2313
+ parameters: {
2314
+ offerer: string;
2315
+ zone: string;
2316
+ zoneHash: string;
2317
+ startTime: string;
2318
+ endTime: string;
2319
+ orderType: number;
2320
+ salt: string;
2321
+ conduitKey: string;
2322
+ totalOriginalConsiderationItems: number;
2323
+ offer: Array<{
2324
+ itemType: number;
2325
+ token: string;
2326
+ identifierOrCriteria: string;
2327
+ startAmount: string;
2328
+ endAmount: string;
2329
+ }>;
2330
+ consideration: Array<{
2331
+ itemType: number;
2332
+ token: string;
2333
+ identifierOrCriteria: string;
2334
+ startAmount: string;
2335
+ endAmount: string;
2336
+ recipient: string;
2337
+ }>;
2338
+ counter: number;
2339
+ };
2340
+ signature: string;
2341
+ } | {
2342
+ parameters: {
2343
+ offerer: string;
2344
+ zone: string;
2345
+ zoneHash: string;
2346
+ startTime: string;
2347
+ endTime: string;
2348
+ orderType: number;
2349
+ salt: string;
2350
+ conduitKey: string;
2351
+ totalOriginalConsiderationItems: number;
2352
+ offer: Array<{
2353
+ itemType: number;
2354
+ token: string;
2355
+ identifierOrCriteria: string;
2356
+ startAmount: string;
2357
+ endAmount: string;
2358
+ }>;
2359
+ consideration: Array<{
2360
+ itemType: number;
2361
+ token: string;
2362
+ identifierOrCriteria: string;
2363
+ startAmount: string;
2364
+ endAmount: string;
2365
+ recipient: string;
2366
+ }>;
2367
+ counter: number;
2368
+ };
2369
+ numerator: string;
2370
+ denominator: string;
2371
+ signature: string;
2372
+ extraData: string;
2373
+ } | {
2374
+ considerationToken: string;
2375
+ considerationIdentifier: string;
2376
+ considerationAmount: string;
2377
+ offerer: string;
2378
+ zone: string;
2379
+ offerToken: string;
2380
+ offerIdentifier: string;
2381
+ offerAmount: string;
2382
+ basicOrderType: number;
2383
+ startTime: string;
2384
+ endTime: string;
2385
+ zoneHash: string;
2386
+ salt: string;
2387
+ offererConduitKey: string;
2388
+ fulfillerConduitKey: string;
2389
+ totalOriginalAdditionalRecipients: number;
2390
+ additionalRecipients: Array<{
2391
+ amount: string;
2392
+ recipient: string;
2393
+ }>;
2394
+ signature: string;
2395
+ }>;
2396
+ };
2397
+ };
2398
+ orders: Array<{
2399
+ parameters: {
2400
+ offerer: string;
2401
+ zone: string;
2402
+ zoneHash: string;
2403
+ startTime: string;
2404
+ endTime: string;
2405
+ orderType: number;
2406
+ salt: string;
2407
+ conduitKey: string;
2408
+ totalOriginalConsiderationItems: number;
2409
+ offer: Array<{
2410
+ itemType: number;
2411
+ token: string;
2412
+ identifierOrCriteria: string;
2413
+ startAmount: string;
2414
+ endAmount: string;
2415
+ }>;
2416
+ consideration: Array<{
2417
+ itemType: number;
2418
+ token: string;
2419
+ identifierOrCriteria: string;
2420
+ startAmount: string;
2421
+ endAmount: string;
2422
+ recipient: string;
2423
+ }>;
2424
+ counter: number;
2425
+ };
2426
+ signature: string;
2427
+ }>;
2428
+ };
2429
+ };
2430
+ }
2431
+ export interface CreateListingNFTOfferResponse {
2432
+ order: {
2433
+ created_date: string;
2434
+ closing_date: string;
2435
+ listing_time: number;
2436
+ expiration_time: number;
2437
+ order_hash: string;
2438
+ protocol_data: {
2439
+ parameters: {
2440
+ offerer: string;
2441
+ offer: Array<{
2442
+ itemType: number;
2443
+ token: string;
2444
+ identifierOrCriteria: string;
2445
+ startAmount: string;
2446
+ endAmount: string;
2447
+ }>;
2448
+ consideration: Array<{
2449
+ itemType: number;
2450
+ token: string;
2451
+ identifierOrCriteria: string;
2452
+ startAmount: string;
2453
+ endAmount: string;
2454
+ recipient: string;
2455
+ }>;
2456
+ startTime: string;
2457
+ endTime: string;
2458
+ orderType: number;
2459
+ zone: string;
2460
+ zoneHash: string;
2461
+ salt: string;
2462
+ conduitKey: string;
2463
+ totalOriginalConsiderationItems: number;
2464
+ counter: number;
2465
+ };
2466
+ signature: null;
2467
+ };
2468
+ protocol_address: string;
2469
+ current_price: string;
2470
+ maker: {
2471
+ address: string;
2472
+ profile_img_url: null;
2473
+ config: null;
2474
+ };
2475
+ taker: null;
2476
+ maker_fees: any[];
2477
+ taker_fees: any[];
2478
+ side: 'ask' | 'bid';
2479
+ order_type: 'basic' | string;
2480
+ cancelled: boolean;
2481
+ finalized: boolean;
2482
+ marked_invalid: boolean;
2483
+ remaining_quantity: number;
2484
+ maker_asset_bundle: {
2485
+ assets: Array<{
2486
+ id: null;
2487
+ token_id: string;
2488
+ num_sales: null;
2489
+ background_color: null;
2490
+ image_url: string | null;
2491
+ image_preview_url: null;
2492
+ image_thumbnail_url: null;
2493
+ image_original_url: null;
2494
+ animation_url: null;
2495
+ animation_original_url: null;
2496
+ name: string;
2497
+ description: string | null;
2498
+ external_link: null;
2499
+ asset_contract: {
2500
+ address: string;
2501
+ chain_identifier: string;
2502
+ schema_name: 'ERC721' | 'ERC1155' | 'NATIVE' | string;
2503
+ asset_contract_type: 'non-fungible' | 'semi-fungible' | 'unknown';
2504
+ };
2505
+ permalink: string | null;
2506
+ collection: {
2507
+ collection: string;
2508
+ name: string;
2509
+ description: string;
2510
+ image_url: string;
2511
+ banner_image_url: string;
2512
+ owner: string;
2513
+ safelist_status: 'not_requested' | 'verified' | string;
2514
+ category: string;
2515
+ is_disabled: boolean;
2516
+ is_nsfw: boolean;
2517
+ trait_offers_enabled: boolean;
2518
+ collection_offers_enabled: boolean;
2519
+ opensea_url: string;
2520
+ project_url: string;
2521
+ wiki_url: string;
2522
+ discord_url: string;
2523
+ telegram_url: string;
2524
+ twitter_username: string;
2525
+ instagram_username: string;
2526
+ contracts: Array<{
2527
+ address: string;
2528
+ chain: string;
2529
+ }>;
2530
+ } | null;
2531
+ decimals: number | null;
2532
+ token_metadata: null;
2533
+ is_nsfw: boolean | null;
2534
+ owner: {
2535
+ address: string;
2536
+ profile_img_url: null;
2537
+ config: null;
2538
+ } | null;
2539
+ }>;
2540
+ maker: null;
2541
+ asset_contract: null;
2542
+ slug: null;
2543
+ name: null;
2544
+ description: null;
2545
+ external_link: null;
2546
+ permalink: null;
2547
+ seaport_sell_orders: null;
2548
+ };
2549
+ taker_asset_bundle: {
2550
+ assets: Array<{
2551
+ id: null;
2552
+ token_id: string;
2553
+ num_sales: null;
2554
+ background_color: null;
2555
+ image_url: null;
2556
+ image_preview_url: null;
2557
+ image_thumbnail_url: null;
2558
+ image_original_url: null;
2559
+ animation_url: null;
2560
+ animation_original_url: null;
2561
+ name: string;
2562
+ description: null;
2563
+ external_link: null;
2564
+ asset_contract: {
2565
+ address: string;
2566
+ chain_identifier: string;
2567
+ schema_name: 'NATIVE' | string;
2568
+ asset_contract_type: 'unknown';
2569
+ };
2570
+ permalink: null;
2571
+ collection: null;
2572
+ decimals: number;
2573
+ token_metadata: null;
2574
+ is_nsfw: null;
2575
+ owner: null;
2576
+ }>;
2577
+ maker: null;
2578
+ asset_contract: null;
2579
+ slug: null;
2580
+ name: null;
2581
+ description: null;
2582
+ external_link: null;
2583
+ permalink: null;
2584
+ seaport_sell_orders: null;
2585
+ };
2586
+ };
2587
+ }
2588
+ export interface MemeItem {
2589
+ id: string;
2590
+ chain: string;
2591
+ symbol: string;
2592
+ name: string;
2593
+ logo_url: string;
2594
+ is_verified: boolean;
2595
+ is_core: boolean;
2596
+ credit_score: number;
2597
+ price: number;
2598
+ price_24h_change: number;
2599
+ volume_24h: number;
2600
+ fdv: number;
2601
+ }
2602
+ export interface MemeListResponse {
2603
+ data_list: MemeItem[];
2604
+ pagination: {
2605
+ limit: number;
2606
+ has_next: boolean;
2607
+ next_cursor: string;
2608
+ };
2609
+ }
2610
+ export {};