vote

Create an unsigned transaction to vote for witnesses.

Usage

visionWeb.transactionBuilder.vote(votes, voterAddress);

Parameters

ParameterDescriptionTypeDefault
votesDictionary of FV address : vote count key-value pair.object-
voterAddressVoter address.stringDefault account address
optionsDescriptions are below.object-

options parameters

ParameterDescriptionTypeDefault
permissionIdPermission id for multi-signature use.number-

Returns

Object.

Example

visionWeb.transactionBuilder.vote({"VEoh3WDXviqcPZ1qVNCQpqLHYzigrQWTPL": 1});
> {
  visible: false,
  txID: '82fe906941e6b22f046eb36e883546aa053591d5e9319d02694177d86a13a4ed',
  raw_data: {
    contract: [ [Object] ],
    ref_block_bytes: 'e5c7',
    ref_block_hash: '5679a1a910c34781',
    expiration: 1608477603000,
    timestamp: 1608477544388
  },
  raw_data_hex: '0a02e5c722085679a1a910c3478140b8e9f185e82e5a76080f12700a30747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5570646174654173736574436f6e7472616374123c0a1541401a8da8a7fc86f0087f8c62e630d10df10a963b12037432741a1868747470733a2f2f76726f6e2e626b626f732e737061636520c0843d2864280170c49fee85e82e'
}