# wallets.create

> Documentation index: [llms.txt](https://namera.ai/llms.txt).

Source: https://namera.ai/docs/sdk/reference/accounts/create-account

Create a 1Claw-managed or passkey-owned smart account.

`namera.wallets.create()` create a 1Claw-managed or passkey-owned smart account.



## Usage [#usage]

Install `@namera-ai/sdk` and set `NAMERA_API_KEY` on your backend. IDs and responses below are illustrative fixtures; replace IDs with your own resources.

<Tabs items={["index.ts", "client.ts"]}>
<Tab value="index.ts">

```ts title="index.ts"
import { namera } from "./client";
const result = await namera.wallets.create({
  namespace: "eip155",
  metadata: { version: 1, name: "Provisioned account" },
  owner: { type: "namera-managed", provider: "1claw" },
});
if (!result.success) throw new Error(result.error.message);

console.log(result.data);
```

</Tab>
<Tab value="client.ts">

```ts title="client.ts"
import { NameraClient } from "@namera-ai/sdk";

export const namera = new NameraClient({
  apiKey: process.env.NAMERA_API_KEY!,
});
```

</Tab>
</Tabs>

## Returns [#returns]

API methods return a `Promise<NameraResult<T, E>>`. When `success` is `true`,
`data` contains the value described below and `error` is `null`. On failure,
`data` is `null` and `error` describes the failure.

The JSON example shows the complete successful `data`, with illustrative values.
Date-time values use ISO strings in JSON; bigint values use decimal strings.
See [Handling Results and Errors](https://namera.ai/docs/sdk/handling-results-and-errors) for the error shape.

Returns the complete account, including its ID, address, public owner descriptor, reconstruction data, and timestamps.

<div className="docs-response">

```json
{
  "id": "0199dfe1-0000-7000-8000-000000000001",
  "organizationId": "0199dfe1-0000-7000-8000-000000000006",
  "metadata": {
    "version": 1,
    "name": "Provisioned account"
  },
  "status": "active",
  "namespace": "eip155",
  "address": "0x3333333333333333333333333333333333333333",
  "owner": {
    "signingKeyId": "0199dfe1-0000-7000-8000-000000000008",
    "custody": "namera-managed",
    "provider": "1claw",
    "algorithm": "secp256k1"
  },
  "createdAt": "2026-10-15T02:39:05.250Z",
  "updatedAt": "2026-10-15T02:39:05.250Z",
  "implementation": "alchemy-modular-v2",
  "data": {
    "version": 1,
    "modularAccountVersion": "2.0.0",
    "validatorType": "ecdsa_secp256k1",
    "entryPointVersion": "0.7",
    "accountMode": "factory",
    "factoryVersion": "2.0.0",
    "implementationVersion": "v1.0.0",
    "ownerAddress": "0x52e7f17258368d7f9Ebd7bDf8d6869Bc4759aBA1",
    "salt": "0"
  }
}
```

</div>

## Parameters [#parameters]

### namespace [#namespace]

Type: `"eip155"`. Required. The implemented chain namespace.

```ts title="index.ts"
import { namera } from "./client";
const result = await namera.wallets.create({
  namespace: "eip155", // [!code focus]
  metadata: { version: 1, name: "Provisioned account" },
  owner: { type: "namera-managed", provider: "1claw" },
});
if (!result.success) throw new Error(result.error.message);

console.log(result.data);
```

### metadata [#metadata]

Type: `object`. Required. Account display metadata. `version` is `1`; `name` identifies the account in the dashboard. Optional `description` and `logo` follow the account metadata schema.

```ts title="index.ts"
import { namera } from "./client";
const result = await namera.wallets.create({
  namespace: "eip155",
  metadata: { version: 1, name: "Provisioned account" }, // [!code focus]
  owner: { type: "namera-managed", provider: "1claw" },
});
if (!result.success) throw new Error(result.error.message);

console.log(result.data);
```

### owner [#owner]

Type: `object`. Required. Select the account owner. Managed owners use `{ type: "namera-managed", provider: "1claw" }`. Passkey owners use `{ type: "passkey", verificationId, response }` from a registration ceremony initiated by this credential. See the [account creation guide](https://namera.ai/docs/sdk/guides/accounts/create-accounts).

```ts title="index.ts"
import { namera } from "./client";
const result = await namera.wallets.create({
  namespace: "eip155",
  metadata: { version: 1, name: "Provisioned account" },
  owner: { type: "namera-managed", provider: "1claw" }, // [!code focus]
});
if (!result.success) throw new Error(result.error.message);

console.log(result.data);
```

For a passkey owner, your authenticated backend calls this function with its stored verification ID and the browser’s registration response:

```ts title="index.ts"
import { namera } from "./client";
import type { CreateWalletRequest } from "@namera-ai/sdk";

export async function createPasskeyAccount(
  verificationId: string,
  response: Extract<CreateWalletRequest["owner"], { type: "passkey" }>["response"],
) {
  const result = await namera.wallets.create({
    namespace: "eip155",
    metadata: { version: 1, name: "Customer account" },
    owner: { type: "passkey", verificationId, response }, // [!code focus]
  });
  if (!result.success) throw new Error(result.error.message);
  console.log(result.data);
}
```

#### owner.verificationId [#ownerverificationid]

Type: `string`. Required for passkey ownership. The one-time registration ID returned by `wallets.createPasskeyRegistrationOptions()`. Keep it bound to your authenticated application user on your backend.

#### owner.response [#ownerresponse]

Type: `PasskeyRegistrationResponse`. Required for passkey ownership. The browser’s complete WebAuthn registration response. Namera verifies the challenge, origin, RP ID, expiry, and initiating actor.

## Behavior and errors [#behavior-and-errors]

The API key needs `wallet:create`. Accounts belong to the credential’s workspace. API keys do not gain account owner signing authority from creation alone. Managed creation retries transient failures with one SDK-generated idempotency key; a new method call starts a new request. Passkey creation is not automatically retried because registration is single-use. Creation does not deploy the smart account or install sessions. Billing limits and provider availability still apply. `MANAGEMENT_PERMISSION_DENIED` indicates authority was removed before admission. A provider result that requires recovery must not be blindly retried as a new request.
