@leofcoin/endpoint-clients 0.2.4 → 0.2.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
@@ -109,6 +109,9 @@ class Client {
109
109
  networkStats() {
110
110
  return this._fetch('networkStats');
111
111
  }
112
+ getNonce(address) {
113
+ return this._fetchNumber('getNonce', { address });
114
+ }
112
115
  }
113
116
 
114
117
  export { Client as default };
@@ -37,11 +37,12 @@ export default class Client {
37
37
  createContractAddress(owner: any, code: any, params: any): Promise<any>;
38
38
  deployContract(code: any, params: any): Promise<any>;
39
39
  network(): Promise<any>;
40
- networkStats(): {
40
+ networkStats(): Promise<{
41
41
  version: string;
42
42
  peers: {}[];
43
43
  accounts: number;
44
44
  accountsHolding: number;
45
- };
45
+ }>;
46
+ getNonce(address: string): Promise<number>;
46
47
  }
47
48
  export {};
@@ -44,4 +44,5 @@ export default class Client {
44
44
  accounts: number;
45
45
  accountsHolding: number;
46
46
  };
47
+ getNonce(address: string): any;
47
48
  }
package/exports/ws.js CHANGED
@@ -107,6 +107,9 @@ class Client {
107
107
  networkStats() {
108
108
  return this.request('networkStats');
109
109
  }
110
+ getNonce(address) {
111
+ return this.request('getNonce', { address });
112
+ }
110
113
  }
111
114
 
112
115
  export { Client as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/endpoint-clients",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "",
5
5
  "exports": {
6
6
  ".": {
package/src/http.ts CHANGED
@@ -129,7 +129,11 @@ export default class Client {
129
129
  return this._fetch('network')
130
130
  }
131
131
 
132
- networkStats(): { version: string; peers: {}[]; accounts: number; accountsHolding: number; } {
132
+ networkStats(): Promise<{ version: string; peers: {}[]; accounts: number; accountsHolding: number; }> {
133
133
  return this._fetch('networkStats')
134
134
  }
135
+
136
+ getNonce(address: string) {
137
+ return this._fetchNumber('getNonce', { address })
138
+ }
135
139
  }
package/src/ws.ts CHANGED
@@ -121,4 +121,8 @@ export default class Client {
121
121
  networkStats(): { version: string; peers: {}[]; accounts: number; accountsHolding: number } {
122
122
  return this.request('networkStats')
123
123
  }
124
+
125
+ getNonce(address: string) {
126
+ return this.request('getNonce', { address })
127
+ }
124
128
  }