Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Add ethcore_[dapps|signer]Port APIs (#2821)
Browse files Browse the repository at this point in the history
* Add ethcore_[dapps|signer]Port APIs

* typo
  • Loading branch information
jacogr authored and gavofyork committed Oct 24, 2016
1 parent 44a560e commit e0207b5
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
12 changes: 12 additions & 0 deletions js/src/api/rpc/ethcore/ethcore.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ export default class Ethcore {
.execute('ethcore_addReservedPeer', encode);
}

dappsPort () {
return this._transport
.execute('ethcore_dappsPort')
.then(outNumber);
}

defaultExtraData () {
return this._transport
.execute('ethcore_defaultExtraData');
Expand Down Expand Up @@ -154,6 +160,12 @@ export default class Ethcore {
.execute('ethcore_setTransactionsLimit', inNumber16(quantity));
}

signerPort () {
return this._transport
.execute('ethcore_signerPort')
.then(outNumber);
}

transactionsLimit () {
return this._transport
.execute('ethcore_transactionsLimit')
Expand Down
18 changes: 18 additions & 0 deletions js/src/jsonrpc/interfaces/ethcore.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
desc: 'Returns the default extra data',
params: [],
Expand Down Expand Up @@ -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: {
desc: 'Changes limit for transactions in queue.',
params: [],
Expand Down

0 comments on commit e0207b5

Please sign in to comment.