| 
									
										
										
										
											2016-11-06 20:08:40 +02:00
										 |  |  | <!DOCTYPE html> | 
					
						
							|  |  |  | <html lang="en"> | 
					
						
							|  |  |  |   <head> | 
					
						
							|  |  |  |     <meta charset="utf-8"> | 
					
						
							|  |  |  |     <meta http-equiv="X-UA-Compatible" content="IE=edge"> | 
					
						
							|  |  |  |     <meta name="viewport" content="width=device-width, initial-scale=1"> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     <title>Go Ethereum Guide</title> | 
					
						
							|  |  |  |     <link rel="icon" type="image/png" href="../static/images/favicon.png" /> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     <link href="../static/styles/bootstrap.min.css" rel="stylesheet" /> | 
					
						
							|  |  |  |     <link href="../static/styles/flatly.min.css" rel="stylesheet" /> | 
					
						
							|  |  |  |     <link href="../static/styles/font-awesome.min.css" rel="stylesheet" /> | 
					
						
							| 
									
										
										
										
											2017-01-05 17:19:42 +02:00
										 |  |  |     <link href="../static/styles/highlight.min.css" rel="stylesheet" /> | 
					
						
							| 
									
										
										
										
											2016-11-06 20:08:40 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     <link href="../static/styles/custom/common.css" rel="stylesheet" /> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     <script src="../static/scripts/jquery.min.js"></script> | 
					
						
							|  |  |  |     <script src="../static/scripts/bootstrap.min.js"></script> | 
					
						
							|  |  |  |     <script src="../static/scripts/moment.min.js"></script> | 
					
						
							|  |  |  |     <script src="../static/scripts/marked.min.js"></script> | 
					
						
							|  |  |  |     <script src="../static/scripts/emojify.min.js"></script> | 
					
						
							| 
									
										
										
										
											2017-01-05 17:19:42 +02:00
										 |  |  |     <script src="../static/scripts/highlight.min.js"></script> | 
					
						
							| 
									
										
										
										
											2017-01-16 17:19:40 +02:00
										 |  |  |     <script src="../static/scripts/highlight-go.min.js"></script> | 
					
						
							| 
									
										
										
										
											2017-01-05 17:19:42 +02:00
										 |  |  |     <script src="../static/scripts/highlight-java.min.js"></script> | 
					
						
							|  |  |  |     <script src="../static/scripts/highlight-gradle.min.js"></script> | 
					
						
							|  |  |  |     <script src="../static/scripts/highlight-swift.min.js"></script> | 
					
						
							| 
									
										
										
										
											2016-11-23 14:14:38 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     <script src="../static/scripts/custom/polyfills.js"></script> | 
					
						
							| 
									
										
										
										
											2016-11-06 20:08:40 +02:00
										 |  |  |   </head> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   <body> | 
					
						
							|  |  |  |     <nav class="navbar navbar-default navbar-fixed-top"> | 
					
						
							|  |  |  |       <div class="container"> | 
					
						
							|  |  |  |         <div class="navbar-header"> | 
					
						
							|  |  |  |           <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> | 
					
						
							|  |  |  |             <span class="sr-only">Toggle navigation</span> | 
					
						
							|  |  |  |             <span class="icon-bar"></span> | 
					
						
							|  |  |  |             <span class="icon-bar"></span> | 
					
						
							|  |  |  |             <span class="icon-bar"></span> | 
					
						
							|  |  |  |           </button> | 
					
						
							|  |  |  |           <a class="navbar-brand" href="../">Go Ethereum</a> | 
					
						
							|  |  |  |         </div> | 
					
						
							|  |  |  |         <div id="navbar" class="navbar-collapse collapse"> | 
					
						
							|  |  |  |           <ul class="nav navbar-nav"> | 
					
						
							| 
									
										
										
										
											2016-11-23 14:04:24 +02:00
										 |  |  |             <li><a href="../install/">Install</a></li> | 
					
						
							|  |  |  |             <li><a href="../downloads/">Downloads</a></li> | 
					
						
							|  |  |  |             <li class="active"><a href="../guide/">Guide</a></li> | 
					
						
							| 
									
										
										
										
											2016-11-06 20:08:40 +02:00
										 |  |  |           </ul> | 
					
						
							|  |  |  |         </div> | 
					
						
							|  |  |  |       </div> | 
					
						
							|  |  |  |     </nav> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-11-22 10:35:56 +02:00
										 |  |  |     <div class="container" style="padding-top: 24px;"> | 
					
						
							| 
									
										
										
										
											2016-11-06 20:08:40 +02:00
										 |  |  |       <div class="row"> | 
					
						
							| 
									
										
										
										
											2016-11-22 10:35:56 +02:00
										 |  |  |         <div class="col-md-3" id="toc" style="padding-top: 16px;"></div> | 
					
						
							| 
									
										
										
										
											2016-11-06 20:08:40 +02:00
										 |  |  |         <div class="col-md-9" id="content"></div> | 
					
						
							|  |  |  |       </div> | 
					
						
							|  |  |  |       <hr/> | 
					
						
							|  |  |  |       <footer> | 
					
						
							|  |  |  |         <p>© 2013-2016. The go-ethereum Authors.</p> | 
					
						
							|  |  |  |       </footer> | 
					
						
							|  |  |  |     </div> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     <script type="text/javascript"> | 
					
						
							| 
									
										
										
										
											2017-01-17 14:25:54 +02:00
										 |  |  |       // Download the developer guide ToC and convert it into a guide sidebar | 
					
						
							| 
									
										
										
										
											2016-11-06 20:08:40 +02:00
										 |  |  |       $.ajax({ | 
					
						
							| 
									
										
										
										
											2016-11-22 10:35:56 +02:00
										 |  |  |         url: 'https://raw.githubusercontent.com/wiki/ethereum/go-ethereum/Developer-Guide.md', | 
					
						
							| 
									
										
										
										
											2016-11-06 20:08:40 +02:00
										 |  |  |         error: function() { | 
					
						
							|  |  |  |           alert("Failed to load latest release!"); | 
					
						
							|  |  |  |         }, | 
					
						
							|  |  |  |         dataType: 'text', | 
					
						
							|  |  |  |         success: function(data) { | 
					
						
							|  |  |  |           // Iterate over all the lines of the sidebar markdown | 
					
						
							|  |  |  |           var lines = data.split("\n"); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |           var toc = $("#toc"); | 
					
						
							|  |  |  |           var menu; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-05 17:19:42 +02:00
										 |  |  |           var head; | 
					
						
							| 
									
										
										
										
											2016-11-06 20:08:40 +02:00
										 |  |  |           for (var i = 0; i < lines.length; i++) { | 
					
						
							|  |  |  |             // Skip any empty lines | 
					
						
							|  |  |  |             var line = lines[i].trim(); | 
					
						
							|  |  |  |             if (line == "") { | 
					
						
							|  |  |  |               continue; | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |             // If the line is a heading, add a new menu entry | 
					
						
							|  |  |  |             if (line[0] == "#") { | 
					
						
							|  |  |  |               while (line.length > 0 && line[0] == "#") { | 
					
						
							|  |  |  |                 line = line.slice(1); | 
					
						
							|  |  |  |               } | 
					
						
							| 
									
										
										
										
											2017-01-05 17:19:42 +02:00
										 |  |  |               head = line.trim(); | 
					
						
							| 
									
										
										
										
											2016-11-06 20:08:40 +02:00
										 |  |  |               menu = $("<div class='list-group'></div>").appendTo(toc); | 
					
						
							| 
									
										
										
										
											2017-01-05 17:19:42 +02:00
										 |  |  |               $("<a href='#' class='list-group-item active'>" + head + "</a>").appendTo(menu); | 
					
						
							| 
									
										
										
										
											2016-11-06 20:08:40 +02:00
										 |  |  |               continue; | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |             // Otherwise if the line is a link, add a new entry to the sub-menu | 
					
						
							|  |  |  |             if (line[0] == "[") { | 
					
						
							|  |  |  |               var name = /\[(.*)\]/g.exec(line)[1]; | 
					
						
							| 
									
										
										
										
											2017-01-17 14:25:54 +02:00
										 |  |  |               var id   = (head + "-" + name).split(" ").join("-"); | 
					
						
							| 
									
										
										
										
											2016-11-06 20:08:40 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |               var link = /\((.*)\)/g.exec(line)[1]; | 
					
						
							|  |  |  |               link = "https://raw.githubusercontent.com/wiki/" + link.slice("https://github.com/".length).replace("wiki/", "") + ".md"; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-17 14:25:54 +02:00
										 |  |  |               var item = $("<a id='menu-" + id + "' href='#" + id + "' class='list-group-item'>" + name + "</a>").appendTo(menu); | 
					
						
							|  |  |  |               $(item).click(function(id, head, name, link) { | 
					
						
							| 
									
										
										
										
											2016-11-06 20:08:40 +02:00
										 |  |  |                 return function() { | 
					
						
							|  |  |  |                   $.ajax({ | 
					
						
							|  |  |  |                     url: link, | 
					
						
							|  |  |  |                     error: function() { | 
					
						
							|  |  |  |                       $('#content').html("<div class='alert alert-dismissible alert-danger'>Failed to load guide page \"" + name + "\". Please report this issue on our <a href='https://github.com/ethereum/go-ethereum/issues' class='alert-link'>bug tracker</a>. Thank you!</div>"); | 
					
						
							|  |  |  |                     }, | 
					
						
							|  |  |  |                     dataType: 'text', | 
					
						
							|  |  |  |                     success: function(data) { | 
					
						
							| 
									
										
										
										
											2017-01-17 14:25:54 +02:00
										 |  |  |                       // Load the wiki page content into the current page | 
					
						
							| 
									
										
										
										
											2017-01-05 17:19:42 +02:00
										 |  |  |                       $('#content').html("<h1>" + head + ": " + name + "</h1>" + marked(data)); | 
					
						
							| 
									
										
										
										
											2016-11-06 20:08:40 +02:00
										 |  |  |                       emojify.setConfig({img_dir: '../static/images/emoji'}); | 
					
						
							|  |  |  |                       emojify.run(document.getElementById('content')); | 
					
						
							| 
									
										
										
										
											2017-01-05 17:19:42 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-17 14:25:54 +02:00
										 |  |  |                       // Run the syntax highlighter on all code blocks | 
					
						
							| 
									
										
										
										
											2017-01-05 17:19:42 +02:00
										 |  |  |                       $('pre code').each(function(i, block) { | 
					
						
							|  |  |  |                         hljs.highlightBlock(block); | 
					
						
							|  |  |  |                       }); | 
					
						
							| 
									
										
										
										
											2016-11-06 20:08:40 +02:00
										 |  |  |                     } | 
					
						
							|  |  |  |                   }); | 
					
						
							|  |  |  |                 }; | 
					
						
							| 
									
										
										
										
											2017-01-17 14:25:54 +02:00
										 |  |  |               }(id, head, name, link)); | 
					
						
							| 
									
										
										
										
											2016-11-06 20:08:40 +02:00
										 |  |  |             } | 
					
						
							|  |  |  |           } | 
					
						
							| 
									
										
										
										
											2017-01-17 14:25:54 +02:00
										 |  |  |           // Menu constructed, load the specified entry, or first if non existent | 
					
						
							|  |  |  |           if (window.location.hash.length > 1) { | 
					
						
							|  |  |  |             $('#menu-' + window.location.hash.split('#')[1])[0].click(); | 
					
						
							|  |  |  |           } else { | 
					
						
							|  |  |  |             $(toc.children()[0]).children()[1].click(); | 
					
						
							|  |  |  |           } | 
					
						
							| 
									
										
										
										
											2016-11-06 20:08:40 +02:00
										 |  |  |         } | 
					
						
							|  |  |  |       }); | 
					
						
							|  |  |  |     </script> | 
					
						
							|  |  |  |   </body> | 
					
						
							|  |  |  | </html> |