Does anyone know why I’m getting
type error [M0072], field toArray does not exist in type Blob
?
The docs say it does exist:
public shared (msg) func create_user() : async User {
// Get caller principal
let callerId = msg.caller;
let principal_blob : Blob = callerId.toBlob();
let principal_array : [Nat8] = principal_blob.toArray();
...
and why is it treating it as a field instead of a function?
Alternatively is there a better to get the principal’s array from inside an authenticated call to a function?