@rabby-wallet/rabby-api 0.6.17 → 0.6.18

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
@@ -283,5 +283,35 @@ export declare class OpenApiService {
283
283
  gasPriceStats: (chainId: string) => Promise<{
284
284
  median: number;
285
285
  }>;
286
+ badgeHasClaimed: (id: string) => Promise<{
287
+ id: string;
288
+ badge_id: number;
289
+ user_id: string;
290
+ inner_id: number;
291
+ create_at: number;
292
+ update_at: number;
293
+ has_claimed: true;
294
+ } | {
295
+ has_claimed: false;
296
+ }>;
297
+ badgeHasMinted: (id: string) => Promise<{
298
+ id: string;
299
+ badge_id: number;
300
+ user_id: string;
301
+ inner_id: number;
302
+ usd_value: number;
303
+ tvf: number;
304
+ mint_at: number;
305
+ has_minted: true;
306
+ } | {
307
+ has_minted: false;
308
+ }>;
309
+ mintBadge: (params: {
310
+ code: string;
311
+ userAddr: string;
312
+ }) => Promise<{
313
+ is_success: boolean;
314
+ inner_id: number;
315
+ }>;
286
316
  }
287
317
  export {};
package/dist/index.js CHANGED
@@ -708,6 +708,29 @@ export class OpenApiService {
708
708
  } }, this._getRequestOptions(chainId)));
709
709
  return data;
710
710
  });
711
+ this.badgeHasClaimed = (id) => __awaiter(this, void 0, void 0, function* () {
712
+ const { data } = yield this.request.get('/v1/badge/code/user_has_claimed', {
713
+ params: {
714
+ user_id: id,
715
+ },
716
+ });
717
+ return data;
718
+ });
719
+ this.badgeHasMinted = (id) => __awaiter(this, void 0, void 0, function* () {
720
+ const { data } = yield this.request.get('/v1/badge/user_has_minted', {
721
+ params: {
722
+ user_id: id,
723
+ },
724
+ });
725
+ return data;
726
+ });
727
+ this.mintBadge = (params) => __awaiter(this, void 0, void 0, function* () {
728
+ const { data } = yield this.request.post('/v1/badge/mint', {
729
+ code: params.code,
730
+ user_id: params.userAddr,
731
+ });
732
+ return data;
733
+ });
711
734
  this.store = store;
712
735
  this.adapter = adapter;
713
736
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabby-wallet/rabby-api",
3
- "version": "0.6.17",
3
+ "version": "0.6.18",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist"