@rabby-wallet/rabby-api 0.9.11 → 0.9.12-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
@@ -481,6 +481,7 @@ export declare class OpenApiService {
481
481
  log_id: string;
482
482
  low_gas_deadline?: number;
483
483
  origin?: string;
484
+ sig?: string;
484
485
  }) => Promise<{
485
486
  req: TxRequest;
486
487
  }>;
@@ -879,6 +880,24 @@ export declare class OpenApiService {
879
880
  nonce: number;
880
881
  };
881
882
  }>;
883
+ getGasAccountInfoV2: (params: {
884
+ id: string;
885
+ }) => Promise<{
886
+ account: {
887
+ id: string;
888
+ balance: number;
889
+ create_at: number;
890
+ nonce: number;
891
+ };
892
+ }>;
893
+ confirmIapOrder: (postData: {
894
+ user_id: string;
895
+ transaction_id: string;
896
+ device_type: 'android' | 'ios';
897
+ product_id: string;
898
+ }) => Promise<{
899
+ req: TxRequest;
900
+ }>;
882
901
  loginGasAccount: (params: {
883
902
  sig: string;
884
903
  account_id: string;
@@ -957,7 +976,7 @@ export declare class OpenApiService {
957
976
  };
958
977
  }>;
959
978
  checkGasAccountTxs: (p: {
960
- sig: string;
979
+ sig?: string;
961
980
  account_id: string;
962
981
  tx_list: Tx[];
963
982
  }) => Promise<GasAccountCheckResult>;
package/dist/index.js CHANGED
@@ -899,7 +899,10 @@ export class OpenApiService {
899
899
  return data;
900
900
  });
901
901
  this.submitTx = (postData) => __awaiter(this, void 0, void 0, function* () {
902
- const { data } = yield this.request.post('/v1/wallet/submit_tx', Object.assign({}, postData));
902
+ const { sig } = postData, rest = __rest(postData, ["sig"]);
903
+ const { data } = yield this.request.post('/v1/wallet/submit_tx', Object.assign({}, rest), {
904
+ headers: sig ? { sig } : undefined,
905
+ });
903
906
  return data;
904
907
  });
905
908
  this.getTxRequests = (ids) => __awaiter(this, void 0, void 0, function* () {
@@ -1245,6 +1248,16 @@ export class OpenApiService {
1245
1248
  });
1246
1249
  return data;
1247
1250
  });
1251
+ this.getGasAccountInfoV2 = (params) => __awaiter(this, void 0, void 0, function* () {
1252
+ const { data } = yield this.request.get('/v2/gas_account', {
1253
+ params,
1254
+ });
1255
+ return data;
1256
+ });
1257
+ this.confirmIapOrder = (postData) => __awaiter(this, void 0, void 0, function* () {
1258
+ const { data } = yield this.request.post('/v1/gas_account/confirm_iap_order', postData);
1259
+ return data;
1260
+ });
1248
1261
  this.loginGasAccount = (params) => __awaiter(this, void 0, void 0, function* () {
1249
1262
  const { sig } = params, others = __rest(params, ["sig"]);
1250
1263
  const { data } = yield this.request.post('/v1/gas_account/login', Object.assign({}, others), {
@@ -1312,9 +1325,11 @@ export class OpenApiService {
1312
1325
  this.checkGasAccountTxs = (p) => __awaiter(this, void 0, void 0, function* () {
1313
1326
  const { sig } = p, params = __rest(p, ["sig"]);
1314
1327
  const { data } = yield this.request.post('/v1/gas_account/check_txs', params, {
1315
- headers: {
1316
- sig,
1317
- },
1328
+ headers: sig
1329
+ ? {
1330
+ sig,
1331
+ }
1332
+ : undefined,
1318
1333
  });
1319
1334
  return data;
1320
1335
  });
package/dist/types.d.ts CHANGED
@@ -1076,6 +1076,7 @@ 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;
1079
1080
  }
1080
1081
  export interface MempoolCheckDetail {
1081
1082
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabby-wallet/rabby-api",
3
- "version": "0.9.11",
3
+ "version": "0.9.12-alpha.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [