casper_rust_wasm_sdk::helpers

Function get_base64_key_from_account_hash

source
pub fn get_base64_key_from_account_hash(
    formatted_account_hash: &str,
) -> Result<String, Box<SdkError>>
Expand description

Convert a formatted account hash to a base64-encoded string (cep-18 key encoding).

§Arguments

  • formatted_account_hash - A hex-formatted string representing the account hash.

Example: “account-hash-b485c074cef7ccaccd0302949d2043ab7133abdb14cfa87e8392945c0bd80a5f”

§Returns

Returns a Result with the base64-encoded string on success, or a FromStrError on failure. Example: “ALSFwHTO98yszQMClJ0gQ6txM6vbFM+ofoOSlFwL2Apf”