tutus-chain/pkg/core/native
Tutus Development 99ba041a85 Add PersonToken native contract for soul-bound identity tokens
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>
2025-12-19 19:04:38 +00:00
..
native_test Add PersonToken native contract for soul-bound identity tokens 2025-12-19 19:04:38 +00:00
nativehashes Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
nativeids Add PersonToken native contract for soul-bound identity tokens 2025-12-19 19:04:38 +00:00
nativenames Add PersonToken native contract for soul-bound identity tokens 2025-12-19 19:04:38 +00:00
nativeprices Initial Tutus chain fork from NeoGo 2025-12-19 14:23:04 +00:00
noderoles Initial Tutus chain fork from NeoGo 2025-12-19 14:23:04 +00:00
compatibility_test.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
contract.go Add PersonToken native contract for soul-bound identity tokens 2025-12-19 19:04:38 +00:00
contract_test.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
crypto.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
crypto_blspoints.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
crypto_test.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
designate.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
doc.go Initial Tutus chain fork from NeoGo 2025-12-19 14:23:04 +00:00
interop.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
invocation_test.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
ledger.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
management.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
management_neotest_test.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
management_test.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
native_gas.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
native_neo.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
native_neo_candidate.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
native_neo_test.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
native_nep17.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
nativenames_test.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
neo_types.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
notary.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
oracle.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
oracle_types.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
oracle_types_test.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
person_token.go Add PersonToken native contract for soul-bound identity tokens 2025-12-19 19:04:38 +00:00
policy.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
policy_test.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
std.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
std_test.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
treasury.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
util.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00