Install SDK
Initialize Client
Setup the client with your Project ID. You can find your Project ID in the WalletKit Dashboard.At this point, the client is unauthenticated. To authenticate your client, check out the Authentication section.
The Store
You only need to set the
store
object if you are making client-side calls. If you are only making server-side calls, you can skip this section and use the API key to authenticate your client.Local Storage
The following example shows how to use the browser’s local storage to store the authentication token:Cookies
The following example shows how to use cookies to store the authentication token. It uses thejs-cookie
library to set, get and delete cookies.
Note that the
set
and delete
methods in the KVStore
interface are optional. This is useful if you need to read an existing authentication token to make calls, but you don’t have the ability to modify cookies.