Implements PersonToken as a native contract following NeoGo patterns: Core Token Lifecycle (Phase 1): - register: Create new PersonToken with owner, personHash, isEntity, recoveryHash - getToken/getTokenByID: Retrieve token by owner address or sequential ID - exists/totalSupply: Check token existence and get total count - suspend/reinstate: Committee-controlled token status management Attribute Management (Phase 2): - setAttribute/getAttribute: Manage identity attributes with attestation - revokeAttribute/verifyAttribute: Attribute lifecycle management Passwordless Authentication (Phase 3): - createChallenge/fulfillChallenge/verifyAuth: Challenge-response auth flow Key Recovery (Phase 4): - initiateRecovery/approveRecovery/executeRecovery/cancelRecovery - Multi-approval recovery with configurable delay Cross-Contract Integration (Phase 5): - validateCaller: Verify calling contract has valid PersonToken - requireRole: Check caller has specific role assignment - requireCoreRole: Check caller has core role (User/Verified/Committee/Attestor/Recovery) - requirePermission: Check caller has resource/action/scope permission Files added: - pkg/core/native/person_token.go: Main contract implementation - pkg/core/state/person_token.go: State structs with serialization - pkg/core/native/native_test/person_token_test.go: Test coverage 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| gen.go | ||
| ids.go | ||