@typus/typus-sdk 1.2.45 → 1.2.46

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.
@@ -1,2 +1,3 @@
1
1
  export declare function getExpEarn(u64_padding: Map<string, string>): number;
2
2
  export declare function getExpEarnPerMinute(u64_padding: Map<string, string>): number;
3
+ export declare function getHourlyExpPerUSD(): number;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getExpEarnPerMinute = exports.getExpEarn = void 0;
3
+ exports.getHourlyExpPerUSD = exports.getExpEarnPerMinute = exports.getExpEarn = void 0;
4
+ // 0.005 hourly exp per 1U
5
+ var divisor = 12000;
4
6
  function getExpEarn(u64_padding) {
5
7
  var usd_in_deposit = Number(u64_padding.get("usd_in_deposit"));
6
8
  // console.log(`usd_in_deposit: ${usd_in_deposit}`);
@@ -8,7 +10,7 @@ function getExpEarn(u64_padding) {
8
10
  // console.log(`snapshot_ms: ${snapshot_ms}`);
9
11
  var minutes = round((new Date().getTime() - snapshot_ms) / 60000);
10
12
  // console.log(`minutes: ${minutes}`);
11
- var exp_earn = round((usd_in_deposit * minutes) / 6000);
13
+ var exp_earn = round((usd_in_deposit * minutes) / divisor);
12
14
  // console.log(`exp_earn: ${exp_earn}`);
13
15
  return exp_earn;
14
16
  }
@@ -16,11 +18,16 @@ exports.getExpEarn = getExpEarn;
16
18
  function getExpEarnPerMinute(u64_padding) {
17
19
  var usd_in_deposit = Number(u64_padding.get("usd_in_deposit"));
18
20
  // console.log(`usd_in_deposit: ${usd_in_deposit}`);
19
- var exp_earn = usd_in_deposit / 6000;
21
+ var exp_earn = usd_in_deposit / divisor;
20
22
  // console.log(`exp_earn: ${exp_earn}`);
21
23
  return exp_earn;
22
24
  }
23
25
  exports.getExpEarnPerMinute = getExpEarnPerMinute;
26
+ function getHourlyExpPerUSD() {
27
+ var exp_earn = (1 * 60) / divisor;
28
+ return exp_earn;
29
+ }
30
+ exports.getHourlyExpPerUSD = getHourlyExpPerUSD;
24
31
  function round(a) {
25
32
  return a - (a % 1);
26
33
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@typus/typus-sdk",
3
3
  "author": "Typus",
4
4
  "description": "typus sdk",
5
- "version": "1.2.45",
5
+ "version": "1.2.46",
6
6
  "dependencies": {
7
7
  "@mysten/bcs": "^0.7.3",
8
8
  "@mysten/kiosk": "0.7.12",