@leofcoin/endpoints 0.2.13 → 0.2.14

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
@@ -178,6 +178,24 @@ await client.totalTransactions()
178
178
  ```
179
179
  <br>
180
180
 
181
+ #### [poolTransactions()](https://remote.leofcoin.org/poolTransactions)
182
+ ```js
183
+ await client.poolTransactions()
184
+ ```
185
+ <br>
186
+
187
+ #### [transactionsInPool()](https://remote.leofcoin.org/transactionsInPool)
188
+ ```js
189
+ await client.transactionsInPool()
190
+ ```
191
+ <br>
192
+
193
+ #### [transactionPoolSize()](https://remote.leofcoin.org/transactionPoolSize)
194
+ ```js
195
+ await client.transactionPoolSize()
196
+ ```
197
+ <br>
198
+
181
199
  #### [totalBlocks()](https://remote.leofcoin.org/totalBlocks)
182
200
  ```js
183
201
  await client.totalBlocks()
package/exports/http.js CHANGED
@@ -130,6 +130,16 @@ export default (chain, port, networkVersion) => {
130
130
  ctx.body = chain.totalTransactions
131
131
  )
132
132
 
133
+ router.get('/poolTransactions', async ctx =>
134
+ ctx.body = await transactionPoolStore.get()
135
+ )
136
+ router.get('/transactionsInPool', async ctx =>
137
+ ctx.body = await transactionPoolStore.length()
138
+ )
139
+ router.get('/transactionPoolSize', async ctx =>
140
+ ctx.body = await transactionPoolStore.size()
141
+ )
142
+
133
143
  router.get('/totalBlocks', ctx =>
134
144
  ctx.body = chain.blocks.length
135
145
  )
package/exports/ws.js CHANGED
@@ -69,6 +69,12 @@ export default (chain, port, networkVersion) => {
69
69
  send(chain.totalSize),
70
70
  totalTransactions: ({send}) =>
71
71
  send(chain.totalTransactions),
72
+ poolTransactions: async ({send}) =>
73
+ send(await transactionPoolStore.get()),
74
+ transactionsInPool: async ({send}) =>
75
+ send(await transactionPoolStore.length()),
76
+ transactionPoolSize: async ({send}) =>
77
+ send(await transactionPoolStore.size()),
72
78
  totalBlocks: ({send}) =>
73
79
  send(chain.blocks.length),
74
80
  nativeCalls: ({send}) =>
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@leofcoin/endpoints",
3
- "version": "0.2.13",
3
+ "version": "0.2.14",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "exports": {
7
- "./api": "./exportys/api.md",
7
+ "./api": "./exports/api.md",
8
8
  "./http": "./exports/http.js",
9
9
  "./ws": "./exports/ws.js"
10
10
  },