dash-platform-sdk
    Preparing search index...

    Class VotingController

    Voting controller for performing masternode votes

    Index

    Methods

    • Creates a {StateTransitionWASM} from masternode Pro Tx Hash and voter identity

      Parameters

      • voteWASM: VoteWASM

        {VoteWASM} vote instance from .createMasternodeVote() method

      • proTxHash: string

        {string} pro tx hash of the masternode as hex

      • voterIdentity: IdentifierWASM

        {IdentifierWASM} voter identity identifier

      • identityNonce: bigint

        {BigInt} identity nonce

      Returns StateTransitionWASM

    • Creates a {VoteWASM} with all information about the vote, such as data contract id, choice, and target index

      Parameters

      • dataContractId: IdentifierLike

        {DataContractWASM}

      • documentTypeName: string

        {string}

      • indexName: string

        {string}

      • indexValues: string[]

        {string[]}

      • choice: ResourceVoteChoice

        {ResourceVoteChoice}

      Returns VoteWASM

    • Creates an {IdentifierWASM} from masternode pro tx hash and voting address (public key hash)

      Parameters

      • proTxHash: string

        {string} voter's masternode pro tx hash

      • publicKeyHash: string

        {string} voter address's public key hash

      Returns Promise<IdentifierWASM>