In-browser signing support (#3231)
* Signer RAW confirmations * Returning address book as eth_accounts * UI support for in-browser signing * Post review fixes * Adding new methods to jsonrpc * Fixing eth_accounts * Deterministic accounts ordering
This commit is contained in:
@@ -93,6 +93,10 @@ export function inFilter (options) {
|
||||
}
|
||||
|
||||
export function inHex (str) {
|
||||
if (str && str.toString) {
|
||||
str = str.toString(16);
|
||||
}
|
||||
|
||||
if (str && str.substr(0, 2) === '0x') {
|
||||
return str.toLowerCase();
|
||||
}
|
||||
|
||||
@@ -181,6 +181,12 @@ export default class Parity {
|
||||
.then(outAddress);
|
||||
}
|
||||
|
||||
nextNonce (account) {
|
||||
return this._transport
|
||||
.execute('parity_nextNonce', inAddress(account))
|
||||
.then(outNumber);
|
||||
}
|
||||
|
||||
nodeName () {
|
||||
return this._transport
|
||||
.execute('parity_nodeName');
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import { inNumber16 } from '../../format/input';
|
||||
import { inNumber16, inData } from '../../format/input';
|
||||
import { outSignerRequest } from '../../format/output';
|
||||
|
||||
export default class Signer {
|
||||
@@ -27,6 +27,11 @@ export default class Signer {
|
||||
.execute('signer_confirmRequest', inNumber16(requestId), options, password);
|
||||
}
|
||||
|
||||
confirmRequestRaw (requestId, data) {
|
||||
return this._transport
|
||||
.execute('signer_confirmRequestRaw', inNumber16(requestId), inData(data));
|
||||
}
|
||||
|
||||
generateAuthorizationToken () {
|
||||
return this._transport
|
||||
.execute('signer_generateAuthorizationToken');
|
||||
|
||||
Reference in New Issue
Block a user