@leofcoin/endpoints 0.4.0 → 0.4.2

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
@@ -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
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));
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),
@@ -73,8 +74,10 @@ export default (chain, port, networkVersion, remote = false) => {
73
74
  totalMintAmount: async ({ send }) => send(await chain.totalMintAmount),
74
75
  totalTransferAmount: async ({ send }) => send(await chain.totalTransferAmount),
75
76
  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())),
77
+ totalBlocks: async ({ send }) => send(await chain.totalBlocks),
78
+ totalSize: async ({ send }) => send((await globalThis.transactionPoolStore.size()) +
79
+ (await globalThis.blockStore.size()) +
80
+ (await globalThis.accountsStore.size())),
78
81
  lastBlock: async (ctx) => (ctx.body = await chain.lastBlock),
79
82
  participating: async ({ send }) => send(await chain.participating),
80
83
  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.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "exports": {