@leofcoin/endpoints 0.3.6 → 0.4.1

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.
Files changed (2) hide show
  1. package/exports/ws.js +4 -2
  2. package/package.json +10 -10
package/exports/ws.js CHANGED
@@ -73,8 +73,10 @@ export default (chain, port, networkVersion, remote = false) => {
73
73
  totalMintAmount: async ({ send }) => send(await chain.totalMintAmount),
74
74
  totalTransferAmount: async ({ send }) => send(await chain.totalTransferAmount),
75
75
  totalTransactions: async ({ send }) => send(await chain.totalTransactions),
76
- totalBlocks: async ({ send }) => send(chain.totalBlocks),
77
- totalSize: async ({ send }) => send((await transactionPoolStore.size()) + (await blockStore.size()) + (await accountsStore.size())),
76
+ totalBlocks: async ({ send }) => send(await chain.totalBlocks),
77
+ totalSize: async ({ send }) => send((await globalThis.transactionPoolStore.size()) +
78
+ (await globalThis.blockStore.size()) +
79
+ (await globalThis.accountsStore.size())),
78
80
  lastBlock: async (ctx) => (ctx.body = await chain.lastBlock),
79
81
  participating: async ({ send }) => send(await chain.participating),
80
82
  poolTransactions: async ({ send }) => send(await globalThis.transactionPoolStore.get()),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/endpoints",
3
- "version": "0.3.6",
3
+ "version": "0.4.1",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "exports": {
@@ -28,17 +28,17 @@
28
28
  "homepage": "https://github.com/leofcoin/endpoints#readme",
29
29
  "dependencies": {
30
30
  "@koa/cors": "^5.0.0",
31
- "@koa/router": "^12.0.0",
32
- "@leofcoin/utils": "^1.1.10",
33
- "koa": "^2.14.1",
31
+ "@koa/router": "^13.0.0",
32
+ "@leofcoin/utils": "^1.1.18",
33
+ "koa": "^2.15.3",
34
34
  "showdown": "^2.1.0",
35
- "socket-request-server": "^1.6.3"
35
+ "socket-request-server": "^1.6.6"
36
36
  },
37
37
  "devDependencies": {
38
- "@types/koa__cors": "^4.0.1",
39
- "@types/koa__router": "^12.0.1",
40
- "@types/node": "^20.8.6",
41
- "@types/showdown": "^2.0.2",
42
- "typescript": "^5.2.2"
38
+ "@types/koa__cors": "^5.0.0",
39
+ "@types/koa__router": "^12.0.4",
40
+ "@types/node": "^22.5.1",
41
+ "@types/showdown": "^2.0.6",
42
+ "typescript": "^5.5.4"
43
43
  }
44
44
  }