@leofcoin/endpoints 0.4.1 → 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 +16 -0
- package/exports/http.js +2 -0
- package/exports/ws.js +2 -0
- package/package.json +1 -1
package/exports/api.md
CHANGED
|
@@ -191,6 +191,14 @@ await client.contracts()
|
|
|
191
191
|
|
|
192
192
|
<br>
|
|
193
193
|
|
|
194
|
+
#### [totalContracts()](https://remote.leofcoin.org/totalContracts)
|
|
195
|
+
|
|
196
|
+
```js
|
|
197
|
+
await client.totalContracts()
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
<br>
|
|
201
|
+
|
|
194
202
|
#### [nativeToken()](https://remote.leofcoin.org/nativeToken)
|
|
195
203
|
|
|
196
204
|
```js
|
|
@@ -303,6 +311,14 @@ await client.totalBlocks()
|
|
|
303
311
|
|
|
304
312
|
<br>
|
|
305
313
|
|
|
314
|
+
#### [lastBlockHeight()](https://remote.leofcoin.org/lastBlockHeight)
|
|
315
|
+
|
|
316
|
+
```js
|
|
317
|
+
await client.lastBlockHeight()
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
<br>
|
|
321
|
+
|
|
306
322
|
#### [participating()](https://remote.leofcoin.org/participating)
|
|
307
323
|
|
|
308
324
|
```js
|
package/exports/http.js
CHANGED
|
@@ -97,6 +97,7 @@ export default (chain, port, networkVersion, remote = false) => {
|
|
|
97
97
|
});
|
|
98
98
|
router.get('/staticCall', async (ctx) => (ctx.body = await chain.staticCall(ctx.query.contract, ctx.query.method, ctx.query.params)));
|
|
99
99
|
router.get('/contracts', async (ctx) => (ctx.body = await chain.contracts));
|
|
100
|
+
router.get('/totalContracts', async (ctx) => (ctx.body = await chain.totalContracts));
|
|
100
101
|
router.get('/nativeToken', async (ctx) => (ctx.body = await chain.nativeToken));
|
|
101
102
|
router.get('/nativeCalls', async (ctx) => (ctx.body = await chain.nativeCalls));
|
|
102
103
|
router.get('/nativeMints', async (ctx) => (ctx.body = await chain.nativeMints));
|
|
@@ -109,6 +110,7 @@ export default (chain, port, networkVersion, remote = false) => {
|
|
|
109
110
|
router.get('/totalSize', async (ctx) => (ctx.body = await chain.totalSize));
|
|
110
111
|
router.get('/totalBlocks', async (ctx) => (ctx.body = await chain.totalBlocks));
|
|
111
112
|
router.get('/lastBlock', async (ctx) => (ctx.body = await chain.lastBlock));
|
|
113
|
+
router.get('/lastBlockHeight', async (ctx) => (ctx.body = await chain.lastBlockHeight));
|
|
112
114
|
router.get('/poolTransactions', async (ctx) => (ctx.body = await globalThis.transactionPoolStore.get()));
|
|
113
115
|
router.get('/transactionsInPool', async (ctx) => (ctx.body = await globalThis.transactionPoolStore.length()));
|
|
114
116
|
router.get('/transactionPoolSize', async (ctx) => (ctx.body = await globalThis.transactionPoolStore.size()));
|
package/exports/ws.js
CHANGED
|
@@ -64,6 +64,7 @@ export default (chain, port, networkVersion, remote = false) => {
|
|
|
64
64
|
lookup: async ({ name }, { send }) => send(await chain.lookup(name)),
|
|
65
65
|
staticCall: async ({ contract, method, params }, { send }) => send(await chain.staticCall(contract, method, params)),
|
|
66
66
|
contracts: async ({ send }) => send(await chain.contracts),
|
|
67
|
+
totalContracts: async ({ send }) => send(await chain.totalContracts),
|
|
67
68
|
nativeToken: async ({ send }) => send(await chain.nativeToken),
|
|
68
69
|
nativeCalls: async ({ send }) => send(await chain.nativeCalls),
|
|
69
70
|
nativeMints: async ({ send }) => send(await chain.nativeMints),
|
|
@@ -78,6 +79,7 @@ export default (chain, port, networkVersion, remote = false) => {
|
|
|
78
79
|
(await globalThis.blockStore.size()) +
|
|
79
80
|
(await globalThis.accountsStore.size())),
|
|
80
81
|
lastBlock: async (ctx) => (ctx.body = await chain.lastBlock),
|
|
82
|
+
lastBlockHeight: async (ctx) => (ctx.body = await chain.lastBlockHeight),
|
|
81
83
|
participating: async ({ send }) => send(await chain.participating),
|
|
82
84
|
poolTransactions: async ({ send }) => send(await globalThis.transactionPoolStore.get()),
|
|
83
85
|
transactionsInPool: async ({ send }) => send(await globalThis.transactionPoolStore.length()),
|