Class MiningModule

Hierarchy

Index

Constructors

constructor

Properties

Static CHAIN_PROXY_TO_SELF

CHAIN_PROXY_TO_SELF: string = ""

Methods

createMiner

  • createMiner(minerAccountId: string, URL: string, signingPublicKey: string, privateKey: string, broadcast?: boolean): Promise<Operation>

getMiner

  • getMiner(minerId: string): Promise<Miner>

getVestingBalances

listMiners

setDesiredMinerCount

  • setDesiredMinerCount(accountId: string, desiredNumOfMiners: number, privateKey: string, broadcast?: boolean): Promise<Operation>

setVotingProxy

  • setVotingProxy(accountId: string, votingAccountId: string, privateKey: string, broadcast?: boolean): Promise<Operation>

unvoteMiner

  • unvoteMiner(miner: string, account: string, privateKeyWif: string, broadcast?: boolean): Promise<Operation>
  • Remove your vote from selected miner.

    Parameters

    • miner: string

      Miner to un-vote, in format '1.4.X'. Example '1.4.5'.

    • account: string

      Account id to un-vote miner from, in format '1.2.X'. Example '1.2.345'.

    • privateKeyWif: string

      Private key to sign thr transaction.

    • Default value broadcast: boolean = true

      Transaction is broadcasted if set to 'true'. Default value is 'true'.

    Returns Promise<Operation>

    Value confirming successful transaction broadcasting.

unvoteMiners

  • unvoteMiners(miners: string[], account: string, privateKeyWif: string, broadcast?: boolean): Promise<Operation>
  • Remove your votes from multiple miners.

    Parameters

    • miners: string[]

      List of miners to un-vote, in format '1.4.X'. Example ['1.4.5', '1.4.6'].

    • account: string

      Account id to un-vote miner from, in format '1.2.X'. Example '1.2.345'.

    • privateKeyWif: string

      Private key to sign thr transaction.

    • Default value broadcast: boolean = true

      Transaction is broadcasted if set to 'true'. Default value is 'true'.

    Returns Promise<Operation>

    Value confirming successful transaction broadcasting.

updateMiner

  • updateMiner(minerId: string, minerAccountId: string, updateData: MinerUpdateData, privateKey: string, broadcast?: boolean): Promise<Operation>

voteForMiner

  • voteForMiner(miner: string, account: string, privateKeyWif: string, broadcast?: boolean): Promise<Operation>

voteForMiners

  • voteForMiners(miners: string[], account: string, privateKeyWif: string, broadcast?: boolean): Promise<Operation>
  • Add votes to multiple miners. This method is also called on voteForMiner.

    Parameters

    • miners: string[]

      List of miners to vote for, in format '1.4.X'. Example ['1.4.5', '1.4.6'].

    • account: string

      Account id to vote miner for, in format '1.2.X'. Example '1.2.345'.

    • privateKeyWif: string

      Private key to sign thr transaction.

    • Default value broadcast: boolean = true

      Transaction is broadcasted if set to 'true'. Default value is 'true'.

    Returns Promise<Operation>

    Value confirming successful transaction broadcasting.

voteUnvoteMiners

  • voteUnvoteMiners(voteMiners: string[], unvoteMiners: string[], accountId: string, privateKey: string, broadcast?: boolean): Promise<Operation>
  • Bulk operation to vote and unvote miners in one operation. Use to avoid paying fee for multiple vote operation.

    Parameters

    • voteMiners: string[]

      List of miners to vote for, in format '1.4.X'. Example ['1.4.5', '1.4.6'].

    • unvoteMiners: string[]

      List of miners to un-vote, in format '1.4.X'. Example ['1.4.5', '1.4.6'].

    • accountId: string

      Id of account vote changes will be made to, in format '1.2.X'. Example '1.2.345'.

    • privateKey: string

      Private key to sign the transaction.

    • Default value broadcast: boolean = true

      Transaction is broadcasted if set to 'true'. Default value is 'true'.

    Returns Promise<Operation>

    Value confirming successful transaction broadcasting.

withdrawVesting

  • withdrawVesting(vestinBalanceId: string, ownerId: string, amount: number, assetId: string, privateKey: string, broadcast?: boolean): Promise<Operation>

Powered by DECENT