v12.4.1
What's Changed
The per-domain sub-clients on OpenSeaAPI are now public, which fixes the call the 12.2.0 notes advertised and nobody could make.
The namespaces work
import type { OpenSeaSDK } from "@opensea/sdk"
declare const sdk: OpenSeaSDK
const floors = await sdk.api.collections.getCollectionTraitFloors("boredapeyachtclub")api.collections, api.tokens, api.nfts, api.orders, api.offers, api.listings, api.accounts, api.events, api.drops, api.chains, api.transactions and api.assets are all reachable. This is the shape the 12.2.0 release notes assumed and @opensea/cli already had.
api.search(args) keeps its existing form. SearchAPI's only method is also called search, so a namespace would have displaced a working call.
Why 12.2.0's example failed
getCollectionTraitFloors shipped in 12.2.0 on CollectionsAPI, which OpenSeaAPI held in a private field. Nothing forwarded to it, so api.collections was undefined and api.getCollectionTraitFloors did not exist. The documented example threw a TypeError before making a request, and the first person to notice was a user following it, in opensea-sdk#2007.
Adding an endpoint used to take two edits with only one of them enforced. A method added to a sub-client is now reachable as soon as it exists, so that class of bug is gone rather than guarded against.
Deprecations
All 88 flat methods keep working and are marked @deprecated with the namespaced call to use instead, including the four whose flat name differs: buildDropMintTransaction points at api.drops.buildMintTransaction(). sdk.api.getCollectionTraitFloors(slug) also still works. They are removed in the next major.
Nothing breaks in this release.
Documentation
The README and developer docs showed snake_case fields on responses the SDK camelizes (asset_events, usd_price, floor_price, contract_standard, asset_types, event_timestamp), so those reads were undefined at runtime. Three stream-migration examples called subscription methods on a client no snippet created, and two cancellation examples fed cancelOrder the v2 Listing shape rather than the OrderV2 it takes.
Every TypeScript fence in README.md and developerDocs/ is now type-checked against the built declarations in CI, so an example naming a method or field the package does not ship fails a check instead of reaching a reader. Release-note examples are checked the same way, which is why the snippet above is a real call rather than a plausible one.
Full Changelog: v12.3.0...v12.4.1