@rabby-wallet/rabby-api 0.9.58-beta.2 → 0.9.58-beta.3

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, 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, TokenEntityDetail, TokenItemWithEntity, ProjectItem, CopyTradeTokenListResponse, CopyTradeRecentBuyListResponse, CopyTradePnlListResponse, AppChainListResponse, CopyTradeTokenListV2Response, CopyTradeRecentBuyListV2Response, CopyTradeTokenItemV2, CopyTradeSameToken, DefaultRPCRes, TokenDetailWithPriceCurve, GiftEligibilityItem, UserFeedbackItem, PerpTopToken, KlineDataItem, TokenMarketInfo, TokenHolderInfo, TokenSupplyInfo, MarketSummary, MarketTradingHistoryItem, TokenHolderSummary, TokenHolderItem, CurrencyItem, PerpBridgeQuote, LiquidityPoolItem, LiquidityPoolHistoryItem, NFTDetail, NFTTradingConfig, PrepareAcceptNFTOfferResponse, PrepareListingNFTResponse, CreateListingNFTOfferResponse, NFTListingResponse, MemeListResponse, TokenMarketCategoryListResponse, TokenMarketTokenListResponse } from './types';
4
+ import { AddrDescResponse, 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, PerpTopToken, KlineDataItem, TokenMarketInfo, TokenHolderInfo, TokenSupplyInfo, MarketSummary, MarketTradingHistoryItem, TokenHolderSummary, TokenHolderItem, CurrencyItem, PerpBridgeQuote, LiquidityPoolItem, LiquidityPoolHistoryItem, NFTDetail, NFTTradingConfig, PrepareAcceptNFTOfferResponse, PrepareListingNFTResponse, CreateListingNFTOfferResponse, NFTListingResponse, MemeListResponse, TokenMarketCategoryListResponse, TokenMarketTokenListResponse } from './types';
5
5
  interface OpenApiStore {
6
6
  host: string;
7
7
  testnetHost?: string;
@@ -1033,6 +1033,32 @@ export declare class OpenApiService {
1033
1033
  success: boolean;
1034
1034
  }>;
1035
1035
  getGasAccountTokenList: (id: string) => Promise<TokenItem[]>;
1036
+ getGasAccountBridgeSupportTokenList: () => Promise<GasAccountBridgeSupportTokenList>;
1037
+ getGasAccountBridgeQuote: (params: {
1038
+ user_addr: string;
1039
+ from_chain_id: string;
1040
+ from_token_id: string;
1041
+ from_token_raw_amount: string | number;
1042
+ slippage?: number;
1043
+ }) => Promise<GasAccountBridgeQuote>;
1044
+ createGasAccountBridgeRecharge: (p: {
1045
+ sig: string;
1046
+ gas_account_id: string;
1047
+ user_addr: string;
1048
+ from_chain_id: string;
1049
+ from_token_id: string;
1050
+ from_token_amount: number;
1051
+ from_usd_value: number;
1052
+ tx_id: string;
1053
+ }) => Promise<GasAccountBridgeCreateResponse>;
1054
+ getGasAccountBridgeStatus: (params: {
1055
+ from_chain_id: string;
1056
+ tx_id: string;
1057
+ } | {
1058
+ transaction_id: string;
1059
+ product_id: string;
1060
+ device_type: 'android' | 'ios';
1061
+ }) => Promise<GasAccountRechargeStatus>;
1036
1062
  rechargeGasAccount: (p: {
1037
1063
  sig: string;
1038
1064
  account_id: string;
package/dist/index.js CHANGED
@@ -1424,6 +1424,31 @@ export class OpenApiService {
1424
1424
  });
1425
1425
  return data;
1426
1426
  });
1427
+ this.getGasAccountBridgeSupportTokenList = () => __awaiter(this, void 0, void 0, function* () {
1428
+ const { data } = yield this.request.get('/v1/gas_account/bridge/support_token');
1429
+ return data;
1430
+ });
1431
+ this.getGasAccountBridgeQuote = (params) => __awaiter(this, void 0, void 0, function* () {
1432
+ const { data } = yield this.request.get('/v1/gas_account/bridge/quote', {
1433
+ params,
1434
+ });
1435
+ return data;
1436
+ });
1437
+ this.createGasAccountBridgeRecharge = (p) => __awaiter(this, void 0, void 0, function* () {
1438
+ const { sig } = p, params = __rest(p, ["sig"]);
1439
+ const { data } = yield this.request.post('/v1/gas_account/bridge/create', params, {
1440
+ headers: {
1441
+ sig,
1442
+ },
1443
+ });
1444
+ return data;
1445
+ });
1446
+ this.getGasAccountBridgeStatus = (params) => __awaiter(this, void 0, void 0, function* () {
1447
+ const { data } = yield this.request.get('/v1/gas_account/recharge/status', {
1448
+ params,
1449
+ });
1450
+ return data;
1451
+ });
1427
1452
  this.rechargeGasAccount = (p) => __awaiter(this, void 0, void 0, function* () {
1428
1453
  const { sig } = p, params = __rest(p, ["sig"]);
1429
1454
  const { data } = yield this.request.post('/v1/gas_account/recharge', params, {
package/dist/types.d.ts CHANGED
@@ -1757,6 +1757,42 @@ export interface PerpBridgeQuote {
1757
1757
  };
1758
1758
  duration: number;
1759
1759
  }
1760
+ export interface GasAccountBridgeToken {
1761
+ chain_id: string;
1762
+ token_id: string;
1763
+ }
1764
+ export interface GasAccountBridgeSupportTokenList {
1765
+ wallet_tokens: GasAccountBridgeToken[];
1766
+ hyperliquid_tokens: GasAccountBridgeToken[];
1767
+ }
1768
+ export interface GasAccountBridgeFee {
1769
+ raw_amount_hex_str: string;
1770
+ usd_value: number;
1771
+ }
1772
+ export interface GasAccountBridgeInfo {
1773
+ logo_url: string;
1774
+ }
1775
+ export interface GasAccountBridgeQuote {
1776
+ bridge_id: string;
1777
+ bridge: GasAccountBridgeInfo;
1778
+ to_token_raw_amount: number;
1779
+ to_token_raw_amount_hex_str: string;
1780
+ to_token_amount: number;
1781
+ approve_contract_id: string;
1782
+ protocol_fee: GasAccountBridgeFee;
1783
+ rabby_fee: GasAccountBridgeFee;
1784
+ gas_fee: GasAccountBridgeFee;
1785
+ duration: number;
1786
+ tx: Tx;
1787
+ }
1788
+ export interface GasAccountBridgeCreateResponse {
1789
+ success: boolean;
1790
+ id: string;
1791
+ }
1792
+ export declare type GasAccountRechargeStatus = {
1793
+ status: 'pending' | 'success' | 'failed';
1794
+ type: 'bridge|wallet|iap';
1795
+ };
1760
1796
  export declare type MarketSummaryItem = {
1761
1797
  price?: {
1762
1798
  open?: number;
@@ -2645,7 +2681,6 @@ export interface TokenMarketTokenItem {
2645
2681
  price_24h_change: number;
2646
2682
  volume_24h: number;
2647
2683
  fdv: number;
2648
- identity?: TokenEntityDetail;
2649
2684
  launchpad: TokenMarketTokenRelatedItem | null;
2650
2685
  asset: TokenMarketTokenRelatedItem | null;
2651
2686
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabby-wallet/rabby-api",
3
- "version": "0.9.58-beta.2",
3
+ "version": "0.9.58-beta.3",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [