Create Account
Overview
This SDK method allows you to create a new Account Abstraction account for a particular owner address.
Method
xellar.accountAbstraction.auth.createAccount({
owner: string, // The owner's wallet address
});
Parameters
owner
(required): The wallet address that will own the Account Abstraction account.
Response
The response will include an object with the following properties:
id
(string): The unique identifier of the created account.createdAt
(string): The timestamp when the account was created.updatedAt
(string | null): The timestamp when the account was last updated, or null if never updated.ownerId
(string): The unique identifier of the owner.provider
(string): The provider of the account.clientId
(string): The client identifier.gasTanks
(GasTank[]): An array of gas tank objects.id
(string): The unique identifier of the gas tank.createdAt
(string): The timestamp when the gas tank was created.updatedAt
(string | null): The timestamp when the gas tank was last updated, or null if never updated.ownerId
(string): The unique identifier of the owner.balance
(string): The current balance of the gas tank.type
(string): The type of the gas tank.tokenName
(string): The name of the token used in the gas tank.decimals
(number): The number of decimals for the token.
accounts
(Account[]): An array of account objects.id
(string): The unique identifier of the account.createdAt
(string): The timestamp when the account was created.updatedAt
(string | null): The timestamp when the account was last updated, or null if never updated.ownerId
(string): The unique identifier of the owner.status
(string): The current status of the account.aaAddress
(string): The Account Abstraction address.chainId
(number): The chain ID where the account is deployed.network
(string): The network name.clientId
(string): The client identifier.version
(string): The version of the account.
Example Response
{
"status": 200,
"message": "account created successfully",
"data": {
"id": "6832c4eb131f3d7c2b60cecc",
"createdAt": "2025-05-25T07:21:15.981407516Z",
"updatedAt": null,
"ownerId": "0x29E8E2926ADf79763632C3C15AB0d6bC379C0E5A",
"provider": "wallet",
"clientId": "c71b0489-cffe-440d-ab17-e00d7fc41217",
"appId": "39380fb0-b853-4efa-8917-9964a8d48808",
"gasTanks": [
{
"id": "6832c4eb131f3d7c2b60cecd",
"createdAt": "2025-05-25T07:21:15.994312784Z",
"updatedAt": null,
"ownerId": "6832c4eb131f3d7c2b60cecc",
"balance": "0",
"type": "token",
"tokenName": "USDT",
"decimals": 18
}
],
"accounts": [
{
"id": "6832c4ec131f3d7c2b60cece",
"createdAt": "2025-05-25T07:21:16.01229306Z",
"updatedAt": null,
"ownerId": "6832c4eb131f3d7c2b60cecc",
"status": "not_deployed",
"aaAddress": "0x4fa1B47b1e93f7E927bc3aEa006f70E6c3C1F247",
"chainId": 1,
"network": "ethereum",
"clientId": "c71b0489-cffe-440d-ab17-e00d7fc41217",
"appId": "39380fb0-b853-4efa-8917-9964a8d48808",
"version": "0.1"
}
]
}
}
The created account will be in not_deployed
status initially. Accounts are
automatically created for all supported networks. Each account needs to be
activated separately after funding the gas tank.
The aaAddress
in the response is the future smart contract wallet address
that will be deployed during activation.
The owner address must be a valid Ethereum address. The account creation will fail if an invalid address is provided.
This method is idempotent - if an account already exists for the given owner address, the existing account details will be returned instead of creating a new one. This makes it safe to retry the request without creating duplicate accounts.