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

NameType
clientSpaceportSDK

Returns

UserClient

Methods

create

create(params): Promise<CreateUserResponse>

Creates a new user or returns existing user information

Parameters

NameTypeDescription
paramsCreateUserInputUser 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

NameTypeDescription
walletAddressstringThe 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