@leofcoin/endpoint-clients 0.3.12 → 0.3.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/direct.js +6 -0
- package/exports/http.js +6 -0
- package/exports/types/direct.d.ts +2 -0
- package/exports/types/http.d.ts +2 -0
- package/exports/types/ws.d.ts +2 -0
- package/exports/ws.js +6 -0
- package/package.json +6 -6
package/exports/direct.js
CHANGED
|
@@ -63,6 +63,9 @@ class Client {
|
|
|
63
63
|
staticCall(contract, method, params) {
|
|
64
64
|
return chain.staticCall(contract, method, params);
|
|
65
65
|
}
|
|
66
|
+
totalContracts() {
|
|
67
|
+
return chain.totalContracts;
|
|
68
|
+
}
|
|
66
69
|
contracts() {
|
|
67
70
|
return chain.contracts;
|
|
68
71
|
}
|
|
@@ -155,6 +158,9 @@ class Client {
|
|
|
155
158
|
lastBlock() {
|
|
156
159
|
return chain.lastBlock;
|
|
157
160
|
}
|
|
161
|
+
lastBlockHeight() {
|
|
162
|
+
return chain.lastBlockHeight;
|
|
163
|
+
}
|
|
158
164
|
blockHashMap() {
|
|
159
165
|
return chain.blockHashMap;
|
|
160
166
|
}
|
package/exports/http.js
CHANGED
|
@@ -67,6 +67,9 @@ class Client {
|
|
|
67
67
|
contracts() {
|
|
68
68
|
return this._fetch('contracts');
|
|
69
69
|
}
|
|
70
|
+
totalContracts() {
|
|
71
|
+
return this._fetchNumber('totalContracts');
|
|
72
|
+
}
|
|
70
73
|
nativeToken() {
|
|
71
74
|
return this._fetchString('nativeToken');
|
|
72
75
|
}
|
|
@@ -133,6 +136,9 @@ class Client {
|
|
|
133
136
|
lastBlock() {
|
|
134
137
|
return this._fetch('lastBlock');
|
|
135
138
|
}
|
|
139
|
+
lastBlockHeight() {
|
|
140
|
+
return this._fetchNumber('lastBlockHeight');
|
|
141
|
+
}
|
|
136
142
|
blockHashMap() {
|
|
137
143
|
return this._fetch('blockHashMap');
|
|
138
144
|
}
|
|
@@ -21,6 +21,7 @@ export default class Client {
|
|
|
21
21
|
validators(): any;
|
|
22
22
|
lookup(name: string): any;
|
|
23
23
|
staticCall(contract: string, method: string, params: {}): any;
|
|
24
|
+
totalContracts(): number;
|
|
24
25
|
contracts(): number;
|
|
25
26
|
nativeToken(): string;
|
|
26
27
|
nativeCalls(): number;
|
|
@@ -51,6 +52,7 @@ export default class Client {
|
|
|
51
52
|
}>;
|
|
52
53
|
getNonce(address: string): any;
|
|
53
54
|
lastBlock(): any;
|
|
55
|
+
lastBlockHeight(): any;
|
|
54
56
|
blockHashMap(): any;
|
|
55
57
|
bootstrap(): any;
|
|
56
58
|
}
|
package/exports/types/http.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export default class Client {
|
|
|
24
24
|
lookup(name: any): Promise<any>;
|
|
25
25
|
staticCall(contract: any, method: any, params: any): Promise<any>;
|
|
26
26
|
contracts(): Promise<any>;
|
|
27
|
+
totalContracts(): Promise<number>;
|
|
27
28
|
nativeToken(): Promise<string>;
|
|
28
29
|
nativeCalls(): Promise<number>;
|
|
29
30
|
nativeMints(): Promise<number>;
|
|
@@ -51,6 +52,7 @@ export default class Client {
|
|
|
51
52
|
}>;
|
|
52
53
|
getNonce(address: string): Promise<number>;
|
|
53
54
|
lastBlock(): Promise<any>;
|
|
55
|
+
lastBlockHeight(): Promise<number>;
|
|
54
56
|
blockHashMap(): Promise<any>;
|
|
55
57
|
bootstrap(): Promise<any>;
|
|
56
58
|
}
|
package/exports/types/ws.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export default class Client {
|
|
|
25
25
|
lookup(name: string): Promise<any>;
|
|
26
26
|
staticCall(contract: string, method: string, params: {}): Promise<any>;
|
|
27
27
|
contracts(): Promise<number>;
|
|
28
|
+
totalContracts(): Promise<number>;
|
|
28
29
|
nativeToken(): Promise<string>;
|
|
29
30
|
nativeCalls(): Promise<number>;
|
|
30
31
|
nativeMints(): Promise<number>;
|
|
@@ -52,6 +53,7 @@ export default class Client {
|
|
|
52
53
|
}>;
|
|
53
54
|
getNonce(address: string): Promise<any>;
|
|
54
55
|
lastBlock(): Promise<any>;
|
|
56
|
+
lastBlockHeight(): Promise<any>;
|
|
55
57
|
blockHashMap(): Promise<any>;
|
|
56
58
|
bootstrap(): Promise<any>;
|
|
57
59
|
}
|
package/exports/ws.js
CHANGED
|
@@ -66,6 +66,9 @@ class Client {
|
|
|
66
66
|
contracts() {
|
|
67
67
|
return this.request('contracts');
|
|
68
68
|
}
|
|
69
|
+
totalContracts() {
|
|
70
|
+
return this.request('totalContracts');
|
|
71
|
+
}
|
|
69
72
|
nativeToken() {
|
|
70
73
|
return this.request('nativeToken');
|
|
71
74
|
}
|
|
@@ -132,6 +135,9 @@ class Client {
|
|
|
132
135
|
lastBlock() {
|
|
133
136
|
return this.request('lastBlock');
|
|
134
137
|
}
|
|
138
|
+
lastBlockHeight() {
|
|
139
|
+
return this.request('lastBlockHeight');
|
|
140
|
+
}
|
|
135
141
|
blockHashMap() {
|
|
136
142
|
return this.request('blockHashMap');
|
|
137
143
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leofcoin/endpoint-clients",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.14",
|
|
4
4
|
"description": "",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
},
|
|
45
45
|
"homepage": "https://github.com/leofcoin/endpoint-clients#readme",
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@rollup/plugin-typescript": "^11.
|
|
48
|
-
"rollup": "^
|
|
49
|
-
"tslib": "^2.
|
|
47
|
+
"@rollup/plugin-typescript": "^11.1.6",
|
|
48
|
+
"rollup": "^4.21.2",
|
|
49
|
+
"tslib": "^2.7.0"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@leofcoin/utils": "^1.1.
|
|
53
|
-
"socket-request-client": "^2.0.
|
|
52
|
+
"@leofcoin/utils": "^1.1.18",
|
|
53
|
+
"socket-request-client": "^2.0.9"
|
|
54
54
|
}
|
|
55
55
|
}
|