@aurigami/sdk 1.12.8 → 1.12.9

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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.12.8",
2
+ "version": "1.12.9",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -30,7 +30,8 @@
30
30
  "name": "@aurigami/sdk",
31
31
  "author": "Aurigami Finance",
32
32
  "module": "dist/sdk.esm.js",
33
- "size-limit": [{
33
+ "size-limit": [
34
+ {
34
35
  "path": "dist/sdk.cjs.production.min.js",
35
36
  "limit": "300 KB"
36
37
  },
@@ -69,4 +70,4 @@
69
70
  "jest": {
70
71
  "testURL": "https://app.aurigami.finance"
71
72
  }
72
- }
73
+ }
@@ -10,7 +10,7 @@ import {
10
10
  NetworkConnection,
11
11
  PlyBetMadeEvent,
12
12
  PlyGameBetResult,
13
- PlyGameLeaderboardItem,
13
+ PlyGameLeaderboardItem
14
14
  } from '../types';
15
15
 
16
16
  export class PlyGameRead extends BlockchainEntityRead {
@@ -131,6 +131,15 @@ export class PlyGameRead extends BlockchainEntityRead {
131
131
  amount: new TokenAmount(this.plyToken, result.amount.toString()),
132
132
  };
133
133
  }
134
+
135
+ public async overallLeaderboard(): Promise<PlyGameLeaderboardItem[]> {
136
+ const result = await AuriAPI.getPaginatedApi('/plygame/overallLeaderboard');
137
+ return result.items.map((item) => ({
138
+ player: item.user,
139
+ unlockedPulpAmount: new TokenAmount(this.pulpToken, item.unlockedAmount!),
140
+ gamesPlayed: item.count!,
141
+ }));
142
+ }
134
143
  }
135
144
 
136
145
  export class PlyGameReadWrite extends PlyGameRead {