github.com/jeffallen/go-ethereum@v1.1.4-0.20150910155051-571d3236c49c/rpc/api/eth_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  // JS api provided by web3.js
    20  // eth_sign not standard
    21  
    22  const Eth_JS = `
    23  web3._extend({
    24  	property: 'eth',
    25  	methods:
    26  	[
    27  		new web3._extend.Method({
    28  			name: 'sign',
    29  			call: 'eth_sign',
    30  			params: 2,
    31  			inputFormatter: [web3._extend.utils.toAddress, null]
    32  		}),
    33  		new web3._extend.Method({
    34  			name: 'resend',
    35  			call: 'eth_resend',
    36  			params: 3,
    37  			inputFormatter: [web3._extend.formatters.inputTransactionFormatter, web3._extend.utils.fromDecimal, web3._extend.utils.fromDecimal]
    38  		})
    39  	],
    40  	properties:
    41  	[
    42  		new web3._extend.Property({
    43  			name: 'pendingTransactions',
    44  			getter: 'eth_pendingTransactions'
    45  		})
    46  	]
    47  });
    48  `