Extend jsapi interfaces with documentation
This commit is contained in:
parent
a659adfd33
commit
c784ab55d2
@ -54,6 +54,11 @@ export default class Parity {
|
||||
.execute('parity_checkRequest', inNumber16(requestId));
|
||||
}
|
||||
|
||||
consensusCapability () {
|
||||
return this._transport
|
||||
.execute('parity_consensusCapability');
|
||||
}
|
||||
|
||||
dappsPort () {
|
||||
return this._transport
|
||||
.execute('parity_dappsPort')
|
||||
@ -90,6 +95,11 @@ export default class Parity {
|
||||
.execute('parity_enode');
|
||||
}
|
||||
|
||||
executeUpgrade () {
|
||||
return this._transport
|
||||
.execute('parity_executeUpgrade');
|
||||
}
|
||||
|
||||
extraData () {
|
||||
return this._transport
|
||||
.execute('parity_extraData');
|
||||
@ -243,6 +253,11 @@ export default class Parity {
|
||||
.then(outAddress);
|
||||
}
|
||||
|
||||
releasesInfo () {
|
||||
return this._transport
|
||||
.execute('parity_releasesInfo');
|
||||
}
|
||||
|
||||
removeReservedPeer (encode) {
|
||||
return this._transport
|
||||
.execute('parity_removeReservedPeer', encode);
|
||||
@ -316,28 +331,13 @@ export default class Parity {
|
||||
.then(outNumber);
|
||||
}
|
||||
|
||||
consensusCapability () {
|
||||
upgradeReady () {
|
||||
return this._transport
|
||||
.execute('parity_consensusCapability');
|
||||
.execute('parity_upgradeReady');
|
||||
}
|
||||
|
||||
versionInfo () {
|
||||
return this._transport
|
||||
.execute('parity_versionInfo');
|
||||
}
|
||||
|
||||
releasesInfo () {
|
||||
return this._transport
|
||||
.execute('parity_releasesInfo');
|
||||
}
|
||||
|
||||
upgradeReady () {
|
||||
return this._transport
|
||||
.execute('parity_upgradeReady');
|
||||
}
|
||||
|
||||
executeUpgrade () {
|
||||
return this._transport
|
||||
.execute('parity_executeUpgrade');
|
||||
}
|
||||
}
|
||||
|
@ -100,6 +100,15 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
consensusCapability: {
|
||||
desc: 'Returns an object or string detailing the state of parity capability of maintaining consensus',
|
||||
params: [],
|
||||
returns: [
|
||||
type: Object,
|
||||
desc: 'Either "capable", {"capableUntil":N}, {"incapableSince":N} or "unknown" (N is a block number)'
|
||||
]
|
||||
},
|
||||
|
||||
dappsPort: {
|
||||
desc: 'Returns the port the dapps are running on, error if not enabled',
|
||||
params: [],
|
||||
@ -163,6 +172,15 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
executeUpgrade: {
|
||||
desc: 'Performs an upgrade',
|
||||
params: [],
|
||||
returns: [
|
||||
type: Boolean,
|
||||
desc: 'returns true if the upgrade to the release specified in parity_upgradeReady was successfully executed, false if not'
|
||||
]
|
||||
},
|
||||
|
||||
extraData: {
|
||||
desc: 'Returns currently set extra data',
|
||||
params: [],
|
||||
@ -468,6 +486,15 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
releasesInfo: {
|
||||
desc: 'returns a ReleasesInfo object describing the current status of releases'
|
||||
params: [],
|
||||
returns: [
|
||||
type: Object,
|
||||
desc: '"fork":N,"minor":null,"this_fork":MN,"track":R} (N is a block number representing the latest known fork of this chain which may be in the future, MN is a block number representing the latest known fork that the currently running binary can sync past or null if not known, R is a ReleaseInfo object describing the latest release in this release track)'
|
||||
]
|
||||
},
|
||||
|
||||
removeReservedPeer: {
|
||||
desc: '?',
|
||||
params: [
|
||||
@ -651,5 +678,23 @@ export default {
|
||||
type: Quantity,
|
||||
desc: 'Number of unsigned transactions'
|
||||
}
|
||||
},
|
||||
|
||||
upgradeReady: {
|
||||
desc: 'returns a ReleaseInfo object describing the release which is available for upgrade or null if none is available',
|
||||
params: [],
|
||||
returns: {
|
||||
type: Object,
|
||||
desc: '{"binary":H,"fork":15100,"is_critical":true,"version":V} where H is the Keccak-256 checksum of the release parity binary and V is a VersionInfo object describing the release'
|
||||
}
|
||||
},
|
||||
|
||||
versionInfo: {
|
||||
desc: 'returns a VersionInfo object describing our current version',
|
||||
params: [],
|
||||
returns: {
|
||||
type: Object,
|
||||
desc: '{"hash":H,"track":T,"version":{"major":N,"minor":N,"patch":N}} (H is a 160-bit Git commit hash, T is a ReleaseTrack, either "stable", "beta", "nightly" or "unknown" and N is a version number)'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user