@leofcoin/endpoints 0.4.2 → 0.4.4

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/api.md CHANGED
@@ -311,6 +311,14 @@ await client.totalBlocks()
311
311
 
312
312
  <br>
313
313
 
314
+ #### [lastBlockHeight()](https://remote.leofcoin.org/lastBlockHeight)
315
+
316
+ ```js
317
+ await client.lastBlockHeight()
318
+ ```
319
+
320
+ <br>
321
+
314
322
  #### [participating()](https://remote.leofcoin.org/participating)
315
323
 
316
324
  ```js
package/exports/http.js CHANGED
@@ -110,6 +110,7 @@ export default (chain, port, networkVersion, remote = false) => {
110
110
  router.get('/totalSize', async (ctx) => (ctx.body = await chain.totalSize));
111
111
  router.get('/totalBlocks', async (ctx) => (ctx.body = await chain.totalBlocks));
112
112
  router.get('/lastBlock', async (ctx) => (ctx.body = await chain.lastBlock));
113
+ router.get('/lastBlockHeight', async (ctx) => (ctx.body = await chain.lastBlockHeight));
113
114
  router.get('/poolTransactions', async (ctx) => (ctx.body = await globalThis.transactionPoolStore.get()));
114
115
  router.get('/transactionsInPool', async (ctx) => (ctx.body = await globalThis.transactionPoolStore.length()));
115
116
  router.get('/transactionPoolSize', async (ctx) => (ctx.body = await globalThis.transactionPoolStore.size()));
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/exports/ws.js CHANGED
@@ -79,6 +79,7 @@ export default (chain, port, networkVersion, remote = false) => {
79
79
  (await globalThis.blockStore.size()) +
80
80
  (await globalThis.accountsStore.size())),
81
81
  lastBlock: async (ctx) => (ctx.body = await chain.lastBlock),
82
+ lastBlockHeight: async (ctx) => (ctx.body = await chain.lastBlockHeight),
82
83
  participating: async ({ send }) => send(await chain.participating),
83
84
  poolTransactions: async ({ send }) => send(await globalThis.transactionPoolStore.get()),
84
85
  transactionsInPool: async ({ send }) => send(await globalThis.transactionPoolStore.length()),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/endpoints",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
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
  }