@rabby-wallet/rabby-api 0.9.69 → 0.9.70-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { AxiosAdapter, AxiosRequestConfig } from 'axios';
2
2
  import { RateLimitedAxiosInstance } from 'axios-rate-limit';
3
3
  import { InitOptions, RabbyApiPlugin } from './plugins/intf';
4
- import { AddrDescResponse, WalletVersionInfoResponse, BridgeAggregator, ApprovalStatus, AssetItem, BasicDappInfo, CEXQuote, Cex, ChainListItem, ChainWithPendingCount, Collection, CollectionList, CollectionWithFloorPrice, ComplexProtocol, ContractCredit, DbkBridgeHistoryItem, ExplainTxResponse, ExplainTypedDataResponse, GasLevel, GetTxResponse, HistoryCurve, LatestExplainTxResponse, MempoolCheckDetail, NFTApprovalResponse, NFTItem, NodeStatus, NodeStatusDetail, ParseTextResponse, ParseTxResponse, ParseTypedDataResponse, PendingTxItem, Protocol, SecurityCheckResponse, ServerChain, SlippageStatus, Summary, SupportedChain, SwapTradeList, TokenApproval, TokenItem, TokenPriceListResponse, TotalBalanceResponse, Tx, TxAllHistoryResult, TxHistoryResult, TxPushType, TxRequest, UsedChain, BridgeTokenPair, BridgeQuote, BridgeHistory, ContractInfo, GasAccountCheckResult, ParseCommonResponse, WithdrawListAddressItem, BuyCountryItem, BuyQuoteItem, BuyHistoryList, BuyPaymentMethod, GasAccountInfo, GasAccountBridgeSupportTokenList, GasAccountBridgeQuote, GasAccountBridgeCreateResponse, GasAccountRechargeStatus, TokenEntityDetail, TokenItemWithEntity, ProjectItem, CopyTradeTokenListResponse, CopyTradeRecentBuyListResponse, CopyTradePnlListResponse, AppChainListResponse, CopyTradeTokenListV2Response, CopyTradeRecentBuyListV2Response, CopyTradeTokenItemV2, CopyTradeSameToken, DefaultRPCRes, TokenDetailWithPriceCurve, GiftEligibilityItem, UserFeedbackItem, GetClientFeedbackMessagesParams, GetClientFeedbackMessagesResponse, GetClientFeedbackUnreadParams, GetClientFeedbackUnreadResponse, PostClientFeedbackMessageParams, PostClientFeedbackMessageResponse, UploadClientFeedbackParams, UploadClientFeedbackResponse, PerpTopToken, KlineDataItem, TokenMarketInfo, TokenHolderInfo, TokenSupplyInfo, MarketSummary, MarketTradingHistoryItem, TokenHolderSummary, TokenHolderItem, CurrencyItem, PerpBridgeQuote, LiquidityPoolItem, LiquidityPoolHistoryItem, NFTDetail, NFTTradingConfig, PrepareAcceptNFTOfferResponse, PrepareListingNFTResponse, CreateListingNFTOfferResponse, NFTListingResponse, MemeListResponse, TokenMarketCategoryListResponse, TokenMarketTokenListResponse, PerpTopTokenV3, PerpTopTokenCategory, StakingFilterListParams, StakingFilterListResponse, StakingPoolCurveParams, StakingPoolCurveResponse, StakingPoolListParams, StakingPoolListResponse, StakingPoolParams, StakingPoolResponse } from './types';
4
+ import { AddrDescResponse, WalletVersionInfoResponse, BridgeAggregator, ApprovalStatus, AssetItem, BasicDappInfo, CEXQuote, Cex, ChainListItem, ChainWithPendingCount, Collection, CollectionList, CollectionWithFloorPrice, ComplexProtocol, ContractCredit, DbkBridgeHistoryItem, ExplainTxResponse, ExplainTypedDataResponse, GasLevel, GetTxResponse, HistoryCurve, LatestExplainTxResponse, MempoolCheckDetail, NFTApprovalResponse, NFTItem, NodeStatus, NodeStatusDetail, ParseTextResponse, ParseTxResponse, ParseTypedDataResponse, PendingTxItem, Protocol, SecurityCheckResponse, ServerChain, SlippageStatus, Summary, SupportedChain, SwapTradeList, TokenApproval, TokenItem, TokenPriceListResponse, TotalBalanceResponse, Tx, TxAllHistoryResult, TxHistoryResult, TxPushType, TxRequest, UsedChain, BridgeTokenPair, BridgeQuote, BridgeHistory, ContractInfo, GasAccountCheckResult, ParseCommonResponse, WithdrawListAddressItem, BuyCountryItem, BuyQuoteItem, BuyHistoryList, BuyPaymentMethod, GasAccountInfo, GasAccountBridgeSupportTokenList, GasAccountBridgeQuote, GasAccountBridgeCreateResponse, GasAccountRechargeStatus, TokenEntityDetail, TokenItemWithEntity, ProjectItem, CopyTradeTokenListResponse, CopyTradeRecentBuyListResponse, CopyTradePnlListResponse, AppChainListResponse, AppChainListBatchItem, TotalBalance24hBatchItem, CopyTradeTokenListV2Response, CopyTradeRecentBuyListV2Response, CopyTradeTokenItemV2, CopyTradeSameToken, DefaultRPCRes, TokenDetailWithPriceCurve, GiftEligibilityItem, UserFeedbackItem, GetClientFeedbackMessagesParams, GetClientFeedbackMessagesResponse, GetClientFeedbackUnreadParams, GetClientFeedbackUnreadResponse, PostClientFeedbackMessageParams, PostClientFeedbackMessageResponse, UploadClientFeedbackParams, UploadClientFeedbackResponse, PerpTopToken, KlineDataItem, TokenMarketInfo, TokenHolderInfo, TokenSupplyInfo, MarketSummary, MarketTradingHistoryItem, TokenHolderSummary, TokenHolderItem, CurrencyItem, PerpBridgeQuote, LiquidityPoolItem, LiquidityPoolHistoryItem, NFTDetail, NFTTradingConfig, PrepareAcceptNFTOfferResponse, PrepareListingNFTResponse, CreateListingNFTOfferResponse, NFTListingResponse, MemeListResponse, TokenMarketCategoryListResponse, TokenMarketTokenListResponse, PerpTopTokenV3, PerpTopTokenCategory, StakingFilterListParams, StakingFilterListResponse, StakingPoolCurveParams, StakingPoolCurveResponse, StakingPoolListParams, StakingPoolListResponse, StakingPoolParams, StakingPoolResponse } from './types';
5
5
  interface OpenApiStore {
6
6
  host: string;
7
7
  testnetHost?: string;
@@ -115,6 +115,7 @@ export declare class OpenApiService {
115
115
  get24hTotalBalance: (address: string) => Promise<{
116
116
  total_usd_value: number;
117
117
  }>;
118
+ get24hTotalBalanceBatch: (ids: string[]) => Promise<TotalBalance24hBatchItem[]>;
118
119
  getPendingCount: (address: string) => Promise<{
119
120
  total_count: number;
120
121
  chains: ChainWithPendingCount[];
@@ -998,7 +999,9 @@ export declare class OpenApiService {
998
999
  to_token_id: string;
999
1000
  slippage: string;
1000
1001
  quote_key: string;
1001
- }) => Promise<Tx>;
1002
+ }) => Promise<Tx & {
1003
+ order_data?: Record<string, unknown>;
1004
+ }>;
1002
1005
  postBridgeHistory: (params: {
1003
1006
  aggregator_id: string;
1004
1007
  bridge_id: string;
@@ -1449,6 +1452,7 @@ export declare class OpenApiService {
1449
1452
  }>;
1450
1453
  getCexSupportList: () => Promise<ProjectItem[]>;
1451
1454
  getAppChainList: (id: string) => Promise<AppChainListResponse>;
1455
+ getAppChainListBatch: (ids: string[]) => Promise<AppChainListBatchItem[]>;
1452
1456
  checkCex: (postData: {
1453
1457
  chain_id: string;
1454
1458
  id: string;
package/dist/index.js CHANGED
@@ -201,6 +201,15 @@ export class OpenApiService {
201
201
  });
202
202
  return data;
203
203
  });
204
+ // ids: up to 10 addresses. Single-address failure returns error_code=1 and does not fail the batch.
205
+ this.get24hTotalBalanceBatch = (ids) => __awaiter(this, void 0, void 0, function* () {
206
+ const { data } = yield this.request.get('/v1/user/total_balance_24h/batch', {
207
+ params: {
208
+ ids: ids.join(','),
209
+ },
210
+ });
211
+ return data;
212
+ });
204
213
  this.getPendingCount = (address) => __awaiter(this, void 0, void 0, function* () {
205
214
  const { data } = yield this.request.get('/v1/wallet/pending_tx_count', {
206
215
  params: {
@@ -1850,6 +1859,15 @@ export class OpenApiService {
1850
1859
  });
1851
1860
  return data;
1852
1861
  });
1862
+ // ids: up to 10 addresses. Single-address failure returns error_code=1 and does not fail the batch.
1863
+ this.getAppChainListBatch = (ids) => __awaiter(this, void 0, void 0, function* () {
1864
+ const { data } = yield this.request.get('/v1/user/complex_app_list/batch', {
1865
+ params: {
1866
+ ids: ids.join(','),
1867
+ },
1868
+ });
1869
+ return data;
1870
+ });
1853
1871
  this.checkCex = (postData) => __awaiter(this, void 0, void 0, function* () {
1854
1872
  const { data } = yield this.request.post('/v1/token/check_cex', postData);
1855
1873
  return data;
package/dist/types.d.ts CHANGED
@@ -1696,6 +1696,19 @@ export interface AppChainListResponse {
1696
1696
  update_at: number;
1697
1697
  }[];
1698
1698
  }
1699
+ /** `/v1/user/total_balance_24h/batch` 单个地址结果。失败时只有 error_code=1,没有 total_usd_value。 */
1700
+ export interface TotalBalance24hBatchItem {
1701
+ id: string;
1702
+ error_code: number;
1703
+ total_usd_value?: number;
1704
+ }
1705
+ /** `/v1/user/complex_app_list/batch` 单个地址结果。失败时只有 error_code=1。 */
1706
+ export interface AppChainListBatchItem {
1707
+ id: string;
1708
+ error_code: number;
1709
+ apps?: AppChainItem[];
1710
+ error_apps?: AppChainListResponse['error_apps'];
1711
+ }
1699
1712
  export declare type DefaultRPCRes = {
1700
1713
  message: string;
1701
1714
  status: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabby-wallet/rabby-api",
3
- "version": "0.9.69",
3
+ "version": "0.9.70-alpha.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [