@leofcoin/endpoints 0.3.4 → 0.3.5

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/http.js CHANGED
@@ -96,15 +96,18 @@ export default (chain, port, networkVersion, remote = false) => {
96
96
  ctx.body = await chain.lookup(ctx.query.name);
97
97
  });
98
98
  router.get('/staticCall', async (ctx) => (ctx.body = await chain.staticCall(ctx.query.contract, ctx.query.method, ctx.query.params)));
99
- router.get('/nativeBurns', async (ctx) => (ctx.body = await chain.nativeBurns));
100
99
  router.get('/contracts', async (ctx) => (ctx.body = await chain.contracts));
101
- router.get('/nativeMints', async (ctx) => (ctx.body = await chain.nativeMints));
102
100
  router.get('/nativeToken', async (ctx) => (ctx.body = await chain.nativeToken));
101
+ router.get('/nativeCalls', async (ctx) => (ctx.body = await chain.nativeCalls));
102
+ router.get('/nativeMints', async (ctx) => (ctx.body = await chain.nativeMints));
103
+ router.get('/nativeBurns', async (ctx) => (ctx.body = await chain.nativeBurns));
103
104
  router.get('/nativeTransfers', async (ctx) => (ctx.body = await chain.nativeTransfers));
104
- router.get('/totalSize', async (ctx) => (ctx.body = await chain.totalSize));
105
+ router.get('/totalBurnAmount', async (ctx) => (ctx.body = await chain.totalBurnAmount));
106
+ router.get('/totalMintAmount', async (ctx) => (ctx.body = await chain.totalMintAmount));
107
+ router.get('/totalTransferAmount', async (ctx) => (ctx.body = await chain.totalTransferAmount));
105
108
  router.get('/totalTransactions', async (ctx) => (ctx.body = await chain.totalTransactions));
109
+ router.get('/totalSize', async (ctx) => (ctx.body = await chain.totalSize));
106
110
  router.get('/totalBlocks', async (ctx) => (ctx.body = await chain.totalBlocks));
107
- router.get('/nativeCalls', async (ctx) => (ctx.body = await chain.nativeCalls));
108
111
  router.get('/lastBlock', async (ctx) => (ctx.body = await chain.lastBlock));
109
112
  router.get('/poolTransactions', async (ctx) => (ctx.body = await globalThis.transactionPoolStore.get()));
110
113
  router.get('/transactionsInPool', async (ctx) => (ctx.body = await globalThis.transactionPoolStore.length()));
package/exports/ws.js CHANGED
@@ -63,16 +63,19 @@ export default (chain, port, networkVersion, remote = false) => {
63
63
  validators: ({ send }) => send(chain.validators),
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
- nativeBurns: async ({ send }) => send(await chain.nativeBurns),
67
66
  contracts: async ({ send }) => send(await chain.contracts),
68
- nativeMints: async ({ send }) => send(await chain.nativeMints),
69
67
  nativeToken: async ({ send }) => send(await chain.nativeToken),
68
+ nativeCalls: async ({ send }) => send(await chain.nativeCalls),
69
+ nativeMints: async ({ send }) => send(await chain.nativeMints),
70
+ nativeBurns: async ({ send }) => send(await chain.nativeBurns),
70
71
  nativeTransfers: async ({ send }) => send(await chain.nativeTransfers),
71
- totalSize: async ({ send }) => send(await chain.totalSize),
72
+ totalBurnAmount: async ({ send }) => send(await chain.totalBurnAmount),
73
+ totalMintAmount: async ({ send }) => send(await chain.totalMintAmount),
74
+ totalTransferAmount: async ({ send }) => send(await chain.totalTransferAmount),
72
75
  totalTransactions: async ({ send }) => send(await chain.totalTransactions),
73
76
  totalBlocks: async ({ send }) => send(chain.totalBlocks),
77
+ totalSize: async ({ send }) => send((await transactionPoolStore.size()) + (await blockStore.size()) + (await accountsStore.size())),
74
78
  lastBlock: async (ctx) => (ctx.body = await chain.lastBlock),
75
- nativeCalls: async ({ send }) => send(await chain.nativeCalls),
76
79
  participating: async ({ send }) => send(await chain.participating),
77
80
  poolTransactions: async ({ send }) => send(await globalThis.transactionPoolStore.get()),
78
81
  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.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "exports": {