Add ethcore_[dapps|signer]Port APIs (#2821)

* Add ethcore_[dapps|signer]Port APIs

* typo
This commit is contained in:
Jaco Greeff 2016-10-24 15:09:33 +02:00 committed by Gav Wood
parent 44a560e964
commit e0207b594b
2 changed files with 30 additions and 0 deletions

View File

@ -32,6 +32,12 @@ export default class Ethcore {
.execute('ethcore_addReservedPeer', encode); .execute('ethcore_addReservedPeer', encode);
} }
dappsPort () {
return this._transport
.execute('ethcore_dappsPort')
.then(outNumber);
}
defaultExtraData () { defaultExtraData () {
return this._transport return this._transport
.execute('ethcore_defaultExtraData'); .execute('ethcore_defaultExtraData');
@ -154,6 +160,12 @@ export default class Ethcore {
.execute('ethcore_setTransactionsLimit', inNumber16(quantity)); .execute('ethcore_setTransactionsLimit', inNumber16(quantity));
} }
signerPort () {
return this._transport
.execute('ethcore_signerPort')
.then(outNumber);
}
transactionsLimit () { transactionsLimit () {
return this._transport return this._transport
.execute('ethcore_transactionsLimit') .execute('ethcore_transactionsLimit')

View File

@ -40,6 +40,15 @@ export default {
} }
}, },
dappsPort: {
desc: 'Returns the port the dapps are running on, error if not enabled',
params: [],
returns: {
type: Quantity,
desc: 'The port number'
}
},
defaultExtraData: { defaultExtraData: {
desc: 'Returns the default extra data', desc: 'Returns the default extra data',
params: [], params: [],
@ -294,6 +303,15 @@ export default {
} }
}, },
signerPort: {
desc: 'Returns the port the signer is running on, error if not enabled',
params: [],
returns: {
type: Quantity,
desc: 'The port number'
}
},
transactionsLimit: { transactionsLimit: {
desc: 'Changes limit for transactions in queue.', desc: 'Changes limit for transactions in queue.',
params: [], params: [],