pub fn decode_consumer_info(data: &[u8]) -> Result<ConsumerInfo, IdentityError>Expand description
Decode a SCALE-encoded ConsumerInfo from a state_getStorage response.
SCALE layout (in field order):
identifier_key: 65 bytes (fixed array, no length prefix)full_username:Option<BoundedVec<u8, 32>>—0x00= None,0x01 + compact_len + bytes= Somelite_username:BoundedVec<u8, 32>— compact_len + bytescredibility: enum —0x00= Lite,0x01 + alias(32B) + last_update(u64 LE)= Person
Fields after credibility (e.g. stmt_store_slots) are intentionally
skipped — clients do not use them.
Returns Err for empty input, truncated data, invalid UTF-8, or unknown
enum tags.