@rabby-wallet/rabby-api 0.7.29 → 0.7.30

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
@@ -857,7 +857,7 @@ export declare class OpenApiService {
857
857
  success: boolean;
858
858
  }>;
859
859
  getGasAccountTokenList: (id: string) => Promise<TokenItem[]>;
860
- rechargeGasAccount: (params: {
860
+ rechargeGasAccount: (p: {
861
861
  sig: string;
862
862
  account_id: string;
863
863
  tx_id: string;
@@ -868,14 +868,14 @@ export declare class OpenApiService {
868
868
  }) => Promise<{
869
869
  success: boolean;
870
870
  }>;
871
- withdrawGasAccount: (params: {
871
+ withdrawGasAccount: (p: {
872
872
  sig: string;
873
873
  amount: number;
874
874
  account_id: string;
875
875
  }) => Promise<{
876
876
  success: boolean;
877
877
  }>;
878
- getGasAccountHistory: (params: {
878
+ getGasAccountHistory: (p: {
879
879
  sig: string;
880
880
  account_id: string;
881
881
  start: number;
@@ -905,7 +905,7 @@ export declare class OpenApiService {
905
905
  total: number;
906
906
  };
907
907
  }>;
908
- checkGasAccountTxs: (params: {
908
+ checkGasAccountTxs: (p: {
909
909
  sig: string;
910
910
  account_id: string;
911
911
  tx_list: Tx[];
package/dist/index.js CHANGED
@@ -18,6 +18,17 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
18
18
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
19
19
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
20
20
  };
21
+ var __rest = (this && this.__rest) || function (s, e) {
22
+ var t = {};
23
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
24
+ t[p] = s[p];
25
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
26
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
27
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
28
+ t[p[i]] = s[p[i]];
29
+ }
30
+ return t;
31
+ };
21
32
  var _OpenApiService_adapter, _OpenApiService_plugin, _OpenApiService_clientName, _OpenApiService_clientVersion;
22
33
  import axios from 'axios';
23
34
  import rateLimit from 'axios-rate-limit';
@@ -1174,17 +1185,31 @@ export class OpenApiService {
1174
1185
  return data;
1175
1186
  });
1176
1187
  this.getGasAccountInfo = (params) => __awaiter(this, void 0, void 0, function* () {
1188
+ const { sig } = params, others = __rest(params, ["sig"]);
1177
1189
  const { data } = yield this.request.get('/v1/gas_account', {
1178
- params: Object.assign({}, params),
1190
+ params: Object.assign({}, others),
1191
+ headers: {
1192
+ sig,
1193
+ },
1179
1194
  });
1180
1195
  return data;
1181
1196
  });
1182
1197
  this.loginGasAccount = (params) => __awaiter(this, void 0, void 0, function* () {
1183
- const { data } = yield this.request.post('/v1/gas_account/login', Object.assign({}, params));
1198
+ const { sig } = params, others = __rest(params, ["sig"]);
1199
+ const { data } = yield this.request.post('/v1/gas_account/login', Object.assign({}, others), {
1200
+ headers: {
1201
+ sig,
1202
+ },
1203
+ });
1184
1204
  return data;
1185
1205
  });
1186
1206
  this.logoutGasAccount = (params) => __awaiter(this, void 0, void 0, function* () {
1187
- const { data } = yield this.request.post('/v1/gas_account/logout', Object.assign({}, params));
1207
+ const { sig } = params, others = __rest(params, ["sig"]);
1208
+ const { data } = yield this.request.post('/v1/gas_account/logout', Object.assign({}, others), {
1209
+ headers: {
1210
+ sig,
1211
+ },
1212
+ });
1188
1213
  return data;
1189
1214
  });
1190
1215
  this.getGasAccountTokenList = (id) => __awaiter(this, void 0, void 0, function* () {
@@ -1195,22 +1220,41 @@ export class OpenApiService {
1195
1220
  });
1196
1221
  return data;
1197
1222
  });
1198
- this.rechargeGasAccount = (params) => __awaiter(this, void 0, void 0, function* () {
1199
- const { data } = yield this.request.post('/v1/gas_account/recharge', params);
1223
+ this.rechargeGasAccount = (p) => __awaiter(this, void 0, void 0, function* () {
1224
+ const { sig } = p, params = __rest(p, ["sig"]);
1225
+ const { data } = yield this.request.post('/v1/gas_account/recharge', params, {
1226
+ headers: {
1227
+ sig,
1228
+ },
1229
+ });
1200
1230
  return data;
1201
1231
  });
1202
- this.withdrawGasAccount = (params) => __awaiter(this, void 0, void 0, function* () {
1203
- const { data } = yield this.request.post('/v1/gas_account/withdraw', params);
1232
+ this.withdrawGasAccount = (p) => __awaiter(this, void 0, void 0, function* () {
1233
+ const { sig } = p, params = __rest(p, ["sig"]);
1234
+ const { data } = yield this.request.post('/v1/gas_account/withdraw', params, {
1235
+ headers: {
1236
+ sig,
1237
+ },
1238
+ });
1204
1239
  return data;
1205
1240
  });
1206
- this.getGasAccountHistory = (params) => __awaiter(this, void 0, void 0, function* () {
1241
+ this.getGasAccountHistory = (p) => __awaiter(this, void 0, void 0, function* () {
1242
+ const { sig } = p, params = __rest(p, ["sig"]);
1207
1243
  const { data } = yield this.request.get('/v1/gas_account/history', {
1208
1244
  params,
1245
+ headers: {
1246
+ sig,
1247
+ },
1209
1248
  });
1210
1249
  return data;
1211
1250
  });
1212
- this.checkGasAccountTxs = (params) => __awaiter(this, void 0, void 0, function* () {
1213
- const { data } = yield this.request.post('/v1/gas_account/check_txs', params);
1251
+ this.checkGasAccountTxs = (p) => __awaiter(this, void 0, void 0, function* () {
1252
+ const { sig } = p, params = __rest(p, ["sig"]);
1253
+ const { data } = yield this.request.post('/v1/gas_account/check_txs', params, {
1254
+ headers: {
1255
+ sig,
1256
+ },
1257
+ });
1214
1258
  return data;
1215
1259
  });
1216
1260
  if (store instanceof Promise) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabby-wallet/rabby-api",
3
- "version": "0.7.29",
3
+ "version": "0.7.30",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [