@rabby-wallet/rabby-api 0.6.2 → 0.6.4
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 +6 -1
- package/dist/index.js +10 -0
- package/dist/types.d.ts +16 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AxiosAdapter } from 'axios';
|
|
2
2
|
import { RateLimitedAxiosInstance } from 'axios-rate-limit';
|
|
3
|
-
import { ServerChain, TotalBalanceResponse, ChainWithPendingCount, SecurityCheckResponse, Tx, ExplainTxResponse, GasLevel, GetTxResponse, TokenItem, AssetItem, NFTItem, Collection, TxHistoryResult, TokenApproval, NFTApprovalResponse, ApprovalStatus, UsedChain, Protocol, ComplexProtocol, ExplainTypedDataResponse, SwapTradeList, SlippageStatus, CEXQuote, Summary, Cex, ContractCredit, AddrDescResponse, ParseTxResponse, CollectionWithFloorPrice, ParseTypedDataResponse, ParseTextResponse } from './types';
|
|
3
|
+
import { ServerChain, TotalBalanceResponse, ChainWithPendingCount, SecurityCheckResponse, Tx, ExplainTxResponse, GasLevel, GetTxResponse, TokenItem, AssetItem, NFTItem, Collection, TxHistoryResult, TokenApproval, NFTApprovalResponse, ApprovalStatus, UsedChain, Protocol, ComplexProtocol, ExplainTypedDataResponse, SwapTradeList, SlippageStatus, CEXQuote, Summary, Cex, ContractCredit, AddrDescResponse, ParseTxResponse, CollectionWithFloorPrice, ParseTypedDataResponse, ParseTextResponse, CollectionList } from './types';
|
|
4
4
|
interface OpenApiStore {
|
|
5
5
|
host: string;
|
|
6
6
|
}
|
|
@@ -269,5 +269,10 @@ export declare class OpenApiService {
|
|
|
269
269
|
origin: string;
|
|
270
270
|
address: string;
|
|
271
271
|
}) => Promise<ParseTextResponse>;
|
|
272
|
+
collectionList: ({ id, chainId, isAll, }: {
|
|
273
|
+
id: string;
|
|
274
|
+
chainId?: string | undefined;
|
|
275
|
+
isAll: boolean;
|
|
276
|
+
}) => Promise<CollectionList[]>;
|
|
272
277
|
}
|
|
273
278
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -706,6 +706,16 @@ export class OpenApiService {
|
|
|
706
706
|
});
|
|
707
707
|
return data;
|
|
708
708
|
});
|
|
709
|
+
this.collectionList = ({ id, chainId, isAll, }) => __awaiter(this, void 0, void 0, function* () {
|
|
710
|
+
const { data } = yield this.request.get('/v1/user/collection_list', {
|
|
711
|
+
params: {
|
|
712
|
+
id,
|
|
713
|
+
chain_id: chainId,
|
|
714
|
+
is_all: isAll,
|
|
715
|
+
},
|
|
716
|
+
});
|
|
717
|
+
return data;
|
|
718
|
+
});
|
|
709
719
|
this.store = store;
|
|
710
720
|
this.adapter = adapter;
|
|
711
721
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -279,6 +279,22 @@ export interface Collection {
|
|
|
279
279
|
floor_price: number;
|
|
280
280
|
is_scam: boolean;
|
|
281
281
|
}
|
|
282
|
+
export interface CollectionList {
|
|
283
|
+
id: string;
|
|
284
|
+
chain: string;
|
|
285
|
+
name: string;
|
|
286
|
+
description: string;
|
|
287
|
+
logo_url: string;
|
|
288
|
+
is_verified: boolean;
|
|
289
|
+
credit_score: number;
|
|
290
|
+
receive_addr_count: number;
|
|
291
|
+
is_scam: boolean;
|
|
292
|
+
is_suspicious: boolean;
|
|
293
|
+
is_core: boolean;
|
|
294
|
+
floor_price: number;
|
|
295
|
+
nft_list: NFTItem[];
|
|
296
|
+
native_token: TokenItem;
|
|
297
|
+
}
|
|
282
298
|
export interface TxDisplayItem extends TxHistoryItem {
|
|
283
299
|
projectDict: TxHistoryResult['project_dict'];
|
|
284
300
|
cateDict: TxHistoryResult['cate_dict'];
|