Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

Properties

Protected api

Methods

createVoteOperation

  • Create vote for miner operation.

    Parameters

    • account: AccountRef

      account name or object id, 1.2.*

    • minerIds: ChainObject[]

      list of miner account ids

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Observable<AccountUpdateOperation>

    a create vote operation

findAllVotingInfo

  • Get miner voting info list by account that match search term.

    Parameters

    • searchTerm: string

      miner name

    • Default value order: SearchMinerVotingOrder = SearchMinerVotingOrder.NameDesc

      available options are defined in [SearchMinerVotingOrder]

    • Optional id: ChainObject

      the object id of the miner to start searching from, 1.4.* or null when start from beginning

    • Optional accountName: undefined | string

      account name or null when searching without account

    • Default value onlyMyVotes: boolean = false

      when true it selects only votes given by account

    • Default value limit: number = 1000

      maximum number of miners info to fetch (must not exceed 1000)

    Returns Observable<MinerVotingInfo[]>

    a list of miner voting info

findVotedMiners

  • findVotedMiners(voteIds: VoteId[]): Observable<Miner[]>
  • Given a set of votes, return the objects they are voting for. The results will be in the same order as the votes. null will be returned for any vote ids that are not found.

    Parameters

    • voteIds: VoteId[]

      set of votes

    Returns Observable<Miner[]>

    a list of miners

getActualVotes

  • Get the number of votes each miner actually has.

    Returns Observable<MinerVotes[]>

    a list mapping account names to the number of votes

getAssetPerBlock

  • getAssetPerBlock(blockNum: Long): Observable<Long>
  • Returns a reward for a miner from a specified block.

    Parameters

    • blockNum: Long

      block number

    Returns Observable<Long>

    amount of generated DCT

getFeedsByMiner

  • getFeedsByMiner(account: ChainObject, count?: number): Observable<object>
  • Get a list of published price feeds by a miner.

    Parameters

    • account: ChainObject

      account object id, 1.2.*

    • Default value count: number = 100

      maximum number of price feeds to fetch (must not exceed 100)

    Returns Observable<object>

    a list of price feeds published by the miner

getMinerByAccount

getMinerCount

  • getMinerCount(): Observable<Long>
  • Get the total number of miners registered in DCore.

    Returns Observable<Long>

    number of miners

getMiners

getMinersToName

  • getMinersToName(): Observable<Map<string, Miner>>
  • Returns map of the first 1000 miners by their name to miner account

    Returns Observable<Map<string, Miner>>

    a map of miner name to miner account

getNewAssetPerBlock

  • getNewAssetPerBlock(): Observable<Long>
  • Returns a reward for a miner from the most recent block.

    Returns Observable<Long>

    amount of newly generated DCT

listMinersRelative

  • listMinersRelative(lowerBound?: string, limit?: number): Observable<MinerId[]>
  • lookup names and IDs for registered miners

    Parameters

    • Default value lowerBound: string = ""

      lower bound of the first name

    • Default value limit: number = 1000

      max 1000

    Returns Observable<MinerId[]>

    list of found miner ids

Protected request

vote

  • Vote for miner.

    Parameters

    • credentials: Credentials

      account credentials

    • minerIds: ChainObject[]

      list of miner account ids

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Observable<TransactionConfirmation>

    a transaction confirmation

Generated using TypeDoc