voteProposal

创建一个未签名的交易,用于批准提议。

用法

visionWeb.transactionBuilder.voteProposal(
  proposalId,
  hasApproval,
  voterAddress,
  options
);

入参

参数描述类型默认值
proposalId提案 idnumber-
hasApproval提案是否已获得批准booleanfalse
voterAddress选民账户地址string默认账户地址
options可选参数,具体参数见下方object-

options 参数

参数描述类型默认值
permissionId设置多重签名时使用number-

返回值

object,创建的 transaction 对象。

示例

visionWeb.transactionBuilder.voteProposal(1);
> {
  visible: false,
  txID: '8aaf8d1f4c8eb5b78ed9f1a2011fc748d340390b5809352d2147df336e4e8a4d',
  raw_data: {
    contract: [ [Object] ],
    ref_block_bytes: 'e655',
    ref_block_hash: '3e009ddd61d288b4',
    expiration: 1608478041000,
    timestamp: 1608477981983
  },
  raw_data_hex: '0a02e65522083e009ddd61d288b440a8c78c86e82e5a76080f12700a30747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5570646174654173736574436f6e7472616374123c0a1541401a8da8a7fc86f0087f8c62e630d10df10a963b12037432741a1868747470733a2f2f76726f6e2e626b626f732e737061636520c0843d28642801709ffa8886e82e'
}