Method Signature
Description
Creates a new smart account for a user’s origin wallet.Smart accounts are deterministic - the same origin wallet always generates the same smart account address. It’s safe to call this method multiple times.
Parameters
User’s origin wallet address (EOA or smart wallet). Must be a valid Ethereum address starting with
0x followed by 40 hexadecimal characters.Example: "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"Return Value
Returns aPromise<SmartAccountInfo> with:
The smart account contract address. This is where users deposit funds.
Backend wallet address that manages the smart account via session keys.
The origin wallet address that owns the smart account.
Chain ID where the smart account exists.
Example
Output
Error Handling
Common Errors
| Error | Cause | Solution |
|---|---|---|
ValidationError: origin wallet address is required | Missing origin_wallet parameter | Provide a valid origin_wallet address |
ValidationError: origin wallet address must be a valid Ethereum address | Invalid address format | Ensure address starts with 0x and has 40 hex characters |
GizaAPIError: Unauthorized | Invalid API credentials | Check GIZA_API_KEY and GIZA_PARTNER_NAME |