@rabby-wallet/rabby-api 0.9.12-beta.0 → 0.9.12-beta.2
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 +6 -0
- package/dist/types.d.ts +27 -19
- package/package.json +1 -1
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, TotalBalanceResponse, Tx, TxAllHistoryResult, TxHistoryResult, TxPushType, TxRequest, UsedChain, BridgeTokenPair, BridgeQuote, BridgeHistory, ContractInfo, GasAccountCheckResult, ParseCommonResponse, WithdrawListAddressItem, BuyCountryItem, BuyQuoteItem, BuyHistoryList } 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, TotalBalanceResponse, Tx, TxAllHistoryResult, TxHistoryResult, TxPushType, TxRequest, UsedChain, BridgeTokenPair, BridgeQuote, BridgeHistory, ContractInfo, GasAccountCheckResult, ParseCommonResponse, WithdrawListAddressItem, BuyCountryItem, BuyQuoteItem, BuyHistoryList, BuyPaymentMethod } from './types';
|
|
5
5
|
interface OpenApiStore {
|
|
6
6
|
host: string;
|
|
7
7
|
testnetHost?: string;
|
|
@@ -1084,5 +1084,10 @@ export declare class OpenApiService {
|
|
|
1084
1084
|
start?: number;
|
|
1085
1085
|
limit?: number;
|
|
1086
1086
|
}) => Promise<BuyHistoryList>;
|
|
1087
|
+
getBuyPaymentMethods: (params: {
|
|
1088
|
+
country_code: string;
|
|
1089
|
+
service_provider: string;
|
|
1090
|
+
redirect_url?: string;
|
|
1091
|
+
}) => Promise<BuyPaymentMethod[]>;
|
|
1087
1092
|
}
|
|
1088
1093
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -1435,6 +1435,12 @@ export class OpenApiService {
|
|
|
1435
1435
|
});
|
|
1436
1436
|
return data;
|
|
1437
1437
|
});
|
|
1438
|
+
this.getBuyPaymentMethods = (params) => __awaiter(this, void 0, void 0, function* () {
|
|
1439
|
+
const { data } = yield this.request.get('/v1/buy/get_payment_method', {
|
|
1440
|
+
params,
|
|
1441
|
+
});
|
|
1442
|
+
return data;
|
|
1443
|
+
});
|
|
1438
1444
|
if (store instanceof Promise) {
|
|
1439
1445
|
store.then((resolvedStore) => {
|
|
1440
1446
|
this.store = resolvedStore;
|
package/dist/types.d.ts
CHANGED
|
@@ -1404,34 +1404,42 @@ export interface BuyCountryItem {
|
|
|
1404
1404
|
name: string;
|
|
1405
1405
|
};
|
|
1406
1406
|
}
|
|
1407
|
+
export interface BuyServiceProvider {
|
|
1408
|
+
id: string;
|
|
1409
|
+
name: string;
|
|
1410
|
+
website_url: string;
|
|
1411
|
+
customer_support_url: string;
|
|
1412
|
+
image_url: string;
|
|
1413
|
+
logo_url: string;
|
|
1414
|
+
}
|
|
1407
1415
|
export interface BuyQuoteItem {
|
|
1408
|
-
service_provider:
|
|
1409
|
-
id: string;
|
|
1410
|
-
name: string;
|
|
1411
|
-
website_url: string;
|
|
1412
|
-
customer_support_url: string;
|
|
1413
|
-
image_url: string;
|
|
1414
|
-
logo_url: string;
|
|
1415
|
-
};
|
|
1416
|
+
service_provider: BuyServiceProvider;
|
|
1416
1417
|
token_amount: number;
|
|
1417
1418
|
payment_method_type: string;
|
|
1418
1419
|
}
|
|
1420
|
+
interface BuyHistoryItem {
|
|
1421
|
+
user_addr: string;
|
|
1422
|
+
status: 'pending' | 'success' | 'failed';
|
|
1423
|
+
create_at: number;
|
|
1424
|
+
service_provider: BuyServiceProvider;
|
|
1425
|
+
pay_usd_amount: number;
|
|
1426
|
+
payment_type: string;
|
|
1427
|
+
receive_tx_id: string;
|
|
1428
|
+
receive_chain_id: string;
|
|
1429
|
+
receive_token: TokenItem;
|
|
1430
|
+
}
|
|
1419
1431
|
export interface BuyHistoryList {
|
|
1420
1432
|
pagination: {
|
|
1421
1433
|
start: number;
|
|
1422
1434
|
limit: number;
|
|
1423
1435
|
total: number;
|
|
1424
1436
|
};
|
|
1425
|
-
histories:
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
receive_tx_id: string;
|
|
1433
|
-
receive_chain_id: string;
|
|
1434
|
-
receive_token: TokenItem;
|
|
1435
|
-
}[];
|
|
1437
|
+
histories: BuyHistoryItem[];
|
|
1438
|
+
}
|
|
1439
|
+
export interface BuyPaymentMethod {
|
|
1440
|
+
id: string;
|
|
1441
|
+
name: string;
|
|
1442
|
+
type: string;
|
|
1443
|
+
logo_url: string;
|
|
1436
1444
|
}
|
|
1437
1445
|
export {};
|