@leofcoin/endpoints 0.4.2 → 0.4.3
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 +8 -0
- package/exports/http.js +1 -0
- package/exports/ws.js +1 -0
- package/package.json +1 -1
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.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()),
|