Convert a public key into an address using the last 20 bytes of the hash ```rust use utils::crypto::{keypair, public_key_address}; let (private_key, public_key) = keypair(); let address = public_key_address(&public_key); ```
(item: &[u8])
| 94 | /// let address = public_key_address(&public_key); |
| 95 | /// ``` |
| 96 | pub fn to_address(item: &[u8]) -> H160 { |
| 97 | let hash = hash(&item[1..]); |
| 98 | Address::from_slice(&hash[12..]) |
| 99 | } |
| 100 | |
| 101 | /// Convert a public key into an address using the last 20 bytes of the hash |
| 102 | /// |
no test coverage detected