@rabby-wallet/rabby-api 0.9.12-alpha.1 → 0.9.12-alpha.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, TotalBalanceResponse, Tx, TxAllHistoryResult, TxHistoryResult, TxPushType, TxRequest, UsedChain, BridgeTokenPair, BridgeQuote, BridgeHistory, ContractInfo, GasAccountCheckResult, ParseCommonResponse, WithdrawListAddressItem, BuyCountryItem, BuyQuoteItem, BuyHistoryList, BuyPaymentMethod } 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, GasAccountInfo } from './types';
5
5
  interface OpenApiStore {
6
6
  host: string;
7
7
  testnetHost?: string;
@@ -484,6 +484,7 @@ export declare class OpenApiService {
484
484
  sig?: string;
485
485
  }) => Promise<{
486
486
  req: TxRequest;
487
+ access_token?: string;
487
488
  }>;
488
489
  getTxRequests: (ids: string | string[]) => Promise<TxRequest[]>;
489
490
  getTxRequest: (id: string) => Promise<TxRequest>;
@@ -873,25 +874,19 @@ export declare class OpenApiService {
873
874
  sig: string;
874
875
  id: string;
875
876
  }) => Promise<{
876
- account: {
877
- id: string;
878
- balance: number;
879
- create_at: number;
880
- nonce: number;
881
- };
877
+ account: GasAccountInfo;
882
878
  }>;
883
879
  getGasAccountInfoV2: (params: {
884
880
  id: string;
885
881
  }) => Promise<{
886
- account: {
887
- id: string;
888
- balance: number;
889
- create_at: number;
890
- nonce: number;
891
- };
882
+ account: GasAccountInfo;
883
+ }>;
884
+ createGasAccountPayInfo: (postData: {
885
+ id: string;
886
+ }) => Promise<{
887
+ account: GasAccountInfo;
892
888
  }>;
893
889
  confirmIapOrder: (postData: {
894
- user_id: string;
895
890
  transaction_id: string;
896
891
  device_type: 'android' | 'ios';
897
892
  product_id: string;
package/dist/index.js CHANGED
@@ -1254,6 +1254,10 @@ export class OpenApiService {
1254
1254
  });
1255
1255
  return data;
1256
1256
  });
1257
+ this.createGasAccountPayInfo = (postData) => __awaiter(this, void 0, void 0, function* () {
1258
+ const { data } = yield this.request.post('/v2/gas_account/pay_info', postData);
1259
+ return data;
1260
+ });
1257
1261
  this.confirmIapOrder = (postData) => __awaiter(this, void 0, void 0, function* () {
1258
1262
  const { data } = yield this.request.post('/v1/gas_account/confirm_iap_order', postData);
1259
1263
  return data;
package/dist/types.d.ts CHANGED
@@ -1076,7 +1076,6 @@ export interface TxRequest {
1076
1076
  predict_packed_at?: number;
1077
1077
  predict_err_code?: number;
1078
1078
  push_at_list?: number[];
1079
- access_token?: string;
1080
1079
  }
1081
1080
  export interface MempoolCheckDetail {
1082
1081
  id: string;
@@ -1448,4 +1447,12 @@ export interface BuyPaymentMethod {
1448
1447
  type: string;
1449
1448
  logo_url: string;
1450
1449
  }
1450
+ export interface GasAccountInfo {
1451
+ id: string;
1452
+ balance: number;
1453
+ create_at: number;
1454
+ nonce: number;
1455
+ uuid: string;
1456
+ has_iap_order: boolean;
1457
+ }
1451
1458
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabby-wallet/rabby-api",
3
- "version": "0.9.12-alpha.1",
3
+ "version": "0.9.12-alpha.3",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [