@opensea/server-auth

0.0.1-rc.6 • Public • Published

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)

Readme

Keywords

none

Package Sidebar

Install

npm i @opensea/server-auth

Weekly Downloads

44

Version

0.0.1-rc.6

License

ISC

Unpacked Size

190 kB

Total Files

51

Last publish

Collaborators

  • royliu2
  • janclarin
  • jallum
  • coryhardman-opensea
  • ralxz
  • sunwrobert
  • meemaw