Table of contents
Methods
constructor
• new UserClient(client): UserClient
Parameters
| Name | Type |
|---|---|
client | SpaceportSDK |
Returns
UserClient
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
