Usage
Parameters
encrypt_key(str): A user-defined code or password used to encrypt the wallet’s private keyexternal_user_id(str): Your application’s unique identifier for the useruser_id(str, optional): Internal user ID (optional)wallet_type(WalletType, optional): Type of wallet to create (CHIPIorREADY). Defaults toCHIPIuse_passkey(bool, optional): Whether to use passkey authentication. Defaults toFalse
Return Value
Returns aCreateWalletResponse object containing:
wallet:WalletDataobject with:public_key: Wallet’s public addressencrypted_private_key: AES encrypted private keywallet_type: Type of wallet creatednormalized_public_key: Normalized public key
tx_hash: Transaction hash of the wallet deploymentwallet_public_key: Public key of the created wallet (same aswallet.public_key)
Example Implementation
Async Version
For async applications, useacreate_wallet:
Wallet Types
The SDK supports two wallet types:- CHIPI (Recommended)
- READY
OpenZeppelin account with SNIP-9 session keys support
- Full session key support for delegated transactions
- Compatible with Chipi session management
- Recommended for most applications
Security Considerations
External User IDThe
external_user_id should be:- Unique per user in your system
- Stable (doesn’t change over time)
- Not personally identifiable information (use a UUID instead of email)
Error Handling
Complete Example with Database Integration
Related Methods
- get_wallet - Retrieve existing wallet information
- transfer - Send tokens from the created wallet
