@opensea/server-auth
v0.0.1-rc.6
Published
SDK for managing server side authentication for OpenSea wallet
Downloads
112
Keywords
Readme
OpenSea Wallet Server Auth
Get Started
Installation
Install the package.
npm install @opensea/server-auth
Initializing the SDK
import { OpenSeaWalletSdk } from "@opensea/server-auth"
// OpenSea API key string
const apiKey = process.env.OPENSEA_API_KEY
const walletSdk = new OpenSeaWalletSdk({
apiKey,
})
Verifying Auth Token
const tokenVerifier = await walletSdk.initTokenVerifier()
const userId = await tokenVerifier.verify(accessToken)
Get User Data
type User = {
// Wallet address
address: string
}
const user = await walletSdk.getUser(userId)