Ownership Model
Capability Hierarchy
GovernorCap (deployer — top-level authority)
└── AdminCap (game server — creates objects, manages config)
└── OwnerCap<T> (player — mutates a specific object)public struct OwnerCap<phantom T> has key {
id: UID,
authorized_object_id: ID,
}Character as a Keychain
User Wallet
└── Character (shared object, mapped to user address)
├── OwnerCap<NetworkNode>
├── OwnerCap<Gate>
├── OwnerCap<StorageUnit>
└── ...Borrow-Use-Return Pattern
TypeScript Example
Benefits
Last updated

