@leofcoin/endpoints 0.4.3 → 0.4.5

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/exports/shared.js CHANGED
@@ -1,20 +1,20 @@
1
- import { formatUnits, BigNumber } from '@leofcoin/utils';
1
+ import { formatUnits } from '@leofcoin/utils';
2
2
  export const networkStats = async (chain, networkVersion) => {
3
3
  let accountsHolding = 0;
4
- let accountsHoldingAmount = BigNumber.from(0);
4
+ let accountsHoldingAmount = BigInt(0);
5
5
  let topHolders = [];
6
6
  const balances = Object.entries(await chain.balances)
7
7
  .map(([holder, amount]) => {
8
- amount = BigNumber.from(amount);
8
+ // amount = BigNumber.from(amount)
9
9
  return { holder, amount };
10
10
  })
11
11
  // @ts-ignore
12
12
  .sort((a, b) => formatUnits(b.amount.sub(a.amount)));
13
13
  for (let { holder, amount } of balances) {
14
14
  // @ts-ignore
15
- if (amount.gt(0)) {
15
+ if (amount > 0) {
16
16
  // @ts-ignore
17
- accountsHoldingAmount = accountsHoldingAmount.add(amount);
17
+ accountsHoldingAmount += amount;
18
18
  accountsHolding += 1;
19
19
  // @ts-ignore
20
20
  topHolders.length < 100 && topHolders.push({ holder, amount: formatUnits(amount) });
package/exports/ws.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  declare const _default: (chain: any, port: any, networkVersion: any, remote?: boolean) => Promise<{
2
- close: () => any;
3
- connections: any[];
2
+ close: () => void;
3
+ connections: import("socket-request-server/connection").SocketRequestConnection[];
4
4
  }>;
5
5
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/endpoints",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "exports": {
@@ -32,13 +32,13 @@
32
32
  "@leofcoin/utils": "^1.1.18",
33
33
  "koa": "^2.15.3",
34
34
  "showdown": "^2.1.0",
35
- "socket-request-server": "^1.6.6"
35
+ "socket-request-server": "^1.6.17"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/koa__cors": "^5.0.0",
39
39
  "@types/koa__router": "^12.0.4",
40
- "@types/node": "^22.5.1",
40
+ "@types/node": "^22.5.4",
41
41
  "@types/showdown": "^2.0.6",
42
- "typescript": "^5.5.4"
42
+ "typescript": "^5.6.2"
43
43
  }
44
44
  }