github.com/jeffallen/go-ethereum@v1.1.4-0.20150910155051-571d3236c49c/rpc/api/admin_js.go (about) 1 // Copyright 2015 The go-ethereum Authors 2 // This file is part of the go-ethereum library. 3 // 4 // The go-ethereum library is free software: you can redistribute it and/or modify 5 // it under the terms of the GNU Lesser General Public License as published by 6 // the Free Software Foundation, either version 3 of the License, or 7 // (at your option) any later version. 8 // 9 // The go-ethereum library is distributed in the hope that it will be useful, 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 // GNU Lesser General Public License for more details. 13 // 14 // You should have received a copy of the GNU Lesser General Public License 15 // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. 16 17 package api 18 19 const Admin_JS = ` 20 web3._extend({ 21 property: 'admin', 22 methods: 23 [ 24 new web3._extend.Method({ 25 name: 'addPeer', 26 call: 'admin_addPeer', 27 params: 1, 28 inputFormatter: [null] 29 }), 30 new web3._extend.Method({ 31 name: 'exportChain', 32 call: 'admin_exportChain', 33 params: 1, 34 inputFormatter: [null] 35 }), 36 new web3._extend.Method({ 37 name: 'importChain', 38 call: 'admin_importChain', 39 params: 1, 40 inputFormatter: [null] 41 }), 42 new web3._extend.Method({ 43 name: 'sleepBlocks', 44 call: 'admin_sleepBlocks', 45 params: 2, 46 inputFormatter: [null, null] 47 }), 48 new web3._extend.Method({ 49 name: 'verbosity', 50 call: 'admin_verbosity', 51 params: 1, 52 inputFormatter: [web3._extend.utils.fromDecimal] 53 }), 54 new web3._extend.Method({ 55 name: 'setSolc', 56 call: 'admin_setSolc', 57 params: 1, 58 inputFormatter: [null] 59 }), 60 new web3._extend.Method({ 61 name: 'startRPC', 62 call: 'admin_startRPC', 63 params: 4, 64 inputFormatter: [null, null, null, null] 65 }), 66 new web3._extend.Method({ 67 name: 'stopRPC', 68 call: 'admin_stopRPC', 69 params: 0, 70 inputFormatter: [] 71 }), 72 new web3._extend.Method({ 73 name: 'setGlobalRegistrar', 74 call: 'admin_setGlobalRegistrar', 75 params: 2, 76 inputFormatter: [null,null] 77 }), 78 new web3._extend.Method({ 79 name: 'setHashReg', 80 call: 'admin_setHashReg', 81 params: 2, 82 inputFormatter: [null,null] 83 }), 84 new web3._extend.Method({ 85 name: 'setUrlHint', 86 call: 'admin_setUrlHint', 87 params: 2, 88 inputFormatter: [null,null] 89 }), 90 new web3._extend.Method({ 91 name: 'saveInfo', 92 call: 'admin_saveInfo', 93 params: 2, 94 inputFormatter: [null,null] 95 }), 96 new web3._extend.Method({ 97 name: 'register', 98 call: 'admin_register', 99 params: 3, 100 inputFormatter: [null,null,null] 101 }), 102 new web3._extend.Method({ 103 name: 'registerUrl', 104 call: 'admin_registerUrl', 105 params: 3, 106 inputFormatter: [null,null,null] 107 }), 108 new web3._extend.Method({ 109 name: 'startNatSpec', 110 call: 'admin_startNatSpec', 111 params: 0, 112 inputFormatter: [] 113 }), 114 new web3._extend.Method({ 115 name: 'stopNatSpec', 116 call: 'admin_stopNatSpec', 117 params: 0, 118 inputFormatter: [] 119 }), 120 new web3._extend.Method({ 121 name: 'getContractInfo', 122 call: 'admin_getContractInfo', 123 params: 1, 124 inputFormatter: [null], 125 }), 126 new web3._extend.Method({ 127 name: 'httpGet', 128 call: 'admin_httpGet', 129 params: 2, 130 inputFormatter: [null, null] 131 }) 132 ], 133 properties: 134 [ 135 new web3._extend.Property({ 136 name: 'nodeInfo', 137 getter: 'admin_nodeInfo' 138 }), 139 new web3._extend.Property({ 140 name: 'peers', 141 getter: 'admin_peers' 142 }), 143 new web3._extend.Property({ 144 name: 'datadir', 145 getter: 'admin_datadir' 146 }), 147 new web3._extend.Property({ 148 name: 'chainSyncStatus', 149 getter: 'admin_chainSyncStatus' 150 }) 151 ] 152 }); 153 `