Capabilities and Approvals
Ika uses a capability-based authorization system to control access to dWallet operations. Understanding these capabilities is essential for building secure Move contracts.
Overview
Capabilities are objects that grant specific permissions:
| Capability | Purpose | Created By |
|---|---|---|
DWalletCap | Authorize signing for a dWallet | DKG protocol |
ImportedKeyDWalletCap | Authorize signing for imported key dWallet | Import verification |
UnverifiedPresignCap | Reference to a presign (needs verification) | Presign request |
VerifiedPresignCap | Verified presign ready for signing | Presign verification |
UnverifiedPartialUserSignatureCap | Partial signature (needs verification) | Future sign request |
VerifiedPartialUserSignatureCap | Verified partial signature | Partial signature verification |
MessageApproval | Authorization to sign a specific message | approve_message() |
ImportedKeyMessageApproval | Message approval for imported keys | approve_imported_key_message() |
DWalletCap
The DWalletCap is the primary authorization capability for a dWallet. It's created during DKG and must be stored securely.
Storage Pattern
Usage
Key Properties
Security
The DWalletCap controls who can sign with your dWallet. Never expose it outside your contract
without proper access controls.
ImportedKeyDWalletCap
Similar to DWalletCap but for dWallets created by importing existing private keys.
Presign Capabilities
Presigns go through a verification lifecycle:
Presign Lifecycle
Storing Unverified Presigns
Verifying Before Use
Checking Validity
Partial User Signature Capabilities
For two-phase (future) signing:
Two-Phase Process
Storage Pattern for Governance
Completing the Signature
Message Approvals
Message approvals are created just before signing and authorize signing a specific message.
Creating Approvals
Matching with Partial Signatures
For future signing, you can verify that a partial signature matches a message approval:
Capability Lifecycle Summary
Capability Lifecycle Summary
Next Steps
- Learn about Session Management for unique operation identifiers
- Understand Payment Handling for managing fees