[−][src]Function casperlabs_contract::ext_ffi::remove_associated_key
pub unsafe extern "C" fn remove_associated_key(
account_hash_ptr: *const u8,
account_hash_size: usize
) -> i32
This function attempts to remove the given public key from the associated
keys of the current account. Presently only 32-byte keys are supported; it
is up to the caller to ensure that the 32-bytes starting from offset
public_key
represent the key they wish to remove. The result returned is
a status code for adding the key where 0 represents success, 1 means the
key was not associated to begin with, 2 means means permission denied
(this could be because the function was called outside of session code or
because the key management threshold was not met by the keys authorizing
the deploy), and 3 means this key cannot be removed because otherwise it
would be impossible to meet either the deploy or key management
thresholds.
Returns status code for adding the key, where 0 represents success and non-zero represents failure.
Arguments
public_key
- pointer to the bytes in wasm memory representing the public key to update, presently only 32-byte public keys are supported.weight
- the weight to assign to this public key