Motor WASM Plugin: UCAN Source
The Motor WASM plugin is a WebAssembly-based plugin that provides Multi-Party Computation (MPC) powered UCAN (User-Controlled Authorization Networks) token generation and management.Overview
The Motor plugin enables secure, decentralized token creation and management through an MPC-based architecture. It provides the following key capabilities:- Secure token generation
- MPC-based signing
- Flexible UCAN token creation
- Integrated enclave management
Environment Configuration
To use the Motor plugin, you need to set the following PDK environment variables:UCAN Token Creation
Creating Origin Tokens
Creating Attenuated Tokens
Signing and Verification
The Motor plugin provides methods for data signing and verification:Error Handling
The plugin returns structured error responses with detailed error messages:Best Practices
- Always validate the enclave before generating tokens
- Use the shortest possible token lifetime
- Implement granular attenuations
- Validate tokens before using them
Security Considerations
- MPC ensures no single party controls the entire signing process
- Tokens are cryptographically signed using distributed key shares
- Supports multiple key types: Ed25519, Secp256k1, RSA