> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spaceport.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Class: User

[resources/users](../modules/resources_users).UserClient

The UserClient manages user profiles within the Spaceport ecosystem.
A user account is typically associated with a wallet address and holds information
about the user's identity and activities on the platform. This client handles
user creation and retrieval.

## Table of contents

#### Methods

* [create](#create)
* [getByWalletAddress](#getbywalletaddress)
* [getCurrentUser](#getcurrentuser)

### constructor

• **new UserClient**(`client`): [`UserClient`](./user)

#### Parameters

| Name     | Type                               |
| :------- | :--------------------------------- |
| `client` | [`SpaceportSDK`](../spaceport-sdk) |

#### Returns

[`UserClient`](./user)

## Methods

### create

▸ **create**(`params`): `Promise`\<[`CreateUserResponse`](../types/create-user-response)>

Creates a new user or returns existing user information

#### Parameters

| Name     | Type                                            | Description                                                                  |
| :------- | :---------------------------------------------- | :--------------------------------------------------------------------------- |
| `params` | [`CreateUserInput`](../types/create-user-input) | User creation parameters (wallet address is automatically included from SDK) |

#### Returns

`Promise`\<[`CreateUserResponse`](../types/create-user-response)>

User creation response with user details

### getByWalletAddress

▸ **getByWalletAddress**(`walletAddress`): `Promise`\<[`User`](../types/user)>

Gets a user by their wallet address

#### Parameters

| Name            | Type     | Description                      |
| :-------------- | :------- | :------------------------------- |
| `walletAddress` | `string` | The wallet address to search for |

#### Returns

`Promise`\<[`User`](../types/user)>

User information if found

### getCurrentUser

▸ **getCurrentUser**(): `Promise`\<[`User`](../types/user)>

Gets the current user based on the wallet address used to initialize the SDK

#### Returns

`Promise`\<[`User`](../types/user)>

User information for the current wallet address
