Class: User
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
constructor
• new UserClient(client
): UserClient
Parameters
Name | Type |
---|---|
client | SpaceportSDK |
Returns
Methods
create
▸ create(params
): Promise
<CreateUserResponse
>
Creates a new user or returns existing user information
Parameters
Name | Type | Description |
---|---|---|
params | CreateUserInput | User creation parameters (wallet address is automatically included from SDK) |
Returns
Promise
<CreateUserResponse
>
User creation response with user details
getByWalletAddress
▸ getByWalletAddress(walletAddress
): Promise
<User
>
Gets a user by their wallet address
Parameters
Name | Type | Description |
---|---|---|
walletAddress | string | The wallet address to search for |
Returns
Promise
<User
>
User information if found
getCurrentUser
▸ getCurrentUser(): Promise
<User
>
Gets the current user based on the wallet address used to initialize the SDK
Returns
Promise
<User
>
User information for the current wallet address