Skip to content

ProjectOpenSea/opensea-js

Repository files navigation

Version npm Test CI Coverage Status License Docs Discussions

OpenSea.js

This is the TypeScript SDK for OpenSea, the largest marketplace for NFTs.

It allows developers to access the official orderbook, filter it, create listings and offers, and complete trades programmatically.

Get started by requesting an API key and instantiating your own OpenSea SDK instance. Then you can create orders off-chain or fulfill orders on-chain, and listen to events in the process.

Happy seafaring! ⛵️

Documentation

Security Warning

⚠️ Do not use this SDK directly in client-side/frontend applications.

The OpenSea SDK requires an API key for initialization. If you embed your API key in frontend code (e.g., browser applications, mobile apps), it will be publicly exposed and could be extracted by anyone, leading to potential abuse and rate limit issues.

Recommended Architecture

For frontend applications that need to interact with OpenSea functionality:

  1. Create a backend API wrapper: Set up your own backend server that securely stores your OpenSea API key
  2. Call OpenSea SDK server-side: Use opensea-js on your backend to interact with OpenSea's APIs
  3. Return data to your frontend: Send the necessary data (like transaction parameters) back to your frontend
  4. Execute transactions in the browser: Have users sign transactions with their own wallets (e.g., MetaMask) in the browser

Changelog

The changelog for recent versions can be found at:

About

TypeScript SDK for the OpenSea marketplace

Resources

License

Stars

Watchers

Forks

Contributors 65

Languages