-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathindex.html
272 lines (265 loc) · 14 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
<!DOCTYPE html>
<html lang="en" ng-app="mewApp">
<head>
<meta charset="utf-8">
<title>MyEtherAPI: An API by MyEtherWallet</title>
<link rel="canonical" href="https://www.myetherapi.com" />
<meta name="description" content="Finally, we've evolved to have an API WITH documentation">
<meta name="author" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/myetherapi-master.min.css">
<script type="text/javascript" src="js/myetherapi-master.js"></script>
<link rel="apple-touch-icon" sizes="60x60" href="images/fav/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="76x76" href="images/fav/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="120x120" href="images/fav/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="152x152" href="images/fav/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="images/fav/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="images/fav/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="images/fav/favicon-194x194.png" sizes="194x194">
<link rel="icon" type="image/png" href="images/fav/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="images/fav/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="images/fav/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="images/fav/manifest.json">
<link rel="shortcut icon" href="images/favicon.ico">
<meta name="msapplication-TileColor" content="#2e4868">
<meta name="msapplication-TileImage" content="images/fav/mstile-144x144.png">
<meta name="msapplication-config" content="images/fav/browserconfig.xml">
<meta name="theme-color" content="#2e4868">
</head>
<body>
<header>
<section class="container-fluid bg-gradient header-branding">
<section class="container">
<a class="brand" href="https://www.myetherapi.com/"><img src="images/etherwallet-logo.svg" height="64px" width="auto" alt="MyEtherAPI" /></a>
<div class="tagline"> An API by MyEtherWallet · v0.0.1 </div>
</section>
</section>
</header>
<section class="container">
<h2> Endpoints </h2>
<table class="table striped">
<thead>
<tr>
<th> Name </th>
<th> Endpoint </th>
<th> Type </th>
<th> EIP-155 </th>
<th> Chain ID </th>
</tr>
</thead>
<tbody>
<tr>
<td> ETH </td>
<td> <a href="https://api.myetherapi.com/eth" target="_blank">https://api.myetherapi.com/eth</a> </td>
<td> Parity </td>
<td> TRUE </td>
<td> 1 </td>
</tr>
<tr>
<td> Ropsten </td>
<td> <a href="https://api.myetherapi.com/rop" target="_blank">https://api.myetherapi.com/rop</a> </td>
<td> Parity </td>
<td> TRUE </td>
<td> 3 </td>
</tr>
<tbody>
</table>
<h2> Calls </h2>
<table class="table striped">
<thead>
<tr>
<th>
This Stuff
</th>
<th>
More Info
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
JSON RPC Methods
</td>
<td>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#json-rpc-methods" target="_blank">https://github.com/ethereum/wiki/wiki/JSON-RPC#json-rpc-methods</a>
</td>
</tr>
<tr>
<td> Web3 </td>
<td> <code>web3.setProvider(new web3.providers.HttpProvider('PUT_ENDPOINT_URL_HERE')</code> </td>
</tr>
<tbody>
</table>
<h5>Allowed Methods</h5>
<pre><code>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#web3_clientversion"> web3_clientVersion</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#web3_sha3"> web3_sha3</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#net_version"> net_version</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#net_peercount"> net_peerCount</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_protocolversion"> eth_protocolVersion</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_syncing"> eth_syncing</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_gasprice"> eth_gasPrice</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_blocknumber"> eth_blockNumber</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getbalance"> eth_getBalance</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getstorageat"> eth_getStorageAt</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_gettransactioncount"> eth_getTransactionCount</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getblocktransactioncountbyhash"> eth_getBlockTransactionCountByHash</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getblocktransactioncountbynumber"> eth_getBlockTransactionCountByNumber</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getunclecountbyblockhash"> eth_getUncleCountByBlockHash</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getunclecountbyblocknumber"> eth_getUncleCountByBlockNumber</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getcode"> eth_getCode</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sendrawtransaction"> eth_sendRawTransaction</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_call"> eth_call</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_estimategas"> eth_estimateGas</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getblockbyhsh"> eth_getBlockByHash</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getblockbynumber"> eth_getBlockByNumber</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_gettransactionbyhash"> eth_getTransactionByHash</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_gettransactionbyblockhashandindex"> eth_getTransactionByBlockHashAndIndex</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_gettransactionbyblocknumberandindex"> eth_getTransactionByBlockNumberAndIndex</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_gettransactionreceipt"> eth_getTransactionReceipt</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getunclebyblockhashandindex"> eth_getUncleByBlockHashAndIndex</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getunclebyblocknumberandindex"> eth_getUncleByBlockNumberAndIndex</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getcompilers"> eth_getCompilers</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_compilesolidity"> eth_compileSolidity</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_newfilter"> eth_newFilter</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_newblockfilter"> eth_newBlockFilter</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_newpendingtransactionfilter"> eth_newPendingTransactionFilter</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_uninstallfilter"> eth_uninstallFilter</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getfilterchanges"> eth_getFilterChanges</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getfilterlogs"> eth_getFilterLogs</a>
<a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getlogs"> eth_getLogs</a>
<a href="https://github.com/ethcore/parity/wiki/JSONRPC-trace-module#the-ad-hoc-tracing-api"> trace_call</a>
<a href="https://github.com/ethcore/parity/wiki/JSONRPC-trace-module#the-ad-hoc-tracing-api"> trace_rawTransaction</a>
<a href="https://github.com/ethcore/parity/wiki/JSONRPC-trace-module#the-ad-hoc-tracing-api"> trace_replayTransaction</a>
<a href="https://github.com/ethcore/parity/wiki/JSONRPC-trace-module#trace_filter"> trace_filter</a>
<a href="https://github.com/ethcore/parity/wiki/JSONRPC-trace-module#trace_get"> trace_get</a>
<a href="https://github.com/ethcore/parity/wiki/JSONRPC-trace-module#trace_transaction"> trace_transaction</a>
<a href="https://github.com/ethcore/parity/wiki/JSONRPC-trace-module#trace_block"> trace_block</a>
</code></pre>
<h2> Examples: JSON RPC </h2>
<h5>Example 1</h5>
<pre><code>
// Request
curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0x7cB57B5A97eAbe94205C07890BE4c1aD31E486A8", "latest"],"id":1}' https://api.myetherapi.com/eth
// Result
{
"id":1,
"jsonrpc": "2.0",
"result": "0x231d5cd577654ceab3" // 647751843213568961203
}
</code></pre>
<h2> Examples: Web3 </h2>
<h5>Example 1</h5>
<pre><code>
var web3 = new Web3();
web3.setProvider(new web3.providers.HttpProvider('https://api.myetherapi.com/eth'));
web3.eth.getBalance("0x7cB57B5A97eAbe94205C07890BE4c1aD31E486A8").toString();
//Result
"647751843213568961203"
</code></pre>
<h5>Example 2</h5>
<pre><code>
var web3 = new Web3();
web3.setProvider(new web3.providers.HttpProvider('https://api.myetherapi.com/eth'));
var filter = web3.eth.filter('pending');
filter.watch(function(error, result) {
if (!error) {
web3.eth.getTransaction(result, function(error, data) {
if (!error) $("#newTxs tr:first").after('<tr><td>'+data.from+'</td><td>'+data.to+'</td><td> '+web3.fromWei(data.value,'ether').toString()+' ETH </td></tr>');
});
}
});
//Result
//checkout latest transactions below, it might take a second to load as it is waiting for incoming txs
</code></pre>
<h2> Latest Transactions </h2>
<div style="height:500px;overflow:auto;">
<table class="table striped" id="newTxs">
<thead>
<tr>
<th> From </th>
<th> To </th>
<th> Value </th>
</tr>
</thead>
</table>
</div>
<h5>Example 3</h5>
<pre><code>
var web3 = new Web3();
web3.setProvider(new web3.providers.HttpProvider('https://api.myetherapi.com/eth'));
var filter = web3.eth.filter('latest');
filter.watch(function(error, result) {
if (!error) {
web3.eth.Block(result, function(error, data) {
if (!error) $("#newBlocks tr:first").after('<tr><td>'+data.hash.substr(0,20)+'...</td><td>'+data.number+'</td><td> '+data.miner+'</td><td> '+data.uncles.length+'</td></tr>');
});
}
});
//Result
//checkout latest Blocks below, it might take a second to load as it is waiting for new Blocks
</code></pre>
<h2> Latest Blocks </h2>
<div style="height:500px;overflow:auto;">
<table class="table striped" id="newBlocks">
<thead>
<tr>
<th> Hash </th>
<th> Block # </th>
<th> Miner </th>
<th> # Transactions </th>
</tr>
</thead>
</table>
</div>
<!--<h2> Pricing </h2>
<table class="table striped">
<thead>
<tr>
<th> Number of Requests / Month </th>
<th> Price / Month </th>
</tr>
</thead>
<tbody>
<tr>
<td> 1,000,000 </td>
<td> 1,000,000 ETH </td>
</tr>
<tr>
<td> 10,000,000 </td>
<td> 5,000,000 ETH </td>
</tr>
<tbody>
</table> -->
<h2> Support </h2>
<p> Contact your friendly tayvano any time, she'll be super excited to help you :) </p>
</section>
<footer class="container-fluid">
<div class="container">
<p>
<a href="https://www.myetherapi.com/"><img src="images/etherwallet-logo.svg" height="55px" width="auto" alt="MyEtherAPI" /></a>
</p>
<p>
MyEtherAPI: An API by MyEtherWallet · Created by <a href="https://github.com/kvhnuke" target="_blank">kvhnuke</a> & <a href="https://github.com/tayvano" target="_blank">tayvano</a>.
</p>
<p>
Donations greatly appreciated: <span class="mono wrap">0x7cB57B5A97eAbe94205C07890BE4c1aD31E486A8</span>
</p>
<p>
Links:
<a href="https://www.myetherapi.com" target="_blank"> MyEtherAPI.com </a> —
<a href="https://github.com/MyEtherWallet/myetherapi" target="_blank"> Github </a> ·
<a href="https://www.myetherwallet.com" target="_blank"> MyEtherWallet.com </a> —
<a href="https://github.com/kvhnuke/etherwallet" target="_blank"> Github </a> ·
<a href="https://github.com/MyEtherWallet" target="_blank"> All MyEtherWallet on Github </a>
</p>
<p>
Contact:
<a href="mailto:[email protected]" target="_blank">Email</a> ·
<a href="https://twitter.com/myetherwallet" target="_blank">Twitter</a>
</p>
</div>
</footer>
</body>
</html>