@opensea/sdk 13.0.5 → 14.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/README.md +127 -131
  2. package/lib/api/api.d.ts +7 -711
  3. package/lib/api/api.js +6 -870
  4. package/lib/api/api.js.map +1 -1
  5. package/lib/api/collections.d.ts +3 -3
  6. package/lib/api/collections.js +5 -4
  7. package/lib/api/collections.js.map +1 -1
  8. package/lib/api/drops.d.ts +1 -1
  9. package/lib/api/drops.js +1 -1
  10. package/lib/api/events.js +1 -1
  11. package/lib/api/events.js.map +1 -1
  12. package/lib/api/fetcher.d.ts +1 -1
  13. package/lib/api/listings.d.ts +2 -3
  14. package/lib/api/listings.js +2 -3
  15. package/lib/api/listings.js.map +1 -1
  16. package/lib/api/nfts.d.ts +1 -1
  17. package/lib/api/nfts.js +1 -1
  18. package/lib/api/orders.d.ts +1 -1
  19. package/lib/api/orders.js +1 -1
  20. package/lib/api/tokens.js +2 -23
  21. package/lib/api/tokens.js.map +1 -1
  22. package/lib/api/types.d.ts +11 -20
  23. package/lib/api/walletAuth.d.ts +2 -2
  24. package/lib/api/walletAuth.js +2 -2
  25. package/lib/auth/index.d.ts +2 -2
  26. package/lib/auth/index.js +1 -3
  27. package/lib/auth/index.js.map +1 -1
  28. package/lib/auth/oauth.d.ts +4 -4
  29. package/lib/auth/oauth.js +4 -4
  30. package/lib/auth/siwx.d.ts +1 -8
  31. package/lib/auth/siwx.js +1 -1
  32. package/lib/auth/siwx.js.map +1 -1
  33. package/lib/auth/types.d.ts +0 -12
  34. package/lib/provider/ethers-adapter.d.ts +1 -1
  35. package/lib/provider/ethers-adapter.js +1 -1
  36. package/lib/provider/seaport-bridge.js +1 -1
  37. package/lib/provider/seaport-bridge.js.map +1 -1
  38. package/lib/provider/viem-adapter.d.ts +1 -1
  39. package/lib/provider/viem-adapter.js +1 -1
  40. package/lib/sdk/assets.d.ts +2 -2
  41. package/lib/sdk/assets.js +2 -2
  42. package/lib/sdk/base.js +2 -2
  43. package/lib/sdk/base.js.map +1 -1
  44. package/lib/sdk/cancellation.d.ts +3 -3
  45. package/lib/sdk/cancellation.js +6 -6
  46. package/lib/sdk/cancellation.js.map +1 -1
  47. package/lib/sdk/fulfillment.d.ts +2 -3
  48. package/lib/sdk/fulfillment.js +3 -4
  49. package/lib/sdk/fulfillment.js.map +1 -1
  50. package/lib/sdk/orders.d.ts +6 -6
  51. package/lib/sdk/orders.js +21 -21
  52. package/lib/sdk/orders.js.map +1 -1
  53. package/lib/stream/client.d.ts +2 -14
  54. package/lib/stream/client.js +3 -19
  55. package/lib/stream/client.js.map +1 -1
  56. package/lib/stream/types.d.ts +3 -26
  57. package/lib/stream/types.js +0 -8
  58. package/lib/stream/types.js.map +1 -1
  59. package/lib/types.d.ts +3 -9
  60. package/lib/types.js +1 -1
  61. package/lib/utils/address.d.ts +2 -2
  62. package/lib/utils/address.js +2 -2
  63. package/lib/utils/case.d.ts +9 -4
  64. package/lib/utils/case.js +1 -1
  65. package/lib/utils/fees.js +1 -1
  66. package/lib/utils/fees.js.map +1 -1
  67. package/lib/utils/rateLimit.d.ts +0 -11
  68. package/lib/utils/rateLimit.js +1 -29
  69. package/lib/utils/rateLimit.js.map +1 -1
  70. package/lib/viem.js +1 -1
  71. package/lib/viem.js.map +1 -1
  72. package/package.json +2 -2
  73. package/src/api/api.ts +12 -1447
  74. package/src/api/collections.ts +7 -4
  75. package/src/api/drops.ts +1 -1
  76. package/src/api/events.ts +1 -1
  77. package/src/api/fetcher.ts +1 -1
  78. package/src/api/listings.ts +2 -3
  79. package/src/api/nfts.ts +1 -1
  80. package/src/api/orders.ts +1 -1
  81. package/src/api/tokens.ts +2 -24
  82. package/src/api/types.ts +15 -23
  83. package/src/api/walletAuth.ts +2 -2
  84. package/src/auth/index.ts +4 -7
  85. package/src/auth/oauth.ts +4 -4
  86. package/src/auth/siwx.ts +1 -8
  87. package/src/auth/types.ts +0 -13
  88. package/src/provider/ethers-adapter.ts +1 -1
  89. package/src/provider/seaport-bridge.ts +1 -1
  90. package/src/provider/viem-adapter.ts +1 -1
  91. package/src/sdk/assets.ts +2 -2
  92. package/src/sdk/base.ts +3 -2
  93. package/src/sdk/cancellation.ts +6 -6
  94. package/src/sdk/fulfillment.ts +14 -14
  95. package/src/sdk/orders.ts +30 -21
  96. package/src/stream/client.ts +2 -26
  97. package/src/stream/types.ts +3 -29
  98. package/src/types.ts +4 -11
  99. package/src/utils/address.ts +2 -2
  100. package/src/utils/case.ts +12 -4
  101. package/src/utils/fees.ts +1 -1
  102. package/src/utils/rateLimit.ts +3 -49
  103. package/src/viem.ts +1 -1
  104. package/src/abi/ERC1155.json +0 -314
  105. package/src/abi/ERC20.json +0 -222
  106. package/src/abi/ERC721.json +0 -333
  107. package/src/abi/Multicall3.json +0 -50
  108. package/src/abi/TransferHelper.json +0 -53
package/README.md CHANGED
@@ -11,19 +11,19 @@
11
11
 
12
12
  # @opensea/sdk <!-- omit in toc -->
13
13
 
14
- > **Read-only mirror.** This package is developed in a private monorepo and mirrored to [ProjectOpenSea/opensea-sdk](https://github.com/ProjectOpenSea/opensea-sdk) when a version is released, so the public code can trail the internal main branch by weeks.
15
- >
16
- > Pull requests opened on the mirror cannot be merged there. They are read, and a fix worth taking is recreated in the monorepo. Because a fix that has landed internally is not public until the next release, filing an issue before writing a patch is the quickest way to find out whether a bug is already fixed.
14
+ TypeScript SDK for [OpenSea](https://opensea.io). Read and filter the orderbook, create and fulfill listings and offers, swap tokens across chains, and subscribe to marketplace events.
17
15
 
18
- This is the TypeScript SDK for [OpenSea](https://opensea.io), the largest marketplace for NFTs and tokens.
16
+ ## Install
19
17
 
20
- It allows developers to access the official orderbook, filter it, create listings and offers, complete trades programmatically, and swap tokens across chains.
18
+ ```bash
19
+ npm install @opensea/sdk
20
+ ```
21
21
 
22
- Get started by getting an API key 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.
22
+ Requires Node.js 22 or newer. `ethers` ships as a dependency; install `viem` too if you use the viem entry point.
23
23
 
24
- ### Get an API key
24
+ ## Get an API key
25
25
 
26
- **For quick experimentation** — request a free-tier key in code, no signup needed. The returned key is valid for 7 days.
26
+ For quick experiments, request a free-tier key in code. It needs no signup and expires after 7 days.
27
27
 
28
28
  ```typescript
29
29
  import { ethers } from "ethers";
@@ -40,29 +40,80 @@ Or from the shell:
40
40
  curl -s -X POST https://api.opensea.io/api/v2/auth/keys | jq -r '.api_key'
41
41
  ```
42
42
 
43
- **For production** — create a permanent key at [opensea.io/settings/developer](https://opensea.io/settings/developer). These keys don't expire, get higher rate limits, and can be rotated from your account. See the [API key docs](https://docs.opensea.io/reference/api-keys) for details.
43
+ For production, create a permanent key at [opensea.io/settings/developer](https://opensea.io/settings/developer). These keys don't expire, get higher rate limits, and can be rotated. See the [API key docs](https://docs.opensea.io/reference/api-keys).
44
+
45
+ ## Quick start
46
+
47
+ Do not ship your API key in frontend code. See [Security warning](#security-warning).
48
+
49
+ ### With ethers.js
50
+
51
+ ```typescript
52
+ import { ethers } from "ethers";
53
+ import { OpenSeaSDK, Chain } from "@opensea/sdk";
54
+
55
+ const provider = new ethers.JsonRpcProvider("https://eth-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY");
56
+ const sdk = new OpenSeaSDK(provider, { chain: Chain.Mainnet, apiKey: "YOUR_API_KEY" });
57
+ ```
58
+
59
+ ### With viem
60
+
61
+ ```typescript
62
+ import { createPublicClient, createWalletClient, http } from 'viem'
63
+ import { mainnet } from 'viem/chains'
64
+ import { OpenSeaSDK, Chain } from '@opensea/sdk/viem'
65
+
66
+ const publicClient = createPublicClient({ chain: mainnet, transport: http() })
67
+ const sdk = new OpenSeaSDK({ publicClient }, { chain: Chain.Mainnet, apiKey: 'YOUR_API_KEY' })
68
+ ```
69
+
70
+ ### With a wallet adapter
71
+
72
+ To sign with a managed wallet (Privy, Turnkey, Fireblocks, Bankr) or a raw private key, wrap a
73
+ [`@opensea/wallet-adapters`](https://github.com/ProjectOpenSea/wallet-adapters) adapter in its
74
+ ethers bridge and pass the result as the signer. Orders are signed with the adapter's
75
+ `signTypedData`. Fulfillments, approvals and onchain cancels go through its `sendTransaction`.
76
+ The provider handles reads and receipts only.
77
+
78
+ ```typescript
79
+ import { ethers } from "ethers";
80
+ import { OpenSeaSDK, Chain } from "@opensea/sdk";
81
+ import { createWalletFromEnv } from "@opensea/wallet-adapters";
82
+ import { walletAdapterToEthersSigner } from "@opensea/wallet-adapters/ethers";
83
+
84
+ const provider = new ethers.JsonRpcProvider("https://mainnet.base.org");
85
+ const signer = walletAdapterToEthersSigner(createWalletFromEnv(), provider);
86
+ const sdk = new OpenSeaSDK(signer, { chain: Chain.Base, apiKey: "YOUR_API_KEY" });
87
+
88
+ const listing = await sdk.createListing({
89
+ asset: { tokenAddress, tokenId },
90
+ accountAddress: await signer.getAddress(),
91
+ amount: "0.5",
92
+ });
93
+ ```
44
94
 
45
- Happy seafaring!
95
+ Creating listings and offers requires an adapter that supports typed-data signing
96
+ (`wallet.capabilities.signTypedData`).
46
97
 
47
98
  ## Calling the API
48
99
 
49
- `sdk.api` groups its methods by domain: `sdk.api.collections.getCollection(slug)`,
50
- `sdk.api.nfts.getNFT(...)`, `sdk.api.offers.getAllOffers(...)`, and so on across `accounts`,
51
- `assets`, `chains`, `drops`, `events`, `listings`, `orders`, `tokens`, `tools` (beta),
52
- `transactions` and `walletAuth`. Search stays flat as `sdk.api.search(args)`.
100
+ `sdk.api` groups methods by domain: `accounts`, `assets`, `chains`, `collections`, `drops`,
101
+ `events`, `listings`, `nfts`, `offers`, `orders`, `tokens`, `tools` (beta), `transactions` and
102
+ `walletAuth`. For example, `sdk.api.collections.getCollection(slug)` or
103
+ `sdk.api.offers.getAllOffers(...)`. Search is the one flat method: `sdk.api.search(args)`.
53
104
 
54
- The older flat methods (`sdk.api.getCollection(slug)`) still work, carry `@deprecated` tags naming
55
- their replacements, and are removed in the next major. See the
56
- [API reference](developerDocs/api-reference.md#calling-the-api) for the four whose names change.
105
+ Version 14 removed the older flat methods such as `sdk.api.getCollection(slug)`. Each one maps to
106
+ the namespaced method of the same name, except four that were renamed; see the
107
+ [API reference](developerDocs/api-reference.md#calling-the-api).
57
108
 
58
109
  ## Response casing
59
110
 
60
- The API speaks snake_case. The SDK rewrites response keys to camelCase before handing them back,
61
- and rewrites camelCase request bodies and query params to snake_case on the way out. So
62
- `collection.bannerImageUrl` is what you read, and `banner_image_url` is what crosses the wire.
111
+ The API uses snake_case. The SDK converts response keys to camelCase, and converts camelCase
112
+ request bodies and query params to snake_case. You read `collection.bannerImageUrl`; the wire
113
+ carries `banner_image_url`.
63
114
 
64
- `@opensea/api-types` describes the wire, so its types stay snake_case. Do not annotate a value an
65
- SDK method returned with one of them:
115
+ `@opensea/api-types` describes the wire format, so its types are snake_case. Don't use them to
116
+ annotate a value an SDK method returned:
66
117
 
67
118
  ```typescript
68
119
  import type { AccountResolveResponse } from "@opensea/api-types";
@@ -72,13 +123,11 @@ const account: AccountResolveResponse = await sdk.api.accounts.resolveAccount("v
72
123
  console.log(account.ens_name); // undefined; the runtime key is `ensName`
73
124
  ```
74
125
 
75
- TypeScript rejects that pairing only when the wire type has a required snake_case key somewhere in
76
- its tree. Of the 166 schemas in the spec that declare snake_case properties directly, 15 take the
77
- camelized value with no error, `AccountResolveResponse` among them: its one required property,
78
- `address`, has no underscore to rewrite, so nothing is missing and the camelCase keys are allowed
79
- through as extras.
126
+ TypeScript only rejects this when the wire type has a required snake_case key somewhere in its
127
+ tree. `AccountResolveResponse` has one required property, `address`, which has no underscore, so
128
+ the camelCase object type-checks and every snake_case field is `undefined` at runtime.
80
129
 
81
- Two spellings work. Use the SDK's own response type, which is already camelized:
130
+ Use the SDK's own response type, which is already camelCase:
82
131
 
83
132
  ```typescript
84
133
  import type { ResolveAccountResponse } from "@opensea/sdk";
@@ -87,7 +136,7 @@ const account: ResolveAccountResponse = await sdk.api.accounts.resolveAccount("v
87
136
  console.log(account.ensName);
88
137
  ```
89
138
 
90
- Or wrap the wire type in `Camelize`, for a response with no dedicated alias in this package:
139
+ Or, for a response with no SDK alias, wrap the wire type in `Camelize`:
91
140
 
92
141
  ```typescript
93
142
  import type { AccountResolveResponse } from "@opensea/api-types";
@@ -96,13 +145,13 @@ import type { Camelize } from "@opensea/sdk";
96
145
  const account: Camelize<AccountResolveResponse> = await sdk.api.accounts.resolveAccount("vitalik.eth");
97
146
  ```
98
147
 
99
- `camelizeResponse: false` turns the rewrite off for one call. Use it where the response keys are
100
- data rather than field names: `getTraits` is keyed by collection-authored trait names, so the
101
- rewrite would report a `dark_brown` trait as `darkBrown` and merge two traits that differ only in
102
- casing.
148
+ Pass `camelizeResponse: false` to skip the conversion for one call. Use it when response keys are
149
+ data rather than field names. `getTraits`, for example, is keyed by trait names the collection
150
+ chose, so conversion would turn a `dark_brown` trait into `darkBrown` and merge two traits that
151
+ differ only in casing.
103
152
 
104
- Write it as the literal `false`. `api.get`, `api.post` and `api.request` overload on that literal
105
- and hand back the raw `T`, so the declared type is the wire shape the call actually returns:
153
+ Write it as the literal `false`. `api.get`, `api.post` and `api.request` have an overload for
154
+ that literal that returns the raw `T`, so the declared type matches the response:
106
155
 
107
156
  ```typescript
108
157
  type UploadPolicy = { upload_url: string; success_action_status: string };
@@ -117,10 +166,9 @@ console.log(policy.success_action_status); // typed, and present at runtime
117
166
  console.log(policy.successActionStatus);
118
167
  ```
119
168
 
120
- The literal is what selects that signature, and TypeScript keeps it only where the property is
121
- written inline at the call site or the object is declared `as const`. The two spellings below
122
- compile, and the runtime still skips the rewrite whenever the value is `false`, but the declared
123
- type is `Camelize<T>` either way, so it claims camelCase properties the response does not have:
169
+ TypeScript keeps the literal only when the option is written inline at the call site or the
170
+ object is declared `as const`. In the cases below the runtime still skips the conversion, but the
171
+ declared type is `Camelize<T>`, which claims camelCase properties the response doesn't have:
124
172
 
125
173
  ```typescript
126
174
  type UploadPolicy = { upload_url: string; success_action_status: string };
@@ -136,62 +184,12 @@ const options = { camelizeResponse: false };
136
184
  await sdk.api.get<UploadPolicy>("/api/v2/some/path", undefined, options);
137
185
  ```
138
186
 
139
- ## Quick Start
140
-
141
- ### With ethers.js
142
-
143
- ```typescript
144
- import { ethers } from "ethers";
145
- import { OpenSeaSDK, Chain } from "@opensea/sdk";
146
-
147
- const provider = new ethers.JsonRpcProvider("https://eth-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY");
148
- const sdk = new OpenSeaSDK(provider, { chain: Chain.Mainnet, apiKey: "YOUR_API_KEY" });
149
- ```
150
-
151
- ### With viem
152
-
153
- ```typescript
154
- import { createPublicClient, createWalletClient, http } from 'viem'
155
- import { mainnet } from 'viem/chains'
156
- import { OpenSeaSDK, Chain } from '@opensea/sdk/viem'
157
-
158
- const publicClient = createPublicClient({ chain: mainnet, transport: http() })
159
- const sdk = new OpenSeaSDK({ publicClient }, { chain: Chain.Mainnet, apiKey: 'YOUR_API_KEY' })
160
- ```
161
-
162
- ### With a wallet adapter
163
-
164
- To sign with a managed wallet (Privy, Turnkey, Fireblocks, Bankr) or a raw private key, wrap a
165
- [`@opensea/wallet-adapters`](https://github.com/ProjectOpenSea/wallet-adapters) adapter in its
166
- ethers bridge and pass the result as the signer. Orders are signed through the adapter's
167
- `signTypedData`, and fulfillments, approvals and onchain cancels go through its `sendTransaction`.
168
- The provider is used for reads and receipts only.
169
-
170
- ```typescript
171
- import { ethers } from "ethers";
172
- import { OpenSeaSDK, Chain } from "@opensea/sdk";
173
- import { createWalletFromEnv } from "@opensea/wallet-adapters";
174
- import { walletAdapterToEthersSigner } from "@opensea/wallet-adapters/ethers";
175
-
176
- const provider = new ethers.JsonRpcProvider("https://mainnet.base.org");
177
- const signer = walletAdapterToEthersSigner(createWalletFromEnv(), provider);
178
- const sdk = new OpenSeaSDK(signer, { chain: Chain.Base, apiKey: "YOUR_API_KEY" });
179
-
180
- const listing = await sdk.createListing({
181
- asset: { tokenAddress, tokenId },
182
- accountAddress: await signer.getAddress(),
183
- amount: "0.5",
184
- });
185
- ```
186
-
187
- The adapter has to support typed-data signing (`wallet.capabilities.signTypedData`) to create
188
- listings and offers.
187
+ ## Examples
189
188
 
190
- ### Wallet-authenticated API helpers
189
+ ### Wallet-authenticated API
191
190
 
192
- For a server-side EVM signer, `OpenSeaAuth` signs in with SIWE, creates a scoped
193
- personal access token (PAT), and exchanges it for the short-lived JWT used by
194
- REST and MCP.
191
+ For a server-side EVM signer, `OpenSeaAuth` signs in with SIWE, creates a scoped personal access
192
+ token (PAT), and exchanges it for the short-lived JWT that REST and MCP accept.
195
193
 
196
194
  ```typescript
197
195
  import { Wallet } from "ethers"
@@ -214,16 +212,14 @@ try {
214
212
  }
215
213
  ```
216
214
 
217
- Keep the same `OpenSeaAuth` instance through revocation because it holds the
218
- SIWE session. `revoke()` accepts the current JWT as a guard, revokes its backing
219
- PAT, and clears the in-memory auth state. `walletAuth` provides typed helpers
220
- for every deployed scoped operation; request only the scopes the task needs. See the
221
- [wallet-auth guide](https://docs.opensea.io/reference/auth).
215
+ Keep the same `OpenSeaAuth` instance until you revoke, because it holds the SIWE session.
216
+ `revoke()` takes the current JWT as a guard, revokes the PAT behind it, and clears the in-memory
217
+ auth state. `walletAuth` has a typed helper for every deployed scoped operation. Request only the
218
+ scopes the task needs. See the [wallet-auth guide](https://docs.opensea.io/reference/auth).
222
219
 
223
220
  ### Cross-chain drop minting
224
221
 
225
- Build the ordered transactions for paying on one chain and minting a drop on
226
- another through the typed API client:
222
+ Build the ordered transactions to pay on one chain and mint a drop on another:
227
223
 
228
224
  ```typescript
229
225
  const mint = await sdk.api.drops.buildCrossChainMintTransactions("pyro-on-ape", {
@@ -242,7 +238,9 @@ const receipt = await sdk.api.transactions.getTransactionReceipt(mint.receiptReq
242
238
 
243
239
  ### Order actions on EVM and Solana
244
240
 
245
- Use the typed action APIs when a wallet needs ordered approval, signing, or transaction steps. Solana callers should pass `svm_order.id` as the order identifier and preserve base58 address casing.
241
+ The action APIs return the ordered approval, signing and transaction steps a wallet needs to
242
+ run. On Solana, pass `svm_order.id` as the order identifier and keep base58 addresses in their
243
+ original case.
246
244
 
247
245
  ```typescript
248
246
  const actions = await sdk.api.listings.createListingFulfillmentActions({
@@ -261,12 +259,13 @@ const actions = await sdk.api.listings.createListingFulfillmentActions({
261
259
  // sdk.api.orders.createCancelOrderActions(protocol, orderIdentifier, request, chain)
262
260
  ```
263
261
 
264
- Execute `actions.steps` in order. If a Solana action includes a partially signed transaction or requires a Jito bundle, submit it exactly as directed by the response rather than rebuilding or broadcasting it through a public RPC.
262
+ Run `actions.steps` in order. If a Solana step includes a partially signed transaction or needs a
263
+ Jito bundle, submit it exactly as the response directs. Don't rebuild it or broadcast it through a
264
+ public RPC.
265
265
 
266
266
  ### Token activity stats
267
267
 
268
- Read materialized trade count and USD volume for a token without aggregating
269
- raw events:
268
+ Get precomputed trade count and USD volume for a token without aggregating raw events:
270
269
 
271
270
  ```typescript
272
271
  import { Chain } from "@opensea/sdk";
@@ -281,13 +280,12 @@ console.log(activity.windows["24h"]?.trades)
281
280
  console.log(activity.windows["24h"]?.volumeUsd)
282
281
  ```
283
282
 
284
- The SDK exposes camel-cased fields. A requested window is absent when the token
285
- has no swaps in that period.
283
+ A requested window is missing from `windows` when the token had no swaps in that period.
286
284
 
287
285
  ### Real-time events
288
286
 
289
- Subscribe to marketplace events over WebSocket from the `@opensea/sdk/stream`
290
- subpath. Streaming events do not count toward your API rate limits.
287
+ Subscribe to marketplace events over WebSocket with the `@opensea/sdk/stream` subpath. Stream
288
+ events don't count toward your API rate limits.
291
289
 
292
290
  ```typescript
293
291
  import { OpenSeaStreamClient, EventType } from "@opensea/sdk/stream";
@@ -312,45 +310,43 @@ client.onEvents(
312
310
  unsubscribe();
313
311
  ```
314
312
 
315
- Node 22 or newer, or any browser, needs no extra dependencies. The client
316
- reconnects with backoff and re-subscribes to every topic it was watching, so a
317
- dropped connection recovers without any work from you.
313
+ It runs in Node 22+ and browsers with no extra dependencies. After a dropped connection, the
314
+ client reconnects with backoff and re-subscribes to every topic it was watching.
318
315
 
319
- This code was published as `@opensea/stream-js` until version 0.4.0. See the
320
- [migration guide](developerDocs/stream-migration.md) for the differences.
316
+ Before version 0.4.0 this client was published as `@opensea/stream-js`. See the
317
+ [migration guide](developerDocs/stream-migration.md).
321
318
 
322
319
  ## Documentation
323
320
 
324
- - [Quick Start Guide](developerDocs/quick-start.md)
325
- - [Getting Started Guide](developerDocs/getting-started.md)
326
- - [API Reference](developerDocs/api-reference.md)
321
+ - [Quick start guide](developerDocs/quick-start.md)
322
+ - [Getting started guide](developerDocs/getting-started.md)
323
+ - [API reference](developerDocs/api-reference.md)
327
324
  - [Stream migration from @opensea/stream-js](developerDocs/stream-migration.md)
328
- - [Advanced Use Cases](developerDocs/advanced-use-cases.md)
329
- - [Frequently Asked Questions](developerDocs/faq.md)
325
+ - [Advanced use cases](developerDocs/advanced-use-cases.md)
326
+ - [FAQ](developerDocs/faq.md)
330
327
  - [Contributing](CONTRIBUTING.md)
331
328
 
332
- ### Security Warning
333
-
334
- **Do not use this SDK directly in client-side/frontend applications.**
335
-
336
- 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.
329
+ ## Security warning
337
330
 
338
- #### Recommended Architecture
331
+ Don't use this SDK in frontend code. It needs your API key, and anyone can extract a key embedded
332
+ in a browser or mobile app, then abuse it or burn through your rate limit.
339
333
 
340
- For frontend applications that need to interact with OpenSea functionality:
334
+ For a frontend app:
341
335
 
342
- 1. **Create a backend API wrapper**: Set up your own backend server that securely stores your OpenSea API key
343
- 2. **Call OpenSea SDK server-side**: Use `@opensea/sdk` on your backend to interact with OpenSea's APIs
344
- 3. **Return data to your frontend**: Send the necessary data (like transaction parameters) back to your frontend
345
- 4. **Execute transactions in the browser**: Have users sign transactions with their own wallets (e.g., MetaMask) in the browser
336
+ 1. Run your own backend that stores the API key.
337
+ 2. Call `@opensea/sdk` from that backend.
338
+ 3. Return what the frontend needs, such as transaction parameters.
339
+ 4. Have users sign transactions in the browser with their own wallet (for example, MetaMask).
346
340
 
347
341
  ## Changelog
348
342
 
349
- The changelog for recent versions can be found at:
350
-
351
343
  - @opensea/sdk: https://github.com/ProjectOpenSea/opensea-sdk/releases
352
344
  - OpenSea API: https://docs.opensea.io/changelog
353
345
 
346
+ ## Contributing
347
+
348
+ Read-only mirror of a private monorepo, updated on each release. Pull requests are welcome, and we bring accepted changes into the monorepo.
349
+
354
350
  ## Security
355
351
 
356
352
  Found a vulnerability? Report it through OpenSea's Bugcrowd program at https://bugcrowd.com/engagements/opensea rather than opening a public issue. See [SECURITY.md](SECURITY.md).