@rabby-wallet/rabby-api 0.7.17 → 0.7.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
@@ -341,6 +341,43 @@ export declare class OpenApiService {
341
341
  is_success: boolean;
342
342
  inner_id: number;
343
343
  }>;
344
+ badgeHasClaimedByName: ({ id, name, }: {
345
+ id: string;
346
+ name: string;
347
+ }) => Promise<{
348
+ id: string;
349
+ badge_id: number;
350
+ user_id: string;
351
+ inner_id: number;
352
+ create_at: number;
353
+ update_at: number;
354
+ has_claimed: true;
355
+ } | {
356
+ has_claimed: false;
357
+ }>;
358
+ badgeHasMintedByName: ({ id, name, }: {
359
+ id: string;
360
+ name: string;
361
+ }) => Promise<{
362
+ id: string;
363
+ badge_id: number;
364
+ user_id: string;
365
+ inner_id: number;
366
+ usd_value: number;
367
+ tvf: number;
368
+ mint_at: number;
369
+ has_minted: true;
370
+ } | {
371
+ has_minted: false;
372
+ }>;
373
+ mintBadgeByName: (params: {
374
+ name: string;
375
+ code: string;
376
+ userAddr: string;
377
+ }) => Promise<{
378
+ is_success: boolean;
379
+ inner_id: number;
380
+ }>;
344
381
  userHasRequestedFaucet: (params: {
345
382
  chain_id: string;
346
383
  user_addr: string;
package/dist/index.js CHANGED
@@ -765,6 +765,29 @@ export class OpenApiService {
765
765
  });
766
766
  return data;
767
767
  });
768
+ this.badgeHasClaimedByName = ({ id, name, }) => __awaiter(this, void 0, void 0, function* () {
769
+ const { data } = yield this.request.get(`/v1/badge/code/user_has_claimed/${name}`, {
770
+ params: {
771
+ user_id: id,
772
+ },
773
+ });
774
+ return data;
775
+ });
776
+ this.badgeHasMintedByName = ({ id, name, }) => __awaiter(this, void 0, void 0, function* () {
777
+ const { data } = yield this.request.get(`/v1/badge/user_has_minted/${name}`, {
778
+ params: {
779
+ user_id: id,
780
+ },
781
+ });
782
+ return data;
783
+ });
784
+ this.mintBadgeByName = (params) => __awaiter(this, void 0, void 0, function* () {
785
+ const { data } = yield this.request.post(`/v1/badge/mint/${params.name}`, {
786
+ code: params.code,
787
+ user_id: params.userAddr,
788
+ });
789
+ return data;
790
+ });
768
791
  this.userHasRequestedFaucet = (params) => __awaiter(this, void 0, void 0, function* () {
769
792
  const { data } = yield this.request.get('/v1/faucet/user_has_requested', {
770
793
  params,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabby-wallet/rabby-api",
3
- "version": "0.7.17",
3
+ "version": "0.7.18",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [