@leofcoin/endpoint-clients 0.2.4 → 0.2.6
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 +12 -0
- package/exports/types/http.d.ts +6 -2
- package/exports/types/ws.d.ts +4 -0
- package/exports/ws.js +12 -0
- package/package.json +1 -1
- package/src/http.ts +14 -1
- package/src/ws.ts +13 -0
package/exports/http.js
CHANGED
|
@@ -85,6 +85,15 @@ class Client {
|
|
|
85
85
|
totalTransactions() {
|
|
86
86
|
return this._fetchNumber('totalTransactions');
|
|
87
87
|
}
|
|
88
|
+
poolTransactions() {
|
|
89
|
+
return this._fetch('poolTransactions');
|
|
90
|
+
}
|
|
91
|
+
transactionsInPool() {
|
|
92
|
+
return this._fetchNumber('transactionsInPool');
|
|
93
|
+
}
|
|
94
|
+
transactionPoolSize() {
|
|
95
|
+
return this._fetchNumber('transactionPoolSize');
|
|
96
|
+
}
|
|
88
97
|
totalBlocks() {
|
|
89
98
|
return this._fetchNumber('totalBlocks');
|
|
90
99
|
}
|
|
@@ -109,6 +118,9 @@ class Client {
|
|
|
109
118
|
networkStats() {
|
|
110
119
|
return this._fetch('networkStats');
|
|
111
120
|
}
|
|
121
|
+
getNonce(address) {
|
|
122
|
+
return this._fetchNumber('getNonce', { address });
|
|
123
|
+
}
|
|
112
124
|
}
|
|
113
125
|
|
|
114
126
|
export { Client as default };
|
package/exports/types/http.d.ts
CHANGED
|
@@ -30,6 +30,9 @@ export default class Client {
|
|
|
30
30
|
nativeTransfers(): Promise<number>;
|
|
31
31
|
totalSize(): Promise<number>;
|
|
32
32
|
totalTransactions(): Promise<number>;
|
|
33
|
+
poolTransactions(): Promise<any>;
|
|
34
|
+
transactionsInPool(): Promise<number>;
|
|
35
|
+
transactionPoolSize(): Promise<number>;
|
|
33
36
|
totalBlocks(): Promise<number>;
|
|
34
37
|
nativeCalls(): Promise<number>;
|
|
35
38
|
participating(): Promise<boolean>;
|
|
@@ -37,11 +40,12 @@ export default class Client {
|
|
|
37
40
|
createContractAddress(owner: any, code: any, params: any): Promise<any>;
|
|
38
41
|
deployContract(code: any, params: any): Promise<any>;
|
|
39
42
|
network(): Promise<any>;
|
|
40
|
-
networkStats(): {
|
|
43
|
+
networkStats(): Promise<{
|
|
41
44
|
version: string;
|
|
42
45
|
peers: {}[];
|
|
43
46
|
accounts: number;
|
|
44
47
|
accountsHolding: number;
|
|
45
|
-
}
|
|
48
|
+
}>;
|
|
49
|
+
getNonce(address: string): Promise<number>;
|
|
46
50
|
}
|
|
47
51
|
export {};
|
package/exports/types/ws.d.ts
CHANGED
|
@@ -31,6 +31,9 @@ export default class Client {
|
|
|
31
31
|
nativeTransfers(): number;
|
|
32
32
|
totalSize(): number;
|
|
33
33
|
totalTransactions(): number;
|
|
34
|
+
poolTransactions(): any;
|
|
35
|
+
transactionsInPool(): any;
|
|
36
|
+
transactionPoolSize(): any;
|
|
34
37
|
totalBlocks(): number;
|
|
35
38
|
nativeCalls(): number;
|
|
36
39
|
participating(): boolean;
|
|
@@ -44,4 +47,5 @@ export default class Client {
|
|
|
44
47
|
accounts: number;
|
|
45
48
|
accountsHolding: number;
|
|
46
49
|
};
|
|
50
|
+
getNonce(address: string): any;
|
|
47
51
|
}
|
package/exports/ws.js
CHANGED
|
@@ -83,6 +83,15 @@ class Client {
|
|
|
83
83
|
totalTransactions() {
|
|
84
84
|
return this.request('totalTransactions');
|
|
85
85
|
}
|
|
86
|
+
poolTransactions() {
|
|
87
|
+
return this.request('poolTransactions');
|
|
88
|
+
}
|
|
89
|
+
transactionsInPool() {
|
|
90
|
+
return this.request('transactionsInPool');
|
|
91
|
+
}
|
|
92
|
+
transactionPoolSize() {
|
|
93
|
+
return this.request('transactionPoolSize');
|
|
94
|
+
}
|
|
86
95
|
totalBlocks() {
|
|
87
96
|
return this.request('totalBlocks');
|
|
88
97
|
}
|
|
@@ -107,6 +116,9 @@ class Client {
|
|
|
107
116
|
networkStats() {
|
|
108
117
|
return this.request('networkStats');
|
|
109
118
|
}
|
|
119
|
+
getNonce(address) {
|
|
120
|
+
return this.request('getNonce', { address });
|
|
121
|
+
}
|
|
110
122
|
}
|
|
111
123
|
|
|
112
124
|
export { Client as default };
|
package/package.json
CHANGED
package/src/http.ts
CHANGED
|
@@ -104,6 +104,15 @@ export default class Client {
|
|
|
104
104
|
totalTransactions() {
|
|
105
105
|
return this._fetchNumber('totalTransactions')
|
|
106
106
|
}
|
|
107
|
+
poolTransactions() {
|
|
108
|
+
return this._fetch('poolTransactions')
|
|
109
|
+
}
|
|
110
|
+
transactionsInPool() {
|
|
111
|
+
return this._fetchNumber('transactionsInPool')
|
|
112
|
+
}
|
|
113
|
+
transactionPoolSize() {
|
|
114
|
+
return this._fetchNumber('transactionPoolSize')
|
|
115
|
+
}
|
|
107
116
|
totalBlocks() {
|
|
108
117
|
return this._fetchNumber('totalBlocks')
|
|
109
118
|
}
|
|
@@ -129,7 +138,11 @@ export default class Client {
|
|
|
129
138
|
return this._fetch('network')
|
|
130
139
|
}
|
|
131
140
|
|
|
132
|
-
networkStats(): { version: string; peers: {}[]; accounts: number; accountsHolding: number; } {
|
|
141
|
+
networkStats(): Promise<{ version: string; peers: {}[]; accounts: number; accountsHolding: number; }> {
|
|
133
142
|
return this._fetch('networkStats')
|
|
134
143
|
}
|
|
144
|
+
|
|
145
|
+
getNonce(address: string) {
|
|
146
|
+
return this._fetchNumber('getNonce', { address })
|
|
147
|
+
}
|
|
135
148
|
}
|
package/src/ws.ts
CHANGED
|
@@ -96,6 +96,15 @@ export default class Client {
|
|
|
96
96
|
totalTransactions(): number {
|
|
97
97
|
return this.request('totalTransactions')
|
|
98
98
|
}
|
|
99
|
+
poolTransactions() {
|
|
100
|
+
return this.request('poolTransactions')
|
|
101
|
+
}
|
|
102
|
+
transactionsInPool() {
|
|
103
|
+
return this.request('transactionsInPool')
|
|
104
|
+
}
|
|
105
|
+
transactionPoolSize() {
|
|
106
|
+
return this.request('transactionPoolSize')
|
|
107
|
+
}
|
|
99
108
|
totalBlocks(): number {
|
|
100
109
|
return this.request('totalBlocks')
|
|
101
110
|
}
|
|
@@ -121,4 +130,8 @@ export default class Client {
|
|
|
121
130
|
networkStats(): { version: string; peers: {}[]; accounts: number; accountsHolding: number } {
|
|
122
131
|
return this.request('networkStats')
|
|
123
132
|
}
|
|
133
|
+
|
|
134
|
+
getNonce(address: string) {
|
|
135
|
+
return this.request('getNonce', { address })
|
|
136
|
+
}
|
|
124
137
|
}
|