|
1 | 1 | # @opensea/sdk |
2 | 2 |
|
| 3 | +## 12.0.0 |
| 4 | + |
| 5 | +### Major Changes |
| 6 | + |
| 7 | +- 75aa2c2: **Breaking:** removes the retired wallet-level agent designation. |
| 8 | + |
| 9 | + SDK: `WalletAuthAPI.markWalletAsAgent` and `WalletAuthAPI.removeWalletAgentDesignation` are gone. CLI: `opensea accounts mark-agent` and `opensea accounts remove-agent`, along with `client.accounts.markAgent` and `client.accounts.removeAgent` on `OpenSeaCLI`. |
| 10 | + |
| 11 | + The endpoints they called, `PUT` and `DELETE /api/v2/accounts/wallets/{wallet}/agent`, no longer exist. os2-core removed them in ProjectOpenSea/os2-core#52946: over the 7 days before that, every `PUT` was rejected with 403 by a kill switch and no wallet's agent flag changed at all. Keeping the methods would mean shipping calls that 404. |
| 12 | + |
| 13 | + An agent is an account, not a flag on a wallet. Use `declareAgentAccount`, `withdrawAgentAccountDeclaration`, and the `proposeAgentRelationship` / `confirmAgentRelationship` / `revokeAgentRelationship` handshake, or the `opensea agent` command group. Both are unchanged by this release. |
| 14 | + |
| 15 | + `WalletAgentStatusResponse` is no longer re-exported from the CLI's `types/api`, since the schema goes away with the next spec sync. |
| 16 | + |
| 17 | +### Minor Changes |
| 18 | + |
| 19 | +- 6c0ee99: Add SDK and CLI support for agent accounts, so an agent can declare itself and complete the ownership handshake without hand-rolling HTTP. |
| 20 | + |
| 21 | + An agent is an account, not a flag on a wallet. Ownership is a relationship between two accounts, mutually confirmed. It is a declaration, not an authorization: naming an account as your agent grants it no ability to act for you. It is self-reported and OpenSea does not verify it. An agent can have no owner at all, and at most one confirmed owner. Either side may withdraw or revoke at any time, which deletes the relationship. Only confirmed relationships are public. |
| 22 | + |
| 23 | + SDK, on `WalletAuthAPI`: `declareAgentAccount`, `withdrawAgentAccountDeclaration`, `proposeAgentRelationship`, `confirmAgentRelationship`, `revokeAgentRelationship`, and `listOwnAgentRelationships`. `AccountsAPI.getAgentProfileRelationships` already covered the public read. |
| 24 | + |
| 25 | + CLI, a new `agent` group: `declare`, `withdraw`, `propose`, `confirm`, `revoke`, `list`, and `profile`, plus a matching `client.agent` namespace on `OpenSeaCLI`. |
| 26 | + |
| 27 | + The scopes differ, which is easy to get wrong. Every write takes `write:wallets` but listing your own relationships takes `read:wallets`, so a client driving the whole handshake must request both or the list call returns 403. `read:wallets` is now in `OPENSEA_SCOPES`, so the default OAuth grant carries it. |
| 28 | + |
| 29 | + The OpenAPI snapshot is refreshed to generate all of this. That also picks up `read:wallets` in `AuthScope`, which was already live in the scope registry but missing from the committed snapshot, so `scripts/check-auth-scope-drift.mjs` was failing on main beforehand. |
| 30 | + |
| 31 | + `AgentProfileRelationshipsResponse` no longer surfaces `agent_owner_profile` or `public_agent_wallets`. Both read the retired wallet-level designation, are permanently null and empty, and are removed by os2-core AGE-51. Read `agentOwner` and `agents` instead. |
| 32 | + |
| 33 | + `markWalletAsAgent` and `removeWalletAgentDesignation` are deprecated. They set a flag on a wallet rather than declaring an account, and the server now rejects new designations; only the removal still works, so an account that set the old flag can clear it. |
| 34 | + |
| 35 | +### Patch Changes |
| 36 | + |
| 37 | +- ddadb41: Replace five hand-rolled API types with the generated ones from `@opensea/api-types`. |
| 38 | + |
| 39 | + `packages/cli/AGENTS.md` and `packages/api-types/AGENTS.md` both say never to hand-roll API request or response types, but these five predate the rule and duplicated schemas the spec already covered. |
| 40 | + |
| 41 | + In the SDK: `GetChainsResponse` becomes `Camelize<ChainListResponse>`, `DropMintRequest` and `DropMintResponse` become `Camelize<>` of the identically named generated schemas, `ResolveAccountResponse` becomes `Camelize<AccountResolveResponse>`, and `ValidateMetadataResponse` becomes `Camelize<>` of the generated schema, which decomposes into `ValidateMetadataAssetIdentifier`, `ValidateMetadataDetails`, `ValidateMetadataAttribute` and `MetadataIngestionError`. In the CLI: `ValidateMetadataResponse` becomes a `Schemas[...]` re-export, the one declared violation in a file that is otherwise all re-exports. |
| 42 | + |
| 43 | + No shape change. Each replacement was diffed field by field against the spec, including required and optional, and they match exactly, so this is types-only with no runtime or behavioral effect. Four of the five were already correct re-exports in the CLI and hand-rolled only in the SDK, so the two packages had disagreed about the same names. |
| 44 | + |
| 45 | +- cfbb465: `onItemReceivedOffer` is now a no-op. The Stream API does not emit `item_received_offer` and never has, so the method only ever registered a handler that could not fire. Confirmed against production: four minutes on `collection:*` delivered 736k events across ten event names and this was not among them, while every other type appeared within 1.8s. |
| 46 | + |
| 47 | + Item-level offers arrive as `item_received_bid`, which carries an identical payload. Use `onItemReceivedBid`. |
| 48 | + |
| 49 | + The method stays callable so existing code compiles and runs unchanged, and it no longer opens a connection for a topic that yields nothing. `EventType.ITEM_RECEIVED_OFFER`, `ItemReceivedOfferEvent`, and `ItemReceivedOfferEventPayload` are kept for source compatibility but marked deprecated and hidden from the generated docs. |
| 50 | + |
| 51 | +- 6e77b5e: `fulfillOrder` now appends the attribution suffix the fulfillment endpoints return, so fills built by the SDK are attributed to OpenSea onchain. They were not before: the API returns `calldata_suffix` (the first four bytes of `keccak256("api.opensea.io")`) and carries it as trailing calldata on its own transactions, but the SDK re-encodes the call from `input_data` and signed that instead, which dropped it. Seaport reads its arguments from offsets and ignores trailing bytes, so the suffix does not affect execution. A missing or malformed suffix is ignored rather than raised. |
| 52 | + |
| 53 | + Private listings are unaffected. They are fulfilled locally through seaport-js and never receive API calldata, so there is no suffix to re-attach. `fulfillPrivateOrder` already takes a `domain` for that purpose; `fulfillOrder` neither accepts nor forwards one, so private fills through it stay unattributed. |
| 54 | + |
| 55 | + `FulfillmentDataResponse` is now derived from `@opensea/api-types` instead of hand-rolled. It had drifted: no `calldataSuffix`, no `valueHex`, four `inputData` members against the spec's seven, and a basic-order member named `basicOrderParameters` where the API sends `parameters`, so that branch never matched and the fallback built the arguments instead. Same result for a single-field struct, so no behavior change there. |
| 56 | + |
| 57 | +- f74c0be: Deduplicate Stream API payload types and logging internals without changing the public API. |
| 58 | +- Updated dependencies [5fdac00] |
| 59 | + - @opensea/api-types@0.8.10 |
| 60 | + |
3 | 61 | ## 11.9.0 |
4 | 62 |
|
5 | 63 | ### Minor Changes |
|
0 commit comments