Masternodes#

class defichain.ocean.Masternodes(ocean)#
list(size: int = 30, next: str | None = None) {}#

Get list of masternodes

Parameters:
  • size (int) – (optional) size masternodes size to query

  • next (str) – (optional) next set of masternodes to get

Returns:

(json string) {id: str, sort: str, state: MasternodeState, mintedBlocks: int, owner: {address: str}, operator: {address: str}, creation: {height: int}, resign: {tx: str, height: int}, timelock: int}

Example:

>>> ocean.masternodes.list()
get(id: str) {}#

Get information about a masternode with given id

Parameters:

id (str) – (required) id masternode id to get

Returns:

(json string) {id: str, sort: str, state: MasternodeState, mintedBlocks: int, owner: {address: str}, operator: {address: str}, creation: {height: int}, resign: {tx: str, height: int}, timelock: int}

Example:

>>> ocean.masternodes.get("bbdd23cfb429680fd10a3ce169595ff6123ef576bb936add069812528f73ceaa")