github.com/Finschia/finschia-sdk@v0.48.1/x/capability/spec/01_concepts.md (about) 1 <!-- 2 order: 1 3 --> 4 5 # Concepts 6 7 ## Capabilities 8 9 Capabilities are multi-owner. A scoped keeper can create a capability via `NewCapability` 10 which creates a new unique, unforgeable object-capability reference. The newly 11 created capability is automatically persisted; the calling module need not call 12 `ClaimCapability`. Calling `NewCapability` will create the capability with the 13 calling module and name as a tuple to be treated the capabilities first owner. 14 15 Capabilities can be claimed by other modules which add them as owners. `ClaimCapability` 16 allows a module to claim a capability key which it has received from another 17 module so that future `GetCapability` calls will succeed. `ClaimCapability` MUST 18 be called if a module which receives a capability wishes to access it by name in 19 the future. Again, capabilities are multi-owner, so if multiple modules have a 20 single Capability reference, they will all own it. If a module receives a capability 21 from another module but does not call `ClaimCapability`, it may use it in the executing 22 transaction but will not be able to access it afterwards. 23 24 `AuthenticateCapability` can be called by any module to check that a capability 25 does in fact correspond to a particular name (the name can be un-trusted user input) 26 with which the calling module previously associated it. 27 28 `GetCapability` allows a module to fetch a capability which it has previously 29 claimed by name. The module is not allowed to retrieve capabilities which it does 30 not own. 31 32 ## Stores 33 34 - MemStore