@rabby-wallet/rabby-api 0.7.17 → 0.7.19

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;
@@ -523,6 +560,101 @@ export declare class OpenApiService {
523
560
  }) => Promise<{
524
561
  error_code: number;
525
562
  }>;
563
+ getRabbyPointsV2: (params: {
564
+ id: string;
565
+ }) => Promise<{
566
+ id: string;
567
+ invite_code?: string;
568
+ logo_url: string;
569
+ logo_thumbnail_url: string;
570
+ web3_id: string;
571
+ claimed_points: number;
572
+ total_claimed_points: number;
573
+ }>;
574
+ getRabbySignatureTextV2: (params: {
575
+ id: string;
576
+ }) => Promise<{
577
+ id: string;
578
+ text: string;
579
+ }>;
580
+ getRabbyClaimTextV2: (params: {
581
+ id: string;
582
+ invite_code?: string;
583
+ }) => Promise<{
584
+ id: string;
585
+ text: string;
586
+ }>;
587
+ setRabbyPointsInviteCodeV2: (params: {
588
+ id: string;
589
+ signature: string;
590
+ invite_code: string;
591
+ }) => Promise<{
592
+ code: number;
593
+ }>;
594
+ checkRabbyPointsInviteCodeV2: (params: {
595
+ code: string;
596
+ }) => Promise<{
597
+ invite_code_exist: boolean;
598
+ }>;
599
+ claimRabbyPointsSnapshotV2: (params: {
600
+ id: string;
601
+ signature: string;
602
+ invite_code?: string;
603
+ }) => Promise<{
604
+ error_code: number;
605
+ error_msg?: string;
606
+ }>;
607
+ getRabbyPointsTopUsersV2: (params: {
608
+ id: string;
609
+ }) => Promise<{
610
+ id: string;
611
+ logo_url: string;
612
+ logo_thumbnail_url: string;
613
+ web3_id: string;
614
+ claimed_points: number;
615
+ }[]>;
616
+ getRabbyPointsListV2: (params: {
617
+ id: string;
618
+ }) => Promise<{
619
+ id: number;
620
+ title: string;
621
+ description: string;
622
+ start_at: number;
623
+ end_at: number;
624
+ claimable_points: number;
625
+ }[]>;
626
+ claimRabbyPointsByIdV2: (params: {
627
+ campaign_id: number;
628
+ user_id: string;
629
+ signature: string;
630
+ }) => Promise<{
631
+ error_code: number;
632
+ }>;
633
+ getRabbyPointsSnapshotV2: (params: {
634
+ id: string;
635
+ }) => Promise<{
636
+ id: string;
637
+ wallet_balance_reward: number;
638
+ active_stats_reward: number;
639
+ extra_bouns: number;
640
+ claimed: boolean;
641
+ snapshot_at: number;
642
+ is_new_user: boolean;
643
+ }>;
644
+ checkRabbyPointClaimableV2: (params: {
645
+ id: string;
646
+ }) => Promise<{
647
+ claimable: boolean;
648
+ }>;
649
+ checkClaimInfoV2: (params: {
650
+ id: string;
651
+ }) => Promise<{
652
+ claimable_points: number;
653
+ claimed_points: number;
654
+ }>;
655
+ getRabbyPointsCampaignIsEndedV2: () => Promise<{
656
+ campaign_is_ended: boolean;
657
+ }>;
526
658
  getSupportedChains: () => Promise<SupportedChain[]>;
527
659
  searchChainList: (params?: {
528
660
  limit?: number;
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,
@@ -926,6 +949,74 @@ export class OpenApiService {
926
949
  const { data } = yield this.request.post('/v1/points/claim_campaign', params);
927
950
  return data;
928
951
  });
952
+ this.getRabbyPointsV2 = (params) => __awaiter(this, void 0, void 0, function* () {
953
+ const { data } = yield this.request.get('/v2/points/user', { params });
954
+ return data;
955
+ });
956
+ this.getRabbySignatureTextV2 = (params) => __awaiter(this, void 0, void 0, function* () {
957
+ const { data } = yield this.request.get('/v2/points/user/sign_text', {
958
+ params,
959
+ });
960
+ return data;
961
+ });
962
+ this.getRabbyClaimTextV2 = (params) => __awaiter(this, void 0, void 0, function* () {
963
+ const { data } = yield this.request.get('/v2/points/user/claim_text', {
964
+ params,
965
+ });
966
+ return data;
967
+ });
968
+ this.setRabbyPointsInviteCodeV2 = (params) => __awaiter(this, void 0, void 0, function* () {
969
+ const { data } = yield this.request.post('/v2/points/user/invite_code', params);
970
+ return data;
971
+ });
972
+ this.checkRabbyPointsInviteCodeV2 = (params) => __awaiter(this, void 0, void 0, function* () {
973
+ const { data } = yield this.request.get('/v2/points/user/invite_code_exist', {
974
+ params,
975
+ });
976
+ return data;
977
+ });
978
+ this.claimRabbyPointsSnapshotV2 = (params) => __awaiter(this, void 0, void 0, function* () {
979
+ const { data } = yield this.request.post('/v2/points/claim_snapshot', params);
980
+ return data;
981
+ });
982
+ this.getRabbyPointsTopUsersV2 = (params) => __awaiter(this, void 0, void 0, function* () {
983
+ const { data } = yield this.request.get('/v2/points/top_user', {
984
+ params,
985
+ });
986
+ return data;
987
+ });
988
+ this.getRabbyPointsListV2 = (params) => __awaiter(this, void 0, void 0, function* () {
989
+ const { data } = yield this.request.get('/v2/points/campaign_list', {
990
+ params,
991
+ });
992
+ return data;
993
+ });
994
+ this.claimRabbyPointsByIdV2 = (params) => __awaiter(this, void 0, void 0, function* () {
995
+ const { data } = yield this.request.post('/v2/points/claim_campaign', params);
996
+ return data;
997
+ });
998
+ this.getRabbyPointsSnapshotV2 = (params) => __awaiter(this, void 0, void 0, function* () {
999
+ const { data } = yield this.request.get('/v2/points/snapshot', {
1000
+ params,
1001
+ });
1002
+ return data;
1003
+ });
1004
+ this.checkRabbyPointClaimableV2 = (params) => __awaiter(this, void 0, void 0, function* () {
1005
+ const { data } = yield this.request.get('/v2/points/user/claimable', {
1006
+ params,
1007
+ });
1008
+ return data;
1009
+ });
1010
+ this.checkClaimInfoV2 = (params) => __awaiter(this, void 0, void 0, function* () {
1011
+ const { data } = yield this.request.get('/v2/points/user/claim_info', {
1012
+ params,
1013
+ });
1014
+ return data;
1015
+ });
1016
+ this.getRabbyPointsCampaignIsEndedV2 = () => __awaiter(this, void 0, void 0, function* () {
1017
+ const { data } = yield this.request.get('v2/points/campaign');
1018
+ return data;
1019
+ });
929
1020
  this.getSupportedChains = () => __awaiter(this, void 0, void 0, function* () {
930
1021
  const { data } = yield this.request.get('/v1/wallet/supported_chains');
931
1022
  return data;
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.19",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [