admin_js.go 2.2 KB
Newer Older
Bas van Kervel's avatar
Bas van Kervel committed
1 2 3
package api

const Admin_JS = `
4
web3._extend({
Bas van Kervel's avatar
Bas van Kervel committed
5 6 7
	property: 'admin',
	methods:
	[
8
		new web3._extend.Method({
Bas van Kervel's avatar
Bas van Kervel committed
9 10 11
			name: 'addPeer',
			call: 'admin_addPeer',
			params: 1,
12 13
			inputFormatter: [web3._extend.utils.formatInputString],
			outputFormatter: web3._extend.formatters.formatOutputBool
Bas van Kervel's avatar
Bas van Kervel committed
14
		}),
15
		new web3._extend.Method({
Bas van Kervel's avatar
Bas van Kervel committed
16 17 18
			name: 'exportChain',
			call: 'admin_exportChain',
			params: 1,
19
			inputFormatter: [web3._extend.utils.formatInputString],
Bas van Kervel's avatar
Bas van Kervel committed
20 21
			outputFormatter: function(obj) { return obj; }
		}),
22
		new web3._extend.Method({
Bas van Kervel's avatar
Bas van Kervel committed
23 24 25
			name: 'importChain',
			call: 'admin_importChain',
			params: 1,
26
			inputFormatter: [web3._extend.utils.formatInputString],
Bas van Kervel's avatar
Bas van Kervel committed
27 28
			outputFormatter: function(obj) { return obj; }
		}),
29
		new web3._extend.Method({
Bas van Kervel's avatar
Bas van Kervel committed
30 31 32
			name: 'verbosity',
			call: 'admin_verbosity',
			params: 1,
33 34
			inputFormatter: [web3._extend.utils.formatInputInt],
			outputFormatter: web3._extend.formatters.formatOutputBool
Bas van Kervel's avatar
Bas van Kervel committed
35
		}),
36
		new web3._extend.Method({
Bas van Kervel's avatar
Bas van Kervel committed
37 38 39
			name: 'setSolc',
			call: 'admin_setSolc',
			params: 1,
40 41
			inputFormatter: [web3._extend.utils.formatInputString],
			outputFormatter: web3._extend.formatters.formatOutputString
42 43 44 45 46 47 48 49 50 51 52 53 54 55
		}),
		new web3._extend.Method({
			name: 'startRPC',
			call: 'admin_startRPC',
			params: 4,
			inputFormatter: [web3._extend.utils.formatInputString,web3._extend.utils.formatInputInteger,web3._extend.utils.formatInputString,web3._extend.utils.formatInputString],
			outputFormatter: web3._extend.formatters.formatOutputBool
		}),
		new web3._extend.Method({
			name: 'stopRPC',
			call: 'admin_stopRPC',
			params: 0,
			inputFormatter: [],
			outputFormatter: web3._extend.formatters.formatOutputBool
Bas van Kervel's avatar
Bas van Kervel committed
56 57 58 59
		})
	],
	properties:
	[
60
		new web3._extend.Property({
Bas van Kervel's avatar
Bas van Kervel committed
61 62
			name: 'nodeInfo',
			getter: 'admin_nodeInfo',
63
			outputFormatter: web3._extend.formatters.formatOutputString
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
		}),
		new web3._extend.Property({
			name: 'peers',
			getter: 'admin_peers',
			outputFormatter: function(obj) { return obj; }
		}),
		new web3._extend.Property({
			name: 'datadir',
			getter: 'admin_datadir',
			outputFormatter: web3._extend.formatters.formatOutputString
		}),
		new web3._extend.Property({
			name: 'chainSyncStatus',
			getter: 'admin_chainSyncStatus',
			outputFormatter: function(obj) { return obj; }
Bas van Kervel's avatar
Bas van Kervel committed
79 80 81 82
		})
	]
});
`