#[no_mangle]
pub unsafe extern "C" fn iohk_jormungandr_vote_proposal_new_private(
    vote_plan_id: *const u8,
    index: u8,
    num_choices: u8,
    vote_encryption_key: *const c_char,
    proposal_out: *mut ProposalPtr
) -> ErrorPtr
Expand description

build the proposal object

  • vote_encryption_key: a null terminated string (c-string) with the bech32 representation of the encryption vote key

Errors

This function may fail if:

  • proposal_out is null.
  • num_choices is out of the allowed range.

Safety

This function dereference raw pointers. Even though the function checks if the pointers are null. Mind not to put random values in or you may see unexpected behaviors.