Skip to content

Commit bd57a61

Browse files
committed
Release v9.0.0
1 parent ed4d6c3 commit bd57a61

13 files changed

Lines changed: 77 additions & 34 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,16 @@ jobs:
1616
with:
1717
node-version-file: .nvmrc
1818
registry-url: https://registry.npmjs.org/
19+
# Publish @opensea/sdk
1920
- run: npm install
2021
- run: npm run build
2122
- run: npm test
2223
env:
2324
OPENSEA_API_KEY: ${{ secrets.OPENSEA_API_KEY }}
2425
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
2526
- run: npm publish --provenance --access public
27+
28+
# Publish opensea-js stub (skip if version already exists)
29+
- run: npm publish --provenance --access public
30+
working-directory: packages/opensea-js-stub
31+
continue-on-error: true

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
# opensea-js
1+
# @opensea/sdk
2+
3+
## 9.0.0
4+
5+
### Major Changes
6+
7+
- Rename package from `opensea-js` to `@opensea/sdk`
8+
9+
The API is unchanged — only the package name. The old `opensea-js` package will be deprecated with a stub that directs users to install `@opensea/sdk` instead.
210

311
## 8.1.0
412

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Contributing to opensea-js
1+
# Contributing to @opensea/sdk
22

33
Thanks for your interest in contributing! We're glad you're here.
44

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@
1010
[![Docs][docs-badge]][docs-link]
1111
[![Discussions][discussions-badge]][discussions-link]
1212

13-
# OpenSea.js <!-- omit in toc -->
13+
# @opensea/sdk <!-- omit in toc -->
14+
15+
> **Note:** This package was previously published as `opensea-js`. The API is unchanged.
1416
1517
This is the TypeScript SDK for [OpenSea](https://opensea.io), the largest marketplace for NFTs.
1618

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

1921
Get started by [requesting an API key](https://docs.opensea.io/reference/api-keys) and instantiating your own OpenSea SDK instance. Then you can create orders off-chain or fulfill orders onchain, and listen to events in the process.
2022

21-
Happy seafaring! ⛵️
23+
Happy seafaring!
2224

2325
## Documentation
2426

@@ -32,7 +34,7 @@ Happy seafaring! ⛵️
3234

3335
### Security Warning
3436

35-
**⚠️ Do not use this SDK directly in client-side/frontend applications.**
37+
**Do not use this SDK directly in client-side/frontend applications.**
3638

3739
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.
3840

@@ -41,28 +43,28 @@ The OpenSea SDK requires an API key for initialization. If you embed your API ke
4143
For frontend applications that need to interact with OpenSea functionality:
4244

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

4850
## Changelog
4951

5052
The changelog for recent versions can be found at:
5153

52-
- opensea-js: https://github.com/ProjectOpenSea/opensea-js/releases
54+
- @opensea/sdk: https://github.com/ProjectOpenSea/opensea-js/releases
5355
- OpenSea API: https://docs.opensea.io/changelog
5456

5557
[version-badge]: https://img.shields.io/github/package-json/v/ProjectOpenSea/opensea-js
5658
[version-link]: https://github.com/ProjectOpenSea/opensea-js/releases
57-
[npm-badge]: https://img.shields.io/npm/v/opensea-js?color=red
58-
[npm-link]: https://www.npmjs.com/package/opensea-js
59+
[npm-badge]: https://img.shields.io/npm/v/@opensea/sdk?color=red
60+
[npm-link]: https://www.npmjs.com/package/@opensea/sdk
5961
[ci-badge]: https://github.com/ProjectOpenSea/opensea-js/actions/workflows/code-quality.yml/badge.svg
6062
[ci-link]: https://github.com/ProjectOpenSea/opensea-js/actions/workflows/code-quality.yml
6163
[coverage-badge]: https://coveralls.io/repos/github/ProjectOpenSea/opensea-js/badge.svg?branch=main
6264
[coverage-link]: https://coveralls.io/github/ProjectOpenSea/opensea-js?branch=main
6365
[license-badge]: https://img.shields.io/github/license/ProjectOpenSea/opensea-js
6466
[license-link]: https://github.com/ProjectOpenSea/opensea-js/blob/main/LICENSE
65-
[docs-badge]: https://img.shields.io/badge/OpenSea.js-documentation-informational
67+
[docs-badge]: https://img.shields.io/badge/@opensea/sdk-documentation-informational
6668
[docs-link]: https://github.com/ProjectOpenSea/opensea-js#documentation
67-
[discussions-badge]: https://img.shields.io/badge/OpenSea.js-discussions-blueviolet
69+
[discussions-badge]: https://img.shields.io/badge/@opensea/sdk-discussions-blueviolet
6870
[discussions-link]: https://github.com/ProjectOpenSea/opensea-js/discussions

developerDocs/advanced-use-cases.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ The SDK provides efficient methods for creating multiple listings or offers with
156156
Use `createBulkListings()` to create multiple listings with a single signature:
157157

158158
```typescript
159-
import { getUnixTimestampInSeconds, TimeInSeconds } from "opensea-js";
159+
import { getUnixTimestampInSeconds, TimeInSeconds } from "@opensea/sdk";
160160

161161
const listings = await openseaSDK.createBulkListings({
162162
listings: [
@@ -192,7 +192,7 @@ const listings = await openseaSDK.createBulkListings({
192192
Use `createBulkOffers()` to create multiple offers with a single signature:
193193

194194
```typescript
195-
import { getUnixTimestampInSeconds, TimeInSeconds } from "opensea-js";
195+
import { getUnixTimestampInSeconds, TimeInSeconds } from "@opensea/sdk";
196196

197197
const offers = await openseaSDK.createBulkOffers({
198198
offers: [
@@ -283,7 +283,7 @@ This applies to all API operations, not just bulk orders. If a request fails aft
283283
**Example with All Options:**
284284

285285
```typescript
286-
import { getUnixTimestampInSeconds, TimeInSeconds } from "opensea-js";
286+
import { getUnixTimestampInSeconds, TimeInSeconds } from "@opensea/sdk";
287287

288288
const listings = await openseaSDK.createBulkListings({
289289
listings: [
@@ -396,7 +396,7 @@ Events are fired whenever transactions or orders are being created, and when tra
396396
Our recommendation is that you "forward" OpenSea events to your own store or state management system. Here are examples of listening to the events:
397397

398398
```typescript
399-
import { OpenSeaSDK, EventType } from 'opensea-js'
399+
import { OpenSeaSDK, EventType } from '@opensea/sdk'
400400
const sdk = new OpenSeaSDK(...);
401401

402402
function handleSDKEvents() {

developerDocs/api-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ hidden: false
99

1010
# OpenSea API Reference
1111

12-
This comprehensive reference documents all OpenSea API endpoints available through the opensea-js SDK. The SDK provides convenient TypeScript methods to interact with the OpenSea API v2.
12+
This comprehensive reference documents all OpenSea API endpoints available through the @opensea/sdk. The SDK provides convenient TypeScript methods to interact with the OpenSea API v2.
1313

1414
> **Note:** Your API key should only be used on a secure backend server. Never expose it in client-side code, public repositories, or browser environments. See the [Security Warning](../README.md#security-warning) in the README for more details.
1515

developerDocs/contributing.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,16 @@ WALLET_PRIV_KEY=your_test_wallet_private_key # For integration tests only
7979
To test your changes in another project:
8080

8181
```bash
82-
# In opensea-js repo
82+
# In @opensea/sdk repo
8383
npm link
8484

8585
# In the project where you want to test
86-
npm link opensea-js
86+
npm link @opensea/sdk
8787
```
8888

8989
**Generate Documentation**
9090

91-
Generate HTML docs (also available for browsing at [https://projectopensea.github.io/opensea-js/](https://projectopensea.github.io/opensea-js/)):
91+
Generate HTML docs (also available for browsing at [https://projectopensea.github.io/@opensea/sdk](https://projectopensea.github.io/@opensea/sdk)):
9292

9393
```bash
9494
npm run docs-build
@@ -125,7 +125,7 @@ The pre-commit hooks will automatically format your code and run linting checks.
125125
## Project Structure
126126

127127
```
128-
opensea-js/
128+
@opensea/sdk
129129
├── src/ # Source code
130130
│ ├── api/ # API client implementation
131131
│ ├── orders/ # Order creation and utilities
@@ -153,6 +153,6 @@ When adding new features:
153153

154154
## Getting Help
155155

156-
- **Issues**: Use [GitHub Issues](https://github.com/ProjectOpenSea/opensea-js/issues) for bug reports and feature requests
157-
- **Discussions**: Use [GitHub Discussions](https://github.com/ProjectOpenSea/opensea-js/discussions) for questions and general discussion
156+
- **Issues**: Use [GitHub Issues](https://github.com/ProjectOpenSea/@opensea/sdkissues) for bug reports and feature requests
157+
- **Discussions**: Use [GitHub Discussions](https://github.com/ProjectOpenSea/@opensea/sdkdiscussions) for questions and general discussion
158158
- **Documentation**: Check the [docs](https://docs.opensea.io/reference/sdk-overview) for API and SDK guidance

developerDocs/getting-started.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const { nft } = await openseaSDK.api.getNFT(tokenAddress, tokenId);
4545
### Checking Balances and Ownerships
4646

4747
```typescript
48-
import { TokenStandard } from "opensea-js";
48+
import { TokenStandard } from "@opensea/sdk";
4949

5050
const asset = {
5151
// CryptoKitties contract
@@ -95,7 +95,7 @@ Note: The total value of offers must not exceed 1000x wallet balance.
9595
To sell an asset, call `createListing`:
9696

9797
```typescript
98-
import { getUnixTimestampInSeconds, TimeInSeconds } from "opensea-js";
98+
import { getUnixTimestampInSeconds, TimeInSeconds } from "@opensea/sdk";
9999

100100
// Expire this listing one day from now
101101
const expirationTime = getUnixTimestampInSeconds(TimeInSeconds.DAY);
@@ -247,7 +247,7 @@ The SDK provides methods to retrieve historical events for NFTs, collections, an
247247
Fetch all events with optional filters:
248248

249249
```typescript
250-
import { AssetEventType } from "opensea-js";
250+
import { AssetEventType } from "@opensea/sdk";
251251

252252
const { asset_events, next } = await openseaSDK.api.getEvents({
253253
event_type: AssetEventType.SALE, // Optional: filter by event type
@@ -301,7 +301,7 @@ const { asset_events } = await openseaSDK.api.getEventsByCollection(
301301
Fetch events for a specific NFT:
302302

303303
```typescript
304-
import { Chain } from "opensea-js";
304+
import { Chain } from "@opensea/sdk";
305305

306306
const { asset_events } = await openseaSDK.api.getEventsByNFT(
307307
Chain.Mainnet, // Chain
@@ -368,7 +368,7 @@ do {
368368
To buy an item, you need to **fulfill a listing**. To do that, it's just one call:
369369

370370
```typescript
371-
import { OrderSide } from "opensea-js";
371+
import { OrderSide } from "@opensea/sdk";
372372

373373
const order = await openseaSDK.api.getOrderByHash(
374374
"0x...",
@@ -391,7 +391,7 @@ If the order is a listing, the taker is the _buyer_ and this will prompt the buy
391391
Similar to fulfilling listings above, you need to fulfill an offer on an item you own to receive the tokens in the offer.
392392

393393
```typescript
394-
import { OrderSide } from "opensea-js";
394+
import { OrderSide } from "@opensea/sdk";
395395

396396
const order = await openseaSDK.api.getOrderByHash(
397397
"0x...",

developerDocs/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Happy seafaring! ⛵️
4949

5050
```typescript
5151
import { ethers } from "ethers";
52-
import { OpenSeaSDK, Chain, OrderSide } from "opensea-js";
52+
import { OpenSeaSDK, Chain, OrderSide } from "@opensea/sdk";
5353

5454
// Initialize the SDK
5555
const provider = new ethers.JsonRpcProvider(

developerDocs/quick-start.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ Node.js version 20 or higher is required for the SDK. If you have Node Version M
1616
Then in your project, run:
1717

1818
```bash
19-
npm install --save opensea-js
19+
npm install --save @opensea/sdk
2020
# or
21-
yarn add opensea-js
21+
yarn add @opensea/sdk
2222
```
2323

2424
# Initialization
@@ -29,7 +29,7 @@ Then, create a new OpenSeaSDK client using your web3 provider:
2929

3030
```typescript
3131
import { ethers } from "ethers";
32-
import { OpenSeaSDK, Chain } from "opensea-js";
32+
import { OpenSeaSDK, Chain } from "@opensea/sdk";
3333

3434
// This example provider won't let you make transactions, only read-only calls:
3535
const provider = new ethers.JsonRpcProvider(

0 commit comments

Comments
 (0)