@exodus/ethereum-api 2.8.5 → 2.9.0
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/package.json +2 -2
- package/src/exodus-eth-server/api.js +40 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/ethereum-api",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.0",
|
|
4
4
|
"description": "Ethereum Api",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "Exodus Movement, Inc.",
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"@exodus/assets-base": "^8.0.136",
|
|
28
28
|
"@exodus/models": "^8.7.2"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "9b43c68f9c0ef99d743c5e780356bd1b417b604d"
|
|
31
31
|
}
|
|
@@ -184,5 +184,45 @@ export function create(defaultURL) {
|
|
|
184
184
|
applyPending,
|
|
185
185
|
})
|
|
186
186
|
},
|
|
187
|
+
|
|
188
|
+
async getCoinbase() {
|
|
189
|
+
return request('proxy', {
|
|
190
|
+
method: 'eth_coinbase',
|
|
191
|
+
})
|
|
192
|
+
},
|
|
193
|
+
|
|
194
|
+
async getBlockByHash(blockHash, fullTx = false) {
|
|
195
|
+
return request('proxy', {
|
|
196
|
+
method: 'eth_getBlockByHash',
|
|
197
|
+
blockHash,
|
|
198
|
+
fullTx,
|
|
199
|
+
})
|
|
200
|
+
},
|
|
201
|
+
|
|
202
|
+
async getBlockTransactionCountByHash(blockHash) {
|
|
203
|
+
return request('proxy', {
|
|
204
|
+
method: 'eth_getBlockTransactionCountByHash',
|
|
205
|
+
blockHash,
|
|
206
|
+
})
|
|
207
|
+
},
|
|
208
|
+
|
|
209
|
+
async getBlockTransactionCountByNumber(quantityOrTag) {
|
|
210
|
+
return request('proxy', {
|
|
211
|
+
method: 'eth_getBlockTransactionCountByNumber',
|
|
212
|
+
quantityOrTag,
|
|
213
|
+
})
|
|
214
|
+
},
|
|
215
|
+
|
|
216
|
+
async getCompilers() {
|
|
217
|
+
return request('proxy', {
|
|
218
|
+
method: 'eth_getCompilers',
|
|
219
|
+
})
|
|
220
|
+
},
|
|
221
|
+
|
|
222
|
+
async getNetVersion() {
|
|
223
|
+
return request('proxy', {
|
|
224
|
+
method: 'net_version',
|
|
225
|
+
})
|
|
226
|
+
},
|
|
187
227
|
}
|
|
188
228
|
}
|