@leofcoin/endpoint-clients 0.3.9 → 0.3.10

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/direct.js CHANGED
@@ -11,7 +11,7 @@ class Client {
11
11
  get pubsub() {
12
12
  return {
13
13
  publish: globalThis.pubsub.publish,
14
- subscribe: globalThis.pubsub.subscribe,
14
+ subscribe: globalThis.pubsub.subscribe
15
15
  };
16
16
  }
17
17
  balances() {
@@ -43,7 +43,7 @@ class Client {
43
43
  return chain.getBlock(index);
44
44
  }
45
45
  blocks(amount) {
46
- return chain.getBlocks(amount);
46
+ return globalThis.blockStore.values(amount);
47
47
  }
48
48
  sendTransaction(transaction) {
49
49
  return chain.sendTransaction(transaction);
@@ -128,8 +128,7 @@ class Client {
128
128
  if (amount.gt(0)) {
129
129
  accountsHoldingAmount = accountsHoldingAmount.add(amount);
130
130
  accountsHolding += 1;
131
- topHolders.length < 100 &&
132
- topHolders.push({ holder, amount: formatUnits(amount) });
131
+ topHolders.length < 100 && topHolders.push({ holder, amount: formatUnits(amount) });
133
132
  }
134
133
  }
135
134
  return {
@@ -138,7 +137,7 @@ class Client {
138
137
  accounts: await accountsStore.length(),
139
138
  accountsHolding,
140
139
  accountsHoldingAmount: formatUnits(accountsHoldingAmount).toString(),
141
- topHolders,
140
+ topHolders
142
141
  };
143
142
  }
144
143
  getNonce(address) {
package/exports/ws.js CHANGED
@@ -15,7 +15,7 @@ class Client {
15
15
  get pubsub() {
16
16
  return {
17
17
  publish: this.client.pubsub.publish,
18
- subscribe: this.client.pubsub.subscribe,
18
+ subscribe: this.client.pubsub.subscribe
19
19
  };
20
20
  }
21
21
  request(url, params) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/endpoint-clients",
3
- "version": "0.3.9",
3
+ "version": "0.3.10",
4
4
  "description": "",
5
5
  "exports": {
6
6
  ".": {