@rabby-wallet/rabby-api 0.9.4 → 0.9.5-1.beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +459 -10
- package/dist/index.js +499 -22
- package/dist/types.d.ts +1215 -11
- package/package.json +2 -2
package/dist/types.d.ts
CHANGED
|
@@ -73,6 +73,86 @@ export interface Tx {
|
|
|
73
73
|
s?: string;
|
|
74
74
|
v?: string;
|
|
75
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
|
+
}
|
|
76
156
|
export interface Eip1559Tx {
|
|
77
157
|
chainId: number;
|
|
78
158
|
data: string;
|
|
@@ -93,6 +173,32 @@ export interface TotalBalanceResponse {
|
|
|
93
173
|
error_code?: number;
|
|
94
174
|
err_chain_ids?: string[];
|
|
95
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
|
+
}
|
|
96
202
|
export interface TokenItem {
|
|
97
203
|
content_type?: 'image' | 'image_url' | 'video_url' | 'audio_url' | undefined;
|
|
98
204
|
content?: string | undefined;
|
|
@@ -103,6 +209,7 @@ export interface TokenItem {
|
|
|
103
209
|
display_symbol: string | null;
|
|
104
210
|
id: string;
|
|
105
211
|
is_core: boolean;
|
|
212
|
+
credit_score?: number;
|
|
106
213
|
is_verified: boolean;
|
|
107
214
|
is_wallet: boolean;
|
|
108
215
|
is_scam?: boolean;
|
|
@@ -117,8 +224,15 @@ export interface TokenItem {
|
|
|
117
224
|
usd_value?: number;
|
|
118
225
|
raw_amount?: string;
|
|
119
226
|
raw_amount_hex_str?: string;
|
|
227
|
+
protocol_id?: string;
|
|
120
228
|
price_24h_change?: number | null;
|
|
121
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;
|
|
122
236
|
}
|
|
123
237
|
export interface TransferingNFTItem {
|
|
124
238
|
chain: string;
|
|
@@ -265,6 +379,8 @@ export interface NFTItem {
|
|
|
265
379
|
usd_price?: number;
|
|
266
380
|
amount: number;
|
|
267
381
|
collection_id?: string;
|
|
382
|
+
collection_name?: string;
|
|
383
|
+
is_core?: boolean;
|
|
268
384
|
pay_token?: {
|
|
269
385
|
id: string;
|
|
270
386
|
name: string;
|
|
@@ -282,6 +398,7 @@ export interface NFTItem {
|
|
|
282
398
|
collection?: Collection | null;
|
|
283
399
|
is_erc1155?: boolean;
|
|
284
400
|
is_erc721: boolean;
|
|
401
|
+
thumbnail_url?: string;
|
|
285
402
|
}
|
|
286
403
|
export interface Collection {
|
|
287
404
|
id: string;
|
|
@@ -295,6 +412,18 @@ export interface Collection {
|
|
|
295
412
|
create_at: number;
|
|
296
413
|
floor_price: number;
|
|
297
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;
|
|
298
427
|
}
|
|
299
428
|
export interface CollectionList {
|
|
300
429
|
id: string;
|
|
@@ -311,6 +440,8 @@ export interface CollectionList {
|
|
|
311
440
|
floor_price: number;
|
|
312
441
|
nft_list: NFTItem[];
|
|
313
442
|
native_token: TokenItem;
|
|
443
|
+
is_hidden?: boolean;
|
|
444
|
+
is_tradable?: boolean;
|
|
314
445
|
}
|
|
315
446
|
export interface TxDisplayItem extends TxHistoryItem {
|
|
316
447
|
projectDict: TxHistoryResult['project_dict'];
|
|
@@ -329,17 +460,20 @@ export interface TxHistoryItem {
|
|
|
329
460
|
amount: number;
|
|
330
461
|
from_addr: string;
|
|
331
462
|
token_id: string;
|
|
463
|
+
price?: number;
|
|
332
464
|
}[];
|
|
333
465
|
sends: {
|
|
334
466
|
amount: number;
|
|
335
467
|
to_addr: string;
|
|
336
468
|
token_id: string;
|
|
469
|
+
price?: number;
|
|
337
470
|
}[];
|
|
338
471
|
time_at: number;
|
|
339
472
|
token_approve: {
|
|
340
473
|
spender: string;
|
|
341
474
|
token_id: string;
|
|
342
475
|
value: number;
|
|
476
|
+
price?: number;
|
|
343
477
|
} | null;
|
|
344
478
|
tx: {
|
|
345
479
|
eth_gas_fee: number;
|
|
@@ -369,6 +503,7 @@ export interface TxHistoryResult {
|
|
|
369
503
|
}
|
|
370
504
|
export interface TxAllHistoryResult extends Omit<TxHistoryResult, 'token_dict'> {
|
|
371
505
|
token_uuid_dict: Record<string, TokenItem>;
|
|
506
|
+
project_dict: TxHistoryResult['project_dict'];
|
|
372
507
|
}
|
|
373
508
|
export interface GasResult {
|
|
374
509
|
estimated_gas_cost_usd_value: number;
|
|
@@ -666,6 +801,9 @@ export interface PortfolioItemDetail {
|
|
|
666
801
|
usd_value?: number;
|
|
667
802
|
daily_unlock_amount: number;
|
|
668
803
|
pnl_usd_value: number;
|
|
804
|
+
amount?: number;
|
|
805
|
+
price?: number;
|
|
806
|
+
name?: string;
|
|
669
807
|
}
|
|
670
808
|
export interface PortfolioItem {
|
|
671
809
|
asset_token_list: TokenItem[];
|
|
@@ -685,6 +823,20 @@ export interface PortfolioItem {
|
|
|
685
823
|
};
|
|
686
824
|
pool: PoolItem;
|
|
687
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
|
+
};
|
|
688
840
|
}
|
|
689
841
|
export interface Protocol {
|
|
690
842
|
chain: string;
|
|
@@ -821,7 +973,9 @@ export interface AddrDescResponse {
|
|
|
821
973
|
born_at: number;
|
|
822
974
|
is_danger: boolean | null;
|
|
823
975
|
is_spam: boolean | null;
|
|
976
|
+
is_scam: boolean | null;
|
|
824
977
|
name: string;
|
|
978
|
+
id: string;
|
|
825
979
|
};
|
|
826
980
|
}
|
|
827
981
|
export interface SendAction {
|
|
@@ -914,11 +1068,14 @@ export interface PushMultiSigAction {
|
|
|
914
1068
|
multisig_id: string;
|
|
915
1069
|
}
|
|
916
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
|
+
}
|
|
917
1077
|
export interface ParseTxResponse {
|
|
918
|
-
action:
|
|
919
|
-
type: string;
|
|
920
|
-
data: SwapAction | ApproveAction | SendAction | SendNFTAction | ApproveNFTAction | RevokeNFTAction | ApproveNFTCollectionAction | RevokeNFTCollectionAction | RevokeTokenApproveAction | WrapTokenAction | UnWrapTokenAction | PushMultiSigAction | CrossSwapAction | CrossTokenAction | RevokePermit2Action | SwapOrderAction | TransferOwnerAction | MultiSwapAction | SwapLimitPay | null;
|
|
921
|
-
};
|
|
1078
|
+
action: TransactionAction;
|
|
922
1079
|
contract_call?: {
|
|
923
1080
|
func: string;
|
|
924
1081
|
contract: {
|
|
@@ -936,7 +1093,7 @@ export interface CollectionWithFloorPrice {
|
|
|
936
1093
|
name: string;
|
|
937
1094
|
floor_price: number;
|
|
938
1095
|
}
|
|
939
|
-
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';
|
|
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';
|
|
940
1097
|
export interface BuyNFTOrderAction {
|
|
941
1098
|
expire_at: string;
|
|
942
1099
|
pay_token: TokenItem;
|
|
@@ -1020,12 +1177,14 @@ export interface SubmitTokenApprovalModificationAction {
|
|
|
1020
1177
|
logo_url: string;
|
|
1021
1178
|
};
|
|
1022
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
|
+
}
|
|
1023
1186
|
export interface ParseTypedDataResponse {
|
|
1024
|
-
action:
|
|
1025
|
-
type: TypedDataActionName;
|
|
1026
|
-
expire_at?: number;
|
|
1027
|
-
data: SellNFTOrderAction | BuyNFTOrderAction | SwapTokenOrderAction | PermitAction | Permit2Action | SignMultiSigActions | CreateKeyAction | VerifyAddressAction | BatchSellNFTOrderAction | BatchPermit2Action | CreateCoboSafeAction | SubmitSafeRoleModificationAction | SubmitDelegatedAddressModificationAction | SubmitTokenApprovalModificationAction | SendAction | SwapOrderAction | RevokeTokenApproveAction | ApproveNFTAction;
|
|
1028
|
-
} | null;
|
|
1187
|
+
action: TypeDataActionItem | null;
|
|
1029
1188
|
log_id: string;
|
|
1030
1189
|
}
|
|
1031
1190
|
export declare type TextActionName = 'create_key' | 'verify_address';
|
|
@@ -1177,6 +1336,8 @@ export interface SupportedChain {
|
|
|
1177
1336
|
eip_1559: boolean;
|
|
1178
1337
|
is_disabled: boolean;
|
|
1179
1338
|
explorer_host: string;
|
|
1339
|
+
block_interval: number;
|
|
1340
|
+
severity?: number;
|
|
1180
1341
|
}
|
|
1181
1342
|
export interface ChainListItem {
|
|
1182
1343
|
chain_id: number;
|
|
@@ -1189,6 +1350,7 @@ export interface ChainListItem {
|
|
|
1189
1350
|
};
|
|
1190
1351
|
explorer: string | null;
|
|
1191
1352
|
rpc: null | string;
|
|
1353
|
+
rpc_list?: string[];
|
|
1192
1354
|
}
|
|
1193
1355
|
export interface HistoryCurve {
|
|
1194
1356
|
create_at: number;
|
|
@@ -1305,12 +1467,14 @@ export interface BridgeQuote {
|
|
|
1305
1467
|
to: string;
|
|
1306
1468
|
value: string;
|
|
1307
1469
|
};
|
|
1470
|
+
quote_key: Record<string, any>;
|
|
1308
1471
|
}
|
|
1309
1472
|
export interface BridgeHistory {
|
|
1310
1473
|
aggregator: Exclude<BridgeAggregator, 'bridge_list'>;
|
|
1311
1474
|
bridge: BridgeItem;
|
|
1312
1475
|
from_token: TokenItem;
|
|
1313
1476
|
to_token: TokenItem;
|
|
1477
|
+
to_actual_token: TokenItem;
|
|
1314
1478
|
quote: {
|
|
1315
1479
|
pay_token_amount: number;
|
|
1316
1480
|
receive_token_amount: number;
|
|
@@ -1320,8 +1484,14 @@ export interface BridgeHistory {
|
|
|
1320
1484
|
receive_token_amount: number;
|
|
1321
1485
|
};
|
|
1322
1486
|
detail_url: string;
|
|
1323
|
-
status: 'pending' | 'completed';
|
|
1487
|
+
status: 'pending' | 'completed' | 'failed';
|
|
1324
1488
|
create_at: number;
|
|
1489
|
+
from_tx: {
|
|
1490
|
+
tx_id: string;
|
|
1491
|
+
};
|
|
1492
|
+
to_tx: {
|
|
1493
|
+
tx_id?: string;
|
|
1494
|
+
};
|
|
1325
1495
|
from_gas: {
|
|
1326
1496
|
native_token: TokenItem;
|
|
1327
1497
|
gas_amount: number;
|
|
@@ -1360,6 +1530,12 @@ export interface ContractInfo {
|
|
|
1360
1530
|
};
|
|
1361
1531
|
is_phishing: boolean | null;
|
|
1362
1532
|
}
|
|
1533
|
+
export interface PerpTopToken {
|
|
1534
|
+
id: number;
|
|
1535
|
+
name: string;
|
|
1536
|
+
full_logo_url: string | null;
|
|
1537
|
+
daily_volume: number;
|
|
1538
|
+
}
|
|
1363
1539
|
export interface GasAccountCheckResult {
|
|
1364
1540
|
gas_account_cost: {
|
|
1365
1541
|
total_cost: number;
|
|
@@ -1370,6 +1546,7 @@ export interface GasAccountCheckResult {
|
|
|
1370
1546
|
is_gas_account: boolean;
|
|
1371
1547
|
balance_is_enough: boolean;
|
|
1372
1548
|
chain_not_support: boolean;
|
|
1549
|
+
err_msg: string;
|
|
1373
1550
|
}
|
|
1374
1551
|
export interface ParseCommonResponse {
|
|
1375
1552
|
input_type: 'typed_data' | 'text' | 'tx';
|
|
@@ -1380,4 +1557,1031 @@ export interface ParseCommonResponse {
|
|
|
1380
1557
|
contract_call_data: ParseTxResponse['contract_call'] | null;
|
|
1381
1558
|
pre_exec?: PreExecResult['pre_exec'];
|
|
1382
1559
|
}
|
|
1560
|
+
export interface RechargeChainItem {
|
|
1561
|
+
chain_id: string;
|
|
1562
|
+
withdraw_limit: number;
|
|
1563
|
+
withdraw_fee: number;
|
|
1564
|
+
l1_balance: number;
|
|
1565
|
+
}
|
|
1566
|
+
export interface WithdrawListAddressItem {
|
|
1567
|
+
recharge_addr: string;
|
|
1568
|
+
total_withdraw_limit: number;
|
|
1569
|
+
recharge_chain_list: RechargeChainItem[];
|
|
1570
|
+
}
|
|
1571
|
+
export interface BuyCountryItem {
|
|
1572
|
+
id: string;
|
|
1573
|
+
name: string;
|
|
1574
|
+
image_url: string;
|
|
1575
|
+
regions: null | {
|
|
1576
|
+
regionCode: string;
|
|
1577
|
+
name: string;
|
|
1578
|
+
};
|
|
1579
|
+
}
|
|
1580
|
+
export interface BuyServiceProvider {
|
|
1581
|
+
id: string;
|
|
1582
|
+
name: string;
|
|
1583
|
+
website_url: string;
|
|
1584
|
+
customer_support_url: string;
|
|
1585
|
+
image_url: string;
|
|
1586
|
+
logo_url: string;
|
|
1587
|
+
}
|
|
1588
|
+
export interface BuyQuoteItem {
|
|
1589
|
+
service_provider: BuyServiceProvider;
|
|
1590
|
+
token_amount: number;
|
|
1591
|
+
payment_method_type: string;
|
|
1592
|
+
}
|
|
1593
|
+
export interface BuyHistoryItem {
|
|
1594
|
+
id: string;
|
|
1595
|
+
user_addr: string;
|
|
1596
|
+
status: string;
|
|
1597
|
+
create_at: number;
|
|
1598
|
+
service_provider: BuyServiceProvider;
|
|
1599
|
+
service_provider_url: null | string;
|
|
1600
|
+
pay_usd_amount: number;
|
|
1601
|
+
pay_currency_code: string;
|
|
1602
|
+
payment_type: string;
|
|
1603
|
+
receive_chain_id: string;
|
|
1604
|
+
receive_tx_id: string;
|
|
1605
|
+
receive_token_id: string;
|
|
1606
|
+
receive_amount: number;
|
|
1607
|
+
receive_token: TokenItem;
|
|
1608
|
+
}
|
|
1609
|
+
export interface BuyHistoryList {
|
|
1610
|
+
pagination: {
|
|
1611
|
+
start: number;
|
|
1612
|
+
limit: number;
|
|
1613
|
+
total: number;
|
|
1614
|
+
};
|
|
1615
|
+
histories: BuyHistoryItem[];
|
|
1616
|
+
}
|
|
1617
|
+
export interface BuyPaymentMethod {
|
|
1618
|
+
id: string;
|
|
1619
|
+
name: string;
|
|
1620
|
+
type: string;
|
|
1621
|
+
logo_url: string;
|
|
1622
|
+
}
|
|
1623
|
+
export interface GasAccountInfo {
|
|
1624
|
+
id: string;
|
|
1625
|
+
balance: number;
|
|
1626
|
+
create_at: number;
|
|
1627
|
+
nonce: number;
|
|
1628
|
+
uuid: string;
|
|
1629
|
+
has_iap_order: boolean;
|
|
1630
|
+
no_register: boolean;
|
|
1631
|
+
non_withdrawable_balance: number | undefined;
|
|
1632
|
+
withdrawable_balance: number | undefined;
|
|
1633
|
+
}
|
|
1634
|
+
export interface AppChainItem {
|
|
1635
|
+
id: string;
|
|
1636
|
+
name: string;
|
|
1637
|
+
site_url: string;
|
|
1638
|
+
logo_url: string;
|
|
1639
|
+
is_support_portfolio: boolean;
|
|
1640
|
+
is_visible: boolean;
|
|
1641
|
+
portfolio_item_list: PortfolioItem[];
|
|
1642
|
+
}
|
|
1643
|
+
export interface AppChainListResponse {
|
|
1644
|
+
apps: AppChainItem[];
|
|
1645
|
+
error_apps: {
|
|
1646
|
+
create_at: number;
|
|
1647
|
+
id: string;
|
|
1648
|
+
is_support_portfolio: boolean;
|
|
1649
|
+
is_visible: boolean;
|
|
1650
|
+
logo_url: string;
|
|
1651
|
+
name: string;
|
|
1652
|
+
site_url: string;
|
|
1653
|
+
update_at: number;
|
|
1654
|
+
}[];
|
|
1655
|
+
}
|
|
1656
|
+
export declare type DefaultRPCRes = {
|
|
1657
|
+
message: string;
|
|
1658
|
+
status: string;
|
|
1659
|
+
rpcs: RPCDefaultItem[];
|
|
1660
|
+
};
|
|
1661
|
+
declare type RPCDefaultItem = {
|
|
1662
|
+
chainId: string;
|
|
1663
|
+
rpcUrl: string[];
|
|
1664
|
+
txPushToRPC: boolean;
|
|
1665
|
+
};
|
|
1666
|
+
export interface TokenDetailWithPriceCurve extends TokenItemWithEntity {
|
|
1667
|
+
price_curve_24h: {
|
|
1668
|
+
time_at: number;
|
|
1669
|
+
price: number;
|
|
1670
|
+
}[];
|
|
1671
|
+
}
|
|
1672
|
+
export declare type GiftEligibilityItem = {
|
|
1673
|
+
id?: string;
|
|
1674
|
+
has_eligibility: boolean;
|
|
1675
|
+
can_claimed_usd_value: number;
|
|
1676
|
+
};
|
|
1677
|
+
export declare type KlineDataItem = [
|
|
1678
|
+
time_at: number,
|
|
1679
|
+
open: number,
|
|
1680
|
+
high: number,
|
|
1681
|
+
low: number,
|
|
1682
|
+
close: number,
|
|
1683
|
+
volume_amount: number,
|
|
1684
|
+
volume_usd_value: number
|
|
1685
|
+
];
|
|
1686
|
+
export declare type TokenMarketInfo = {
|
|
1687
|
+
market: {
|
|
1688
|
+
volume_amount_24h: number | null;
|
|
1689
|
+
volume_usd_value_24h: number | null;
|
|
1690
|
+
txns_24h: number | null;
|
|
1691
|
+
};
|
|
1692
|
+
};
|
|
1693
|
+
export declare type TokenHolderInfo = {
|
|
1694
|
+
holder_count: number | null;
|
|
1695
|
+
};
|
|
1696
|
+
export declare type TokenSupplyInfo = {
|
|
1697
|
+
market_cap_usd_value: number | null;
|
|
1698
|
+
total_supply: number | null;
|
|
1699
|
+
circulating_supply: number | null;
|
|
1700
|
+
max_supply: number | null;
|
|
1701
|
+
};
|
|
1702
|
+
export declare type UserFeedbackItem = {
|
|
1703
|
+
id: string;
|
|
1704
|
+
title: string;
|
|
1705
|
+
content: string;
|
|
1706
|
+
image_url_list: string[];
|
|
1707
|
+
status: 'pending' | 'complete' | 'closed';
|
|
1708
|
+
create_at: number;
|
|
1709
|
+
comment: string | null;
|
|
1710
|
+
comment_at: number | null;
|
|
1711
|
+
extra?: any | null;
|
|
1712
|
+
};
|
|
1713
|
+
export declare type CurrencyItem = {
|
|
1714
|
+
symbol: string;
|
|
1715
|
+
code: string;
|
|
1716
|
+
logo_url: string;
|
|
1717
|
+
usd_rate: number;
|
|
1718
|
+
};
|
|
1719
|
+
export interface PerpBridgeQuote {
|
|
1720
|
+
tx: {
|
|
1721
|
+
chainId: number;
|
|
1722
|
+
data: string;
|
|
1723
|
+
from: string;
|
|
1724
|
+
gas: string;
|
|
1725
|
+
gasPrice: string;
|
|
1726
|
+
nonce: string;
|
|
1727
|
+
to: string;
|
|
1728
|
+
value: string;
|
|
1729
|
+
};
|
|
1730
|
+
bridge_id: string;
|
|
1731
|
+
bridge: BridgeItem | null;
|
|
1732
|
+
to_token_raw_amount: number;
|
|
1733
|
+
to_token_raw_amount_hex_str: string;
|
|
1734
|
+
to_token_amount: number;
|
|
1735
|
+
approve_contract_id: string;
|
|
1736
|
+
protocol_fee: {
|
|
1737
|
+
raw_amount_hex_str: string;
|
|
1738
|
+
usd_value: number;
|
|
1739
|
+
};
|
|
1740
|
+
rabby_fee: {
|
|
1741
|
+
raw_amount_hex_str: string;
|
|
1742
|
+
usd_value: number;
|
|
1743
|
+
};
|
|
1744
|
+
gas_fee: {
|
|
1745
|
+
raw_amount_hex_str: string;
|
|
1746
|
+
usd_value: number;
|
|
1747
|
+
};
|
|
1748
|
+
duration: number;
|
|
1749
|
+
}
|
|
1750
|
+
export declare type MarketSummaryItem = {
|
|
1751
|
+
price?: {
|
|
1752
|
+
open?: number;
|
|
1753
|
+
close?: number;
|
|
1754
|
+
change?: number;
|
|
1755
|
+
};
|
|
1756
|
+
summary: {
|
|
1757
|
+
buy?: {
|
|
1758
|
+
count?: number;
|
|
1759
|
+
volume_amount?: number;
|
|
1760
|
+
volume_usd_value?: number;
|
|
1761
|
+
};
|
|
1762
|
+
sell?: {
|
|
1763
|
+
count?: number;
|
|
1764
|
+
volume_amount?: number;
|
|
1765
|
+
volume_usd_value?: number;
|
|
1766
|
+
};
|
|
1767
|
+
totals?: {
|
|
1768
|
+
trading_count?: number;
|
|
1769
|
+
volume_amount?: number;
|
|
1770
|
+
volume_usd_value?: number;
|
|
1771
|
+
addresses?: number;
|
|
1772
|
+
};
|
|
1773
|
+
};
|
|
1774
|
+
};
|
|
1775
|
+
export declare type MarketSummary = {
|
|
1776
|
+
'5m'?: MarketSummaryItem | null;
|
|
1777
|
+
'1h'?: MarketSummaryItem | null;
|
|
1778
|
+
'6h'?: MarketSummaryItem | null;
|
|
1779
|
+
'24h'?: MarketSummaryItem | null;
|
|
1780
|
+
};
|
|
1781
|
+
export declare type MarketTradingHistoryItem = {
|
|
1782
|
+
id: string;
|
|
1783
|
+
time_at?: number;
|
|
1784
|
+
action?: 'buy' | 'sell';
|
|
1785
|
+
price?: number;
|
|
1786
|
+
amount?: number;
|
|
1787
|
+
usd_value?: number;
|
|
1788
|
+
tx_id?: string;
|
|
1789
|
+
user_addr?: string;
|
|
1790
|
+
};
|
|
1791
|
+
export declare type TokenHolderSummary = {
|
|
1792
|
+
ratio_top10?: number;
|
|
1793
|
+
ratio_top100?: number;
|
|
1794
|
+
};
|
|
1795
|
+
export declare type TokenHolderItem = {
|
|
1796
|
+
user_addr?: string;
|
|
1797
|
+
amount?: number;
|
|
1798
|
+
ratio?: number;
|
|
1799
|
+
};
|
|
1800
|
+
export declare type LiquidityPoolItem = {
|
|
1801
|
+
id: string;
|
|
1802
|
+
tokens: {
|
|
1803
|
+
id: string;
|
|
1804
|
+
amount: number;
|
|
1805
|
+
symbol: string;
|
|
1806
|
+
price: number;
|
|
1807
|
+
usd_value: number;
|
|
1808
|
+
}[];
|
|
1809
|
+
project: {
|
|
1810
|
+
id: string;
|
|
1811
|
+
name: string;
|
|
1812
|
+
logo_url: string;
|
|
1813
|
+
};
|
|
1814
|
+
pool_id: string;
|
|
1815
|
+
usd_value: number;
|
|
1816
|
+
};
|
|
1817
|
+
export declare type LiquidityPoolHistoryItem = {
|
|
1818
|
+
id: string;
|
|
1819
|
+
tx_id: string;
|
|
1820
|
+
time_at: number;
|
|
1821
|
+
usd_value: number;
|
|
1822
|
+
action: 'add' | 'remove';
|
|
1823
|
+
tokens: {
|
|
1824
|
+
id: string;
|
|
1825
|
+
amount: number;
|
|
1826
|
+
symbol: string;
|
|
1827
|
+
price: number;
|
|
1828
|
+
usd_value: number;
|
|
1829
|
+
}[];
|
|
1830
|
+
};
|
|
1831
|
+
export declare type NFTTradingConfig = Record<string, {
|
|
1832
|
+
currency: string[];
|
|
1833
|
+
seaport_v16_address: string;
|
|
1834
|
+
opensea_chain_id: string;
|
|
1835
|
+
opensea_fee_recipient: string;
|
|
1836
|
+
opensea_conduit_address: string;
|
|
1837
|
+
listing_currency: {
|
|
1838
|
+
symbol: string;
|
|
1839
|
+
token_id: string;
|
|
1840
|
+
};
|
|
1841
|
+
offer_currency: {
|
|
1842
|
+
symbol: string;
|
|
1843
|
+
token_id: string;
|
|
1844
|
+
};
|
|
1845
|
+
}>;
|
|
1846
|
+
export interface NFTDetail extends NFTItem {
|
|
1847
|
+
best_offer_order: {
|
|
1848
|
+
order_hash: string;
|
|
1849
|
+
chain: string;
|
|
1850
|
+
protocol_data: {
|
|
1851
|
+
parameters: {
|
|
1852
|
+
offerer: string;
|
|
1853
|
+
offer: Array<{
|
|
1854
|
+
itemType: number;
|
|
1855
|
+
token: string;
|
|
1856
|
+
identifierOrCriteria: string;
|
|
1857
|
+
startAmount: string;
|
|
1858
|
+
endAmount: string;
|
|
1859
|
+
}>;
|
|
1860
|
+
consideration: Array<{
|
|
1861
|
+
itemType: number;
|
|
1862
|
+
token: string;
|
|
1863
|
+
identifierOrCriteria: string;
|
|
1864
|
+
startAmount: string;
|
|
1865
|
+
endAmount: string;
|
|
1866
|
+
recipient: string;
|
|
1867
|
+
}>;
|
|
1868
|
+
startTime: string;
|
|
1869
|
+
endTime: string;
|
|
1870
|
+
orderType: number;
|
|
1871
|
+
zone: string;
|
|
1872
|
+
zoneHash: string;
|
|
1873
|
+
salt: string;
|
|
1874
|
+
conduitKey: string;
|
|
1875
|
+
totalOriginalConsiderationItems: number;
|
|
1876
|
+
counter: number;
|
|
1877
|
+
};
|
|
1878
|
+
signature: null;
|
|
1879
|
+
};
|
|
1880
|
+
protocol_address: string;
|
|
1881
|
+
remaining_quantity: number;
|
|
1882
|
+
criteria: {
|
|
1883
|
+
collection: {
|
|
1884
|
+
slug: string;
|
|
1885
|
+
};
|
|
1886
|
+
contract: {
|
|
1887
|
+
address: string;
|
|
1888
|
+
};
|
|
1889
|
+
trait: null;
|
|
1890
|
+
traits: null;
|
|
1891
|
+
encoded_token_ids: string;
|
|
1892
|
+
};
|
|
1893
|
+
price: {
|
|
1894
|
+
currency: string;
|
|
1895
|
+
decimals: number;
|
|
1896
|
+
value: string;
|
|
1897
|
+
};
|
|
1898
|
+
status: 'ACTIVE' | string;
|
|
1899
|
+
} | null;
|
|
1900
|
+
rarity: {
|
|
1901
|
+
strategy_id: 'openrarity' | string;
|
|
1902
|
+
strategy_version: string;
|
|
1903
|
+
rank: number;
|
|
1904
|
+
} | null;
|
|
1905
|
+
last_sale?: {
|
|
1906
|
+
event_type: 'sale' | string;
|
|
1907
|
+
event_timestamp: number;
|
|
1908
|
+
transaction: string;
|
|
1909
|
+
payment: {
|
|
1910
|
+
quantity: string;
|
|
1911
|
+
decimals: number;
|
|
1912
|
+
symbol: string;
|
|
1913
|
+
token_id: string;
|
|
1914
|
+
price: number;
|
|
1915
|
+
};
|
|
1916
|
+
seller: string;
|
|
1917
|
+
buyer: string;
|
|
1918
|
+
quantity: number;
|
|
1919
|
+
} | null;
|
|
1920
|
+
}
|
|
1921
|
+
export interface NFTListingOrder {
|
|
1922
|
+
created_date: string;
|
|
1923
|
+
closing_date: string;
|
|
1924
|
+
listing_time: number;
|
|
1925
|
+
expiration_time: number;
|
|
1926
|
+
order_hash: string;
|
|
1927
|
+
protocol_data: {
|
|
1928
|
+
parameters: {
|
|
1929
|
+
offerer: string;
|
|
1930
|
+
offer: Array<{
|
|
1931
|
+
itemType: number;
|
|
1932
|
+
token: string;
|
|
1933
|
+
identifierOrCriteria: string;
|
|
1934
|
+
startAmount: string;
|
|
1935
|
+
endAmount: string;
|
|
1936
|
+
}>;
|
|
1937
|
+
consideration: Array<{
|
|
1938
|
+
itemType: number;
|
|
1939
|
+
token: string;
|
|
1940
|
+
identifierOrCriteria: string;
|
|
1941
|
+
startAmount: string;
|
|
1942
|
+
endAmount: string;
|
|
1943
|
+
recipient: string;
|
|
1944
|
+
}>;
|
|
1945
|
+
startTime: string;
|
|
1946
|
+
endTime: string;
|
|
1947
|
+
orderType: number;
|
|
1948
|
+
zone: string;
|
|
1949
|
+
zoneHash: string;
|
|
1950
|
+
salt: string;
|
|
1951
|
+
conduitKey: string;
|
|
1952
|
+
totalOriginalConsiderationItems: number;
|
|
1953
|
+
counter: number;
|
|
1954
|
+
};
|
|
1955
|
+
signature: null;
|
|
1956
|
+
};
|
|
1957
|
+
protocol_address: string;
|
|
1958
|
+
current_price: string;
|
|
1959
|
+
maker: {
|
|
1960
|
+
address: string;
|
|
1961
|
+
profile_img_url: null;
|
|
1962
|
+
config: null;
|
|
1963
|
+
};
|
|
1964
|
+
taker: null;
|
|
1965
|
+
maker_fees: any[];
|
|
1966
|
+
taker_fees: any[];
|
|
1967
|
+
side: 'ask' | 'bid';
|
|
1968
|
+
order_type: 'basic' | string;
|
|
1969
|
+
cancelled: boolean;
|
|
1970
|
+
finalized: boolean;
|
|
1971
|
+
marked_invalid: boolean;
|
|
1972
|
+
remaining_quantity: number;
|
|
1973
|
+
maker_asset_bundle: {
|
|
1974
|
+
assets: Array<{
|
|
1975
|
+
id: null;
|
|
1976
|
+
token_id: string;
|
|
1977
|
+
num_sales: null;
|
|
1978
|
+
background_color: null;
|
|
1979
|
+
image_url: string | null;
|
|
1980
|
+
image_preview_url: null;
|
|
1981
|
+
image_thumbnail_url: null;
|
|
1982
|
+
image_original_url: null;
|
|
1983
|
+
animation_url: null;
|
|
1984
|
+
animation_original_url: null;
|
|
1985
|
+
name: string;
|
|
1986
|
+
description: string | null;
|
|
1987
|
+
external_link: null;
|
|
1988
|
+
asset_contract: {
|
|
1989
|
+
address: string;
|
|
1990
|
+
chain_identifier: string;
|
|
1991
|
+
schema_name: 'ERC721' | 'ERC1155' | 'NATIVE' | string;
|
|
1992
|
+
asset_contract_type: 'non-fungible' | 'semi-fungible' | 'unknown';
|
|
1993
|
+
};
|
|
1994
|
+
permalink: string | null;
|
|
1995
|
+
collection: {
|
|
1996
|
+
collection: string;
|
|
1997
|
+
name: string;
|
|
1998
|
+
description: string;
|
|
1999
|
+
image_url: string;
|
|
2000
|
+
banner_image_url: string;
|
|
2001
|
+
owner: string;
|
|
2002
|
+
safelist_status: 'not_requested' | 'verified' | string;
|
|
2003
|
+
category: string;
|
|
2004
|
+
is_disabled: boolean;
|
|
2005
|
+
is_nsfw: boolean;
|
|
2006
|
+
trait_offers_enabled: boolean;
|
|
2007
|
+
collection_offers_enabled: boolean;
|
|
2008
|
+
opensea_url: string;
|
|
2009
|
+
project_url: string;
|
|
2010
|
+
wiki_url: string;
|
|
2011
|
+
discord_url: string;
|
|
2012
|
+
telegram_url: string;
|
|
2013
|
+
twitter_username: string;
|
|
2014
|
+
instagram_username: string;
|
|
2015
|
+
contracts: Array<{
|
|
2016
|
+
address: string;
|
|
2017
|
+
chain: string;
|
|
2018
|
+
}>;
|
|
2019
|
+
} | null;
|
|
2020
|
+
decimals: number | null;
|
|
2021
|
+
token_metadata: null;
|
|
2022
|
+
is_nsfw: boolean | null;
|
|
2023
|
+
owner: {
|
|
2024
|
+
address: string;
|
|
2025
|
+
profile_img_url: null;
|
|
2026
|
+
config: null;
|
|
2027
|
+
} | null;
|
|
2028
|
+
}>;
|
|
2029
|
+
maker: null;
|
|
2030
|
+
asset_contract: null;
|
|
2031
|
+
slug: null;
|
|
2032
|
+
name: null;
|
|
2033
|
+
description: null;
|
|
2034
|
+
external_link: null;
|
|
2035
|
+
permalink: null;
|
|
2036
|
+
seaport_sell_orders: null;
|
|
2037
|
+
};
|
|
2038
|
+
taker_asset_bundle: {
|
|
2039
|
+
assets: Array<{
|
|
2040
|
+
id: null;
|
|
2041
|
+
token_id: string;
|
|
2042
|
+
num_sales: null;
|
|
2043
|
+
background_color: null;
|
|
2044
|
+
image_url: string | null;
|
|
2045
|
+
image_preview_url: null;
|
|
2046
|
+
image_thumbnail_url: null;
|
|
2047
|
+
image_original_url: null;
|
|
2048
|
+
animation_url: null;
|
|
2049
|
+
animation_original_url: null;
|
|
2050
|
+
name: string;
|
|
2051
|
+
description: string | null;
|
|
2052
|
+
external_link: null;
|
|
2053
|
+
asset_contract: {
|
|
2054
|
+
address: string;
|
|
2055
|
+
chain_identifier: string;
|
|
2056
|
+
schema_name: 'ERC721' | 'ERC1155' | 'NATIVE' | string;
|
|
2057
|
+
asset_contract_type: 'non-fungible' | 'semi-fungible' | 'unknown';
|
|
2058
|
+
};
|
|
2059
|
+
permalink: string | null;
|
|
2060
|
+
collection: {
|
|
2061
|
+
collection: string;
|
|
2062
|
+
name: string;
|
|
2063
|
+
description: string;
|
|
2064
|
+
image_url: string;
|
|
2065
|
+
banner_image_url: string;
|
|
2066
|
+
owner: string;
|
|
2067
|
+
safelist_status: 'not_requested' | 'verified' | string;
|
|
2068
|
+
category: string;
|
|
2069
|
+
is_disabled: boolean;
|
|
2070
|
+
is_nsfw: boolean;
|
|
2071
|
+
trait_offers_enabled: boolean;
|
|
2072
|
+
collection_offers_enabled: boolean;
|
|
2073
|
+
opensea_url: string;
|
|
2074
|
+
project_url: string;
|
|
2075
|
+
wiki_url: string;
|
|
2076
|
+
discord_url: string;
|
|
2077
|
+
telegram_url: string;
|
|
2078
|
+
twitter_username: string;
|
|
2079
|
+
instagram_username: string;
|
|
2080
|
+
contracts: Array<{
|
|
2081
|
+
address: string;
|
|
2082
|
+
chain: string;
|
|
2083
|
+
}>;
|
|
2084
|
+
} | null;
|
|
2085
|
+
decimals: number | null;
|
|
2086
|
+
token_metadata: null;
|
|
2087
|
+
is_nsfw: boolean | null;
|
|
2088
|
+
owner: {
|
|
2089
|
+
address: string;
|
|
2090
|
+
profile_img_url: null;
|
|
2091
|
+
config: null;
|
|
2092
|
+
} | null;
|
|
2093
|
+
}>;
|
|
2094
|
+
maker: null;
|
|
2095
|
+
asset_contract: null;
|
|
2096
|
+
slug: null;
|
|
2097
|
+
name: null;
|
|
2098
|
+
description: null;
|
|
2099
|
+
external_link: null;
|
|
2100
|
+
permalink: null;
|
|
2101
|
+
seaport_sell_orders: null;
|
|
2102
|
+
};
|
|
2103
|
+
}
|
|
2104
|
+
export interface NFTListingResponse {
|
|
2105
|
+
orders: NFTListingOrder[];
|
|
2106
|
+
next: string | null;
|
|
2107
|
+
}
|
|
2108
|
+
export interface PrepareListingNFTResponse {
|
|
2109
|
+
data: {
|
|
2110
|
+
sign: {
|
|
2111
|
+
signatureKind: string;
|
|
2112
|
+
domain: {
|
|
2113
|
+
name: string;
|
|
2114
|
+
version: string;
|
|
2115
|
+
chainId: number;
|
|
2116
|
+
verifyingContract: string;
|
|
2117
|
+
};
|
|
2118
|
+
types: {
|
|
2119
|
+
EIP712Domain: Array<{
|
|
2120
|
+
name: string;
|
|
2121
|
+
type: string;
|
|
2122
|
+
}>;
|
|
2123
|
+
OrderComponents: Array<{
|
|
2124
|
+
name: string;
|
|
2125
|
+
type: string;
|
|
2126
|
+
}>;
|
|
2127
|
+
OfferItem: Array<{
|
|
2128
|
+
name: string;
|
|
2129
|
+
type: string;
|
|
2130
|
+
}>;
|
|
2131
|
+
ConsiderationItem: Array<{
|
|
2132
|
+
name: string;
|
|
2133
|
+
type: string;
|
|
2134
|
+
}>;
|
|
2135
|
+
};
|
|
2136
|
+
value: {
|
|
2137
|
+
offerer: string;
|
|
2138
|
+
zone: string;
|
|
2139
|
+
offer: Array<{
|
|
2140
|
+
itemType: number;
|
|
2141
|
+
token: string;
|
|
2142
|
+
identifierOrCriteria: string;
|
|
2143
|
+
startAmount: string;
|
|
2144
|
+
endAmount: string;
|
|
2145
|
+
}>;
|
|
2146
|
+
consideration: Array<{
|
|
2147
|
+
itemType: number;
|
|
2148
|
+
token: string;
|
|
2149
|
+
identifierOrCriteria: string;
|
|
2150
|
+
startAmount: string;
|
|
2151
|
+
endAmount: string;
|
|
2152
|
+
recipient: string;
|
|
2153
|
+
}>;
|
|
2154
|
+
orderType: number;
|
|
2155
|
+
startTime: string;
|
|
2156
|
+
endTime: string;
|
|
2157
|
+
zoneHash: string;
|
|
2158
|
+
salt: string;
|
|
2159
|
+
conduitKey: string;
|
|
2160
|
+
counter: string;
|
|
2161
|
+
};
|
|
2162
|
+
primaryType: string;
|
|
2163
|
+
};
|
|
2164
|
+
post: {
|
|
2165
|
+
endpoint: string;
|
|
2166
|
+
method: string;
|
|
2167
|
+
body: {
|
|
2168
|
+
order: {
|
|
2169
|
+
kind: string;
|
|
2170
|
+
data: {
|
|
2171
|
+
offerer: string;
|
|
2172
|
+
zone: string;
|
|
2173
|
+
offer: Array<{
|
|
2174
|
+
itemType: number;
|
|
2175
|
+
token: string;
|
|
2176
|
+
identifierOrCriteria: string;
|
|
2177
|
+
startAmount: string;
|
|
2178
|
+
endAmount: string;
|
|
2179
|
+
}>;
|
|
2180
|
+
consideration: Array<{
|
|
2181
|
+
itemType: number;
|
|
2182
|
+
token: string;
|
|
2183
|
+
identifierOrCriteria: string;
|
|
2184
|
+
startAmount: string;
|
|
2185
|
+
endAmount: string;
|
|
2186
|
+
recipient: string;
|
|
2187
|
+
}>;
|
|
2188
|
+
orderType: number;
|
|
2189
|
+
startTime: string;
|
|
2190
|
+
endTime: string;
|
|
2191
|
+
zoneHash: string;
|
|
2192
|
+
salt: string;
|
|
2193
|
+
conduitKey: string;
|
|
2194
|
+
counter: string;
|
|
2195
|
+
};
|
|
2196
|
+
};
|
|
2197
|
+
};
|
|
2198
|
+
};
|
|
2199
|
+
};
|
|
2200
|
+
}
|
|
2201
|
+
export interface PrepareAcceptNFTOfferResponse {
|
|
2202
|
+
data: {
|
|
2203
|
+
protocol: string;
|
|
2204
|
+
fulfillment_data: {
|
|
2205
|
+
transaction: {
|
|
2206
|
+
function: string;
|
|
2207
|
+
chain: number;
|
|
2208
|
+
to: string;
|
|
2209
|
+
value: number;
|
|
2210
|
+
input_data: {
|
|
2211
|
+
advancedOrder: {
|
|
2212
|
+
parameters: {
|
|
2213
|
+
offerer: string;
|
|
2214
|
+
zone: string;
|
|
2215
|
+
zoneHash: string;
|
|
2216
|
+
startTime: string;
|
|
2217
|
+
endTime: string;
|
|
2218
|
+
orderType: number;
|
|
2219
|
+
salt: string;
|
|
2220
|
+
conduitKey: string;
|
|
2221
|
+
totalOriginalConsiderationItems: number;
|
|
2222
|
+
offer: Array<{
|
|
2223
|
+
itemType: number;
|
|
2224
|
+
token: string;
|
|
2225
|
+
identifierOrCriteria: string;
|
|
2226
|
+
startAmount: string;
|
|
2227
|
+
endAmount: string;
|
|
2228
|
+
}>;
|
|
2229
|
+
consideration: Array<{
|
|
2230
|
+
itemType: number;
|
|
2231
|
+
token: string;
|
|
2232
|
+
identifierOrCriteria: string;
|
|
2233
|
+
startAmount: string;
|
|
2234
|
+
endAmount: string;
|
|
2235
|
+
recipient: string;
|
|
2236
|
+
}>;
|
|
2237
|
+
counter: number;
|
|
2238
|
+
};
|
|
2239
|
+
numerator: string;
|
|
2240
|
+
denominator: string;
|
|
2241
|
+
signature: string;
|
|
2242
|
+
extraData: string;
|
|
2243
|
+
};
|
|
2244
|
+
criteriaResolvers?: Array<{
|
|
2245
|
+
orderIndex: number;
|
|
2246
|
+
side: number;
|
|
2247
|
+
index: number;
|
|
2248
|
+
identifier: string;
|
|
2249
|
+
criteriaProof: string[];
|
|
2250
|
+
}>;
|
|
2251
|
+
fulfillerConduitKey?: string;
|
|
2252
|
+
recipient: string;
|
|
2253
|
+
} | {
|
|
2254
|
+
basicOrderParameters: {
|
|
2255
|
+
considerationToken: string;
|
|
2256
|
+
considerationIdentifier: string;
|
|
2257
|
+
considerationAmount: string;
|
|
2258
|
+
offerer: string;
|
|
2259
|
+
zone: string;
|
|
2260
|
+
offerToken: string;
|
|
2261
|
+
offerIdentifier: string;
|
|
2262
|
+
offerAmount: string;
|
|
2263
|
+
basicOrderType: number;
|
|
2264
|
+
startTime: string;
|
|
2265
|
+
endTime: string;
|
|
2266
|
+
zoneHash: string;
|
|
2267
|
+
salt: string;
|
|
2268
|
+
offererConduitKey: string;
|
|
2269
|
+
fulfillerConduitKey: string;
|
|
2270
|
+
totalOriginalAdditionalRecipients: number;
|
|
2271
|
+
additionalRecipients: Array<{
|
|
2272
|
+
amount: string;
|
|
2273
|
+
recipient: string;
|
|
2274
|
+
}>;
|
|
2275
|
+
signature: string;
|
|
2276
|
+
};
|
|
2277
|
+
} | {
|
|
2278
|
+
order: {
|
|
2279
|
+
parameters: {
|
|
2280
|
+
offerer: string;
|
|
2281
|
+
zone: string;
|
|
2282
|
+
zoneHash: string;
|
|
2283
|
+
startTime: string;
|
|
2284
|
+
endTime: string;
|
|
2285
|
+
orderType: number;
|
|
2286
|
+
salt: string;
|
|
2287
|
+
conduitKey: string;
|
|
2288
|
+
totalOriginalConsiderationItems: number;
|
|
2289
|
+
offer: Array<{
|
|
2290
|
+
itemType: number;
|
|
2291
|
+
token: string;
|
|
2292
|
+
identifierOrCriteria: string;
|
|
2293
|
+
startAmount: string;
|
|
2294
|
+
endAmount: string;
|
|
2295
|
+
}>;
|
|
2296
|
+
consideration: Array<{
|
|
2297
|
+
itemType: number;
|
|
2298
|
+
token: string;
|
|
2299
|
+
identifierOrCriteria: string;
|
|
2300
|
+
startAmount: string;
|
|
2301
|
+
endAmount: string;
|
|
2302
|
+
recipient: string;
|
|
2303
|
+
}>;
|
|
2304
|
+
counter: number;
|
|
2305
|
+
};
|
|
2306
|
+
signature: string;
|
|
2307
|
+
};
|
|
2308
|
+
fulfillerConduitKey?: string;
|
|
2309
|
+
recipient: string;
|
|
2310
|
+
} | {
|
|
2311
|
+
orders: Array<{
|
|
2312
|
+
parameters: {
|
|
2313
|
+
offerer: string;
|
|
2314
|
+
zone: string;
|
|
2315
|
+
zoneHash: string;
|
|
2316
|
+
startTime: string;
|
|
2317
|
+
endTime: string;
|
|
2318
|
+
orderType: number;
|
|
2319
|
+
salt: string;
|
|
2320
|
+
conduitKey: string;
|
|
2321
|
+
totalOriginalConsiderationItems: number;
|
|
2322
|
+
offer: Array<{
|
|
2323
|
+
itemType: number;
|
|
2324
|
+
token: string;
|
|
2325
|
+
identifierOrCriteria: string;
|
|
2326
|
+
startAmount: string;
|
|
2327
|
+
endAmount: string;
|
|
2328
|
+
}>;
|
|
2329
|
+
consideration: Array<{
|
|
2330
|
+
itemType: number;
|
|
2331
|
+
token: string;
|
|
2332
|
+
identifierOrCriteria: string;
|
|
2333
|
+
startAmount: string;
|
|
2334
|
+
endAmount: string;
|
|
2335
|
+
recipient: string;
|
|
2336
|
+
}>;
|
|
2337
|
+
counter: number;
|
|
2338
|
+
};
|
|
2339
|
+
signature: string;
|
|
2340
|
+
} | {
|
|
2341
|
+
parameters: {
|
|
2342
|
+
offerer: string;
|
|
2343
|
+
zone: string;
|
|
2344
|
+
zoneHash: string;
|
|
2345
|
+
startTime: string;
|
|
2346
|
+
endTime: string;
|
|
2347
|
+
orderType: number;
|
|
2348
|
+
salt: string;
|
|
2349
|
+
conduitKey: string;
|
|
2350
|
+
totalOriginalConsiderationItems: number;
|
|
2351
|
+
offer: Array<{
|
|
2352
|
+
itemType: number;
|
|
2353
|
+
token: string;
|
|
2354
|
+
identifierOrCriteria: string;
|
|
2355
|
+
startAmount: string;
|
|
2356
|
+
endAmount: string;
|
|
2357
|
+
}>;
|
|
2358
|
+
consideration: Array<{
|
|
2359
|
+
itemType: number;
|
|
2360
|
+
token: string;
|
|
2361
|
+
identifierOrCriteria: string;
|
|
2362
|
+
startAmount: string;
|
|
2363
|
+
endAmount: string;
|
|
2364
|
+
recipient: string;
|
|
2365
|
+
}>;
|
|
2366
|
+
counter: number;
|
|
2367
|
+
};
|
|
2368
|
+
numerator: string;
|
|
2369
|
+
denominator: string;
|
|
2370
|
+
signature: string;
|
|
2371
|
+
extraData: string;
|
|
2372
|
+
} | {
|
|
2373
|
+
considerationToken: string;
|
|
2374
|
+
considerationIdentifier: string;
|
|
2375
|
+
considerationAmount: string;
|
|
2376
|
+
offerer: string;
|
|
2377
|
+
zone: string;
|
|
2378
|
+
offerToken: string;
|
|
2379
|
+
offerIdentifier: string;
|
|
2380
|
+
offerAmount: string;
|
|
2381
|
+
basicOrderType: number;
|
|
2382
|
+
startTime: string;
|
|
2383
|
+
endTime: string;
|
|
2384
|
+
zoneHash: string;
|
|
2385
|
+
salt: string;
|
|
2386
|
+
offererConduitKey: string;
|
|
2387
|
+
fulfillerConduitKey: string;
|
|
2388
|
+
totalOriginalAdditionalRecipients: number;
|
|
2389
|
+
additionalRecipients: Array<{
|
|
2390
|
+
amount: string;
|
|
2391
|
+
recipient: string;
|
|
2392
|
+
}>;
|
|
2393
|
+
signature: string;
|
|
2394
|
+
}>;
|
|
2395
|
+
};
|
|
2396
|
+
};
|
|
2397
|
+
orders: Array<{
|
|
2398
|
+
parameters: {
|
|
2399
|
+
offerer: string;
|
|
2400
|
+
zone: string;
|
|
2401
|
+
zoneHash: string;
|
|
2402
|
+
startTime: string;
|
|
2403
|
+
endTime: string;
|
|
2404
|
+
orderType: number;
|
|
2405
|
+
salt: string;
|
|
2406
|
+
conduitKey: string;
|
|
2407
|
+
totalOriginalConsiderationItems: number;
|
|
2408
|
+
offer: Array<{
|
|
2409
|
+
itemType: number;
|
|
2410
|
+
token: string;
|
|
2411
|
+
identifierOrCriteria: string;
|
|
2412
|
+
startAmount: string;
|
|
2413
|
+
endAmount: string;
|
|
2414
|
+
}>;
|
|
2415
|
+
consideration: Array<{
|
|
2416
|
+
itemType: number;
|
|
2417
|
+
token: string;
|
|
2418
|
+
identifierOrCriteria: string;
|
|
2419
|
+
startAmount: string;
|
|
2420
|
+
endAmount: string;
|
|
2421
|
+
recipient: string;
|
|
2422
|
+
}>;
|
|
2423
|
+
counter: number;
|
|
2424
|
+
};
|
|
2425
|
+
signature: string;
|
|
2426
|
+
}>;
|
|
2427
|
+
};
|
|
2428
|
+
};
|
|
2429
|
+
}
|
|
2430
|
+
export interface CreateListingNFTOfferResponse {
|
|
2431
|
+
order: {
|
|
2432
|
+
created_date: string;
|
|
2433
|
+
closing_date: string;
|
|
2434
|
+
listing_time: number;
|
|
2435
|
+
expiration_time: number;
|
|
2436
|
+
order_hash: string;
|
|
2437
|
+
protocol_data: {
|
|
2438
|
+
parameters: {
|
|
2439
|
+
offerer: string;
|
|
2440
|
+
offer: Array<{
|
|
2441
|
+
itemType: number;
|
|
2442
|
+
token: string;
|
|
2443
|
+
identifierOrCriteria: string;
|
|
2444
|
+
startAmount: string;
|
|
2445
|
+
endAmount: string;
|
|
2446
|
+
}>;
|
|
2447
|
+
consideration: Array<{
|
|
2448
|
+
itemType: number;
|
|
2449
|
+
token: string;
|
|
2450
|
+
identifierOrCriteria: string;
|
|
2451
|
+
startAmount: string;
|
|
2452
|
+
endAmount: string;
|
|
2453
|
+
recipient: string;
|
|
2454
|
+
}>;
|
|
2455
|
+
startTime: string;
|
|
2456
|
+
endTime: string;
|
|
2457
|
+
orderType: number;
|
|
2458
|
+
zone: string;
|
|
2459
|
+
zoneHash: string;
|
|
2460
|
+
salt: string;
|
|
2461
|
+
conduitKey: string;
|
|
2462
|
+
totalOriginalConsiderationItems: number;
|
|
2463
|
+
counter: number;
|
|
2464
|
+
};
|
|
2465
|
+
signature: null;
|
|
2466
|
+
};
|
|
2467
|
+
protocol_address: string;
|
|
2468
|
+
current_price: string;
|
|
2469
|
+
maker: {
|
|
2470
|
+
address: string;
|
|
2471
|
+
profile_img_url: null;
|
|
2472
|
+
config: null;
|
|
2473
|
+
};
|
|
2474
|
+
taker: null;
|
|
2475
|
+
maker_fees: any[];
|
|
2476
|
+
taker_fees: any[];
|
|
2477
|
+
side: 'ask' | 'bid';
|
|
2478
|
+
order_type: 'basic' | string;
|
|
2479
|
+
cancelled: boolean;
|
|
2480
|
+
finalized: boolean;
|
|
2481
|
+
marked_invalid: boolean;
|
|
2482
|
+
remaining_quantity: number;
|
|
2483
|
+
maker_asset_bundle: {
|
|
2484
|
+
assets: Array<{
|
|
2485
|
+
id: null;
|
|
2486
|
+
token_id: string;
|
|
2487
|
+
num_sales: null;
|
|
2488
|
+
background_color: null;
|
|
2489
|
+
image_url: string | null;
|
|
2490
|
+
image_preview_url: null;
|
|
2491
|
+
image_thumbnail_url: null;
|
|
2492
|
+
image_original_url: null;
|
|
2493
|
+
animation_url: null;
|
|
2494
|
+
animation_original_url: null;
|
|
2495
|
+
name: string;
|
|
2496
|
+
description: string | null;
|
|
2497
|
+
external_link: null;
|
|
2498
|
+
asset_contract: {
|
|
2499
|
+
address: string;
|
|
2500
|
+
chain_identifier: string;
|
|
2501
|
+
schema_name: 'ERC721' | 'ERC1155' | 'NATIVE' | string;
|
|
2502
|
+
asset_contract_type: 'non-fungible' | 'semi-fungible' | 'unknown';
|
|
2503
|
+
};
|
|
2504
|
+
permalink: string | null;
|
|
2505
|
+
collection: {
|
|
2506
|
+
collection: string;
|
|
2507
|
+
name: string;
|
|
2508
|
+
description: string;
|
|
2509
|
+
image_url: string;
|
|
2510
|
+
banner_image_url: string;
|
|
2511
|
+
owner: string;
|
|
2512
|
+
safelist_status: 'not_requested' | 'verified' | string;
|
|
2513
|
+
category: string;
|
|
2514
|
+
is_disabled: boolean;
|
|
2515
|
+
is_nsfw: boolean;
|
|
2516
|
+
trait_offers_enabled: boolean;
|
|
2517
|
+
collection_offers_enabled: boolean;
|
|
2518
|
+
opensea_url: string;
|
|
2519
|
+
project_url: string;
|
|
2520
|
+
wiki_url: string;
|
|
2521
|
+
discord_url: string;
|
|
2522
|
+
telegram_url: string;
|
|
2523
|
+
twitter_username: string;
|
|
2524
|
+
instagram_username: string;
|
|
2525
|
+
contracts: Array<{
|
|
2526
|
+
address: string;
|
|
2527
|
+
chain: string;
|
|
2528
|
+
}>;
|
|
2529
|
+
} | null;
|
|
2530
|
+
decimals: number | null;
|
|
2531
|
+
token_metadata: null;
|
|
2532
|
+
is_nsfw: boolean | null;
|
|
2533
|
+
owner: {
|
|
2534
|
+
address: string;
|
|
2535
|
+
profile_img_url: null;
|
|
2536
|
+
config: null;
|
|
2537
|
+
} | null;
|
|
2538
|
+
}>;
|
|
2539
|
+
maker: null;
|
|
2540
|
+
asset_contract: null;
|
|
2541
|
+
slug: null;
|
|
2542
|
+
name: null;
|
|
2543
|
+
description: null;
|
|
2544
|
+
external_link: null;
|
|
2545
|
+
permalink: null;
|
|
2546
|
+
seaport_sell_orders: null;
|
|
2547
|
+
};
|
|
2548
|
+
taker_asset_bundle: {
|
|
2549
|
+
assets: Array<{
|
|
2550
|
+
id: null;
|
|
2551
|
+
token_id: string;
|
|
2552
|
+
num_sales: null;
|
|
2553
|
+
background_color: null;
|
|
2554
|
+
image_url: null;
|
|
2555
|
+
image_preview_url: null;
|
|
2556
|
+
image_thumbnail_url: null;
|
|
2557
|
+
image_original_url: null;
|
|
2558
|
+
animation_url: null;
|
|
2559
|
+
animation_original_url: null;
|
|
2560
|
+
name: string;
|
|
2561
|
+
description: null;
|
|
2562
|
+
external_link: null;
|
|
2563
|
+
asset_contract: {
|
|
2564
|
+
address: string;
|
|
2565
|
+
chain_identifier: string;
|
|
2566
|
+
schema_name: 'NATIVE' | string;
|
|
2567
|
+
asset_contract_type: 'unknown';
|
|
2568
|
+
};
|
|
2569
|
+
permalink: null;
|
|
2570
|
+
collection: null;
|
|
2571
|
+
decimals: number;
|
|
2572
|
+
token_metadata: null;
|
|
2573
|
+
is_nsfw: null;
|
|
2574
|
+
owner: null;
|
|
2575
|
+
}>;
|
|
2576
|
+
maker: null;
|
|
2577
|
+
asset_contract: null;
|
|
2578
|
+
slug: null;
|
|
2579
|
+
name: null;
|
|
2580
|
+
description: null;
|
|
2581
|
+
external_link: null;
|
|
2582
|
+
permalink: null;
|
|
2583
|
+
seaport_sell_orders: null;
|
|
2584
|
+
};
|
|
2585
|
+
};
|
|
2586
|
+
}
|
|
1383
2587
|
export {};
|