@rabby-wallet/rabby-api 0.7.21 → 0.7.23-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 +29 -1
- package/dist/index.js +8 -0
- package/dist/types.d.ts +9 -0
- 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, ApprovalStatus, AssetItem, BasicDappInfo, CEXQuote, Cex, ChainListItem, ChainWithPendingCount, Collection, CollectionList, CollectionWithFloorPrice, ComplexProtocol, ContractCredit, 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 } from './types';
|
|
4
|
+
import { AddrDescResponse, 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 } from './types';
|
|
5
5
|
interface OpenApiStore {
|
|
6
6
|
host: string;
|
|
7
7
|
testnetHost?: string;
|
|
@@ -250,6 +250,19 @@ export declare class OpenApiService {
|
|
|
250
250
|
}) => Promise<{
|
|
251
251
|
is_gasless: boolean;
|
|
252
252
|
desc?: string;
|
|
253
|
+
promotion?: {
|
|
254
|
+
id: string;
|
|
255
|
+
contract_id: string;
|
|
256
|
+
chain_id: string;
|
|
257
|
+
config: {
|
|
258
|
+
button_text: string;
|
|
259
|
+
before_click_text: string;
|
|
260
|
+
after_click_text: string;
|
|
261
|
+
logo: string;
|
|
262
|
+
theme_color: string;
|
|
263
|
+
dark_color: string;
|
|
264
|
+
};
|
|
265
|
+
};
|
|
253
266
|
}>;
|
|
254
267
|
parseTx: ({ chainId, tx, origin, addr, }: {
|
|
255
268
|
chainId: string;
|
|
@@ -710,5 +723,20 @@ export declare class OpenApiService {
|
|
|
710
723
|
addr: string;
|
|
711
724
|
web3_id: string;
|
|
712
725
|
}>;
|
|
726
|
+
createDbkBridgeHistory: (postData: Pick<DbkBridgeHistoryItem, 'user_addr' | 'from_chain_id' | 'to_chain_id' | 'tx_id' | 'from_token_amount'>) => Promise<{
|
|
727
|
+
success: boolean;
|
|
728
|
+
}>;
|
|
729
|
+
getDbkBridgeHistoryList: (params: {
|
|
730
|
+
user_addr: string;
|
|
731
|
+
start?: number;
|
|
732
|
+
limit?: number;
|
|
733
|
+
}) => Promise<{
|
|
734
|
+
page: {
|
|
735
|
+
total: number;
|
|
736
|
+
limit: number;
|
|
737
|
+
start: number;
|
|
738
|
+
};
|
|
739
|
+
data: DbkBridgeHistoryItem[];
|
|
740
|
+
}>;
|
|
713
741
|
}
|
|
714
742
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -1079,6 +1079,14 @@ export class OpenApiService {
|
|
|
1079
1079
|
});
|
|
1080
1080
|
return data;
|
|
1081
1081
|
});
|
|
1082
|
+
this.createDbkBridgeHistory = (postData) => __awaiter(this, void 0, void 0, function* () {
|
|
1083
|
+
const { data } = yield this.request.post('/v1/user/dbk/bridge_history', postData);
|
|
1084
|
+
return data;
|
|
1085
|
+
});
|
|
1086
|
+
this.getDbkBridgeHistoryList = (params) => __awaiter(this, void 0, void 0, function* () {
|
|
1087
|
+
const { data } = yield this.request.get('/v1/user/dbk/bridge_history_list', { params });
|
|
1088
|
+
return data;
|
|
1089
|
+
});
|
|
1082
1090
|
if (store instanceof Promise) {
|
|
1083
1091
|
store.then((resolvedStore) => {
|
|
1084
1092
|
this.store = resolvedStore;
|
package/dist/types.d.ts
CHANGED
|
@@ -1229,4 +1229,13 @@ export interface NodeStatusDetail {
|
|
|
1229
1229
|
rabby_rpc: NodeServiceData[];
|
|
1230
1230
|
rabby_data_service: NodeServiceData[];
|
|
1231
1231
|
}
|
|
1232
|
+
export interface DbkBridgeHistoryItem {
|
|
1233
|
+
user_addr: string;
|
|
1234
|
+
from_chain_id: string;
|
|
1235
|
+
to_chain_id: string;
|
|
1236
|
+
is_deposit: boolean;
|
|
1237
|
+
tx_id: string;
|
|
1238
|
+
create_at: number;
|
|
1239
|
+
from_token_amount: number;
|
|
1240
|
+
}
|
|
1232
1241
|
export {};
|