Skip to main content

TReactWaas

@coinbase/waas-sdk-web-react • API


Type alias: TReactWaas

TReactWaas: Object

A wrapper around the Waas instance, enabling reactivity around the management of the wallet.

Type declaration​

login()​

login: (options?) => Promise<TReactUser>

Login the user, using the provided options.

For developer-delegated auth, you should call this function with the provideAuthToken option.

Params​

options.provideAuthToken A lambda that Waas will invoke to retrieve a new auth token.

Parameters​

• options?: TReactLoginOptions

The options to use for logging in the user.

Returns​

Promise<TReactUser>

logout()​

logout: () => Promise<void>

Removes the current active wallet and logs out the user.

NOTE: This will cause data-loss, if the user doesn't have their backup string stored somewhere i.e for use with restoreFromBackup()

In doing so, this will update the wallet as returned from

const {wallet} = useWalletContext() to be undefined.

Returns​

Promise<void>

Was this helpful?