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 (same shape as GetWalletResponse) — a flat object with:
public_key: Wallet’s public addressencrypted_private_key: AES encrypted private keywallet_type: Type of wallet creatednormalized_public_key: Normalized public keychain: Blockchain networkis_deployed: Whether the wallet contract is deployedid,external_user_id,organization_id,api_public_key,created_at,updated_at
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
