Skip to main content
PIN is weak — not recommended for production.A user-typed PIN is a short, low-entropy string. Anyone who shoulder-surfs the PIN, observes a phishing form, or compromises the browser at typing time can decrypt the wallet’s private key. PIN remains in the SDK only as a fallback recovery surface for users who lose access to their platform authenticator.Production embedded-wallet apps should default to a platform passkey (Touch ID, Face ID, Windows Hello, Android biometrics) via the @chipi-stack/chipi-passkey package. For SHHH V8.4 wallets, signerKind: "WEBAUTHN_P256" keeps the private key inside the platform authenticator — it never leaves the device, never reaches Chipi servers, and is never derived from a user-typed secret.Only prompt for a PIN as the encryption key when:
  • The user explicitly opted into a PIN-only flow (e.g. cold-storage / paper-backup recovery), or
  • The platform genuinely has no WebAuthn / biometric support available.
If you are migrating an existing PIN-based wallet to a passkey, look up useMigrateWalletToPasskey in your framework’s hook docs.

Usage

Parameters

  • encrypt_key (str): A user-defined code or password used to encrypt the wallet’s private key
  • external_user_id (str): Your application’s unique identifier for the user
  • user_id (str, optional): Internal user ID (optional)
  • wallet_type (WalletType, optional): Type of wallet to create (CHIPI or READY). Defaults to CHIPI
  • use_passkey (bool, optional): Whether to use passkey authentication. Defaults to False

Return Value

Returns a CreateWalletResponse (same shape as GetWalletResponse) — a flat object with:
  • public_key: Wallet’s public address
  • encrypted_private_key: AES encrypted private key
  • wallet_type: Type of wallet created
  • normalized_public_key: Normalized public key
  • chain: Blockchain network
  • is_deployed: Whether the wallet contract is deployed
  • id, external_user_id, organization_id, api_public_key, created_at, updated_at

Example Implementation

Async Version

For async applications, use acreate_wallet:

Wallet Types

The SDK supports two wallet types:

Security Considerations

Encryption Key SecurityThe encrypt_key is critical for wallet security:
  • Never store it in plaintext
  • Use a secure method to derive it (e.g., from user password with PBKDF2)
  • Consider using hardware security modules (HSM) for production
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

  • get_wallet - Retrieve existing wallet information
  • transfer - Send tokens from the created wallet