bynk.actor.identity_not_sealed
Error An actor identity type is not a context-ownable (sealed) value type.
An actor's identity is a value only its context can mint, from a verified token or caller, so its type has to be one that context owns. A built-in such as Int, or a type from another context, could be built by anyone, so the identity would prove nothing. Declare the identity as a type in this context, such as type PrincipalId = Int where NonNegative, and name that.
Example
actor Principal { auth = Internal, identity = Int } // ✗ `Int` is not owned by this context
type PrincipalId = Int where NonNegativeactor Principal { auth = Internal, identity = PrincipalId } // ✓ minted only hereIn the Book
See also
- Every code in its category, Actors, on the diagnostic index.
bynk explain bynk.actor.identity_not_sealedshows the same from the installed toolchain, without a network.