IdentityStatus has five variants, but the library only ever sets two of them.
- The variants (
packages/rs-platform-wallet/src/wallet/identity/types/key_storage.rs) are Unknown, PendingCreation, Active, FailedCreation and NotFound. The type is public and the FFI persists it as a byte 0-4 (rs-platform-wallet-ffi/src/identity_persistence.rs, persistence.rs).
- The library sets
Active after loading or discovering an identity (network/loading.rs, network/discovery.rs) and otherwise leaves the default Unknown.
- Registration (
network/registration.rs) sets no status, so PendingCreation and FailedCreation never appear. Nothing sets NotFound when a previously active identity stops resolving.
The intended lifecycle (from the committed PLAN.md, removed in #5060, which marked this done) is Unknown -> PendingCreation -> Active, PendingCreation -> FailedCreation -> Active after a retry, and Active -> NotFound -> Active.
To do: either wire the missing transitions (registration submit, registration failure, identity not found on refresh) or remove the unused variants at the next API break. The FFI byte mapping must stay stable either way. #5060 documents the current behavior on the enum.
IdentityStatushas five variants, but the library only ever sets two of them.packages/rs-platform-wallet/src/wallet/identity/types/key_storage.rs) areUnknown,PendingCreation,Active,FailedCreationandNotFound. The type is public and the FFI persists it as a byte 0-4 (rs-platform-wallet-ffi/src/identity_persistence.rs,persistence.rs).Activeafter loading or discovering an identity (network/loading.rs,network/discovery.rs) and otherwise leaves the defaultUnknown.network/registration.rs) sets no status, soPendingCreationandFailedCreationnever appear. Nothing setsNotFoundwhen a previously active identity stops resolving.The intended lifecycle (from the committed
PLAN.md, removed in #5060, which marked this done) isUnknown->PendingCreation->Active,PendingCreation->FailedCreation->Activeafter a retry, andActive->NotFound->Active.To do: either wire the missing transitions (registration submit, registration failure, identity not found on refresh) or remove the unused variants at the next API break. The FFI byte mapping must stay stable either way. #5060 documents the current behavior on the enum.