Create an unsigned transaction to approve a proposal.
Usage
visionWeb.transactionBuilder.voteProposal(
proposalId,
hasApproval,
voterAddress,
options
);
Parameters
Parameter | Description | Type | Default |
---|---|---|---|
proposalId | Proposal id. | number | - |
hasApproval | Approving the proposal or not. Can only be "true" or "false. | boolean | false |
voterAddress | The address that makes the approve action. | string | Default account address |
options | Descriptions are below. | object | - |
options parameters
Parameter | Description | Type | Default |
---|---|---|---|
permissionId | Permission id for multi-signature use. | number | - |
Returns
Object.
Example
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'
}