Releases: ProjectOpenSea/opensea-js
v6.1.0
What's Changed
This minor version primarily adds 4 new NFT endpoints, read the announcement here: New Release - v2 NFT Endpoints
- Add 4 new endpoints and support multichain by @thenerdassassin in #1055
- Add zora chain identifiers by @sambarnes in #1066
Full Changelog: v6.0.6...v6.1.0
v6.0.6
What's Changed
The main patch fix was to use the zone returned by the buildOffer endpoint which fixed a bug when creating collection offers.
- fix husky precommit hook by @ryanio in #1035
- Update README.md - fix links to request api key by @ryanio in #1037
- Update dependency concurrently to v8.2.0 by @renovate in #1034
- Update dependency @types/node to v18.16.18 by @renovate in #1036
- Update typescript-eslint monorepo to v5.59.11 by @renovate in #1038
- Update dependency @opensea/seaport-js to v2.0.4 by @renovate in #1049
- Update Node.js to v18.16.1 by @renovate in #1048
- Update typescript-eslint monorepo to v5.60.0 by @renovate in #1046
- Update dependency dotenv to v16.3.1 by @renovate in #1041
- Use zone returned by buildOffer when creating collection offers. by @thenerdassassin in #1058
Full Changelog: v6.0.5...v6.0.6
v6.0.5
Biggest change is a bug fix. BigNumber underflow errors were thrown when passing a fractional number to createBuyOrder or createSellOrder.
What's Changed
- Fixes underflow when try to use fractional ETH as number in orders by @JoshuaSchmidt-OpenSea in #1031
- Update dependency @opensea/seaport-js to v2.0.3 by @renovate in #1020
- Update dependency eslint to v8.42.0 by @renovate in #1024
- Update dependency dotenv to v16.1.4 by @renovate in #1025
- Update dependency typescript to v5.1.3 by @renovate in #1021
- Update typescript-eslint monorepo to v5.59.9 by @renovate in #1027
Full Changelog: v6.0.4...v6.0.5
v6.0.4
Fixes Windows installs
What's Changed
- Use exit 0 instead of || true to make sure postinstall works on Windows by @JoshuaSchmidt-OpenSea in #1030
Full Changelog: v6.0.3...v6.0.4
v6.0.3
v6.0.2
What's Changed
- Remove URLSearchParams import by @JoshuaSchmidt-OpenSea in #1016
Full Changelog: v6.0.1...v6.0.2
v6.0.1
v6.0.0
Overview
The SDK contained a lot of legacy code from deprecated dependencies and pre-Seaport contracts. OpenSea audited every dependency, function, and utility in the codebase to delete as much code as possible.
Now, this SDK will be focused on functions and convenience wrappers for 2 use cases:
- OpenSea APIs
- Seaport interactions specifically for creating OpenSea orders
Provider Consistency
In previous versions, the SDK had a random mix of Web3 and ethers usage. Now, the SDK has created consistency by only using ethers. This makes instantiating an instance of the SDK much simpler. As a read-only example:
import { ethers } from 'ethers'
import { OpenSeaSDK, Network } from 'opensea-js'
// This example provider won't let you make transactions, only read-only calls:
const provider = new ethers.providers.JsonRpcProvider('https://mainnet.infura.io')
const openseaSDK = new OpenSeaSDK(provider, {
networkName: Network.Main,
apiKey: YOUR_API_KEY
})
Big Number Consistency
The SDK had a random mix of bignumber.js
, BN.js
, and ethers.BigNumber
with many utility functions to convert between the various types. This system was ripe for hidden, uncaught bugs. Now, the SDK only uses ethers
built in BigNumber.
For more information on this type see the Ethers BigNumber documentation.
Naming Changes
Types
- Network -> Chain
- WyvernSchemaName -> TokenStandard
- WyvernNFTAsset -> NFTAsset
- WyvernFTAsset -> FungibleAsset
- WyvernAsset -> AssetType
- WyvernBundle -> Bundle
Functions
- getAssetBalance -> getBalance
Initial Config
There was a config called networkName
which has been renamed to chain
Public Functions Removed
These functions were a mix of broken, deprecated, or rarely used. If anything was removed that was heavily relied upon by the web3 ecosystem, make sure to comment in the discussions for this release. OpenSea is open to adding back functions that the community needs if there is sufficient support for it and no better alternative.
Wyvern Functions
The following functions still existed in the code base from the legacy Wyvern functions and are now removed.
- _initializeProxy
- _getProxy
- _approveAll
- _getApprovedTokenCount
- _ownsAssetOnChain
- revokeAuthenticatedProxyAccess
- isAuthenticatedProxyRevoked
- unrevokeAuthenticatedProxyAccess
- approveFungibleToken
- unapproveFungibleToken
- approveSemiOrNonFungibleToken
- isAssetTransferrable
- transfer
- transferAll
- _correctGasAmount
- gasIncreaseFactor (property)
Deprecated
The following functions were previously marked as deprecated and are now removed.
- _createEmailWhitelistEntry
- api.postAssetWhitelist
- _computeGasPrice
- getFungibleTokens
- gasPriceAddition (property): only used by
_computeGasPrice
Wrapped NFTs
Utility functions existed in the SDK for wrapping NFTs into their corresponding WrappedNFT ERC20 tokens, purchasing Wrapped NFTS, and liquidating NFTs. If users still have a need for these types of transactions, they should learn to use the Uniswap API.
- getQuoteFromUniswap
- liquidateAssets
- purchaseAssets
- unwrapAssets
- wrapAssets
Utility/Convenience Functions
These methods were superfluous and have been removed.
- getTokenBalance: This has been replaced by
getBalance
- getCurrentGasPrice: Can directly use ethers
provider.getGasPrice()
- _getBuyFeeParameters: Unused
- api.put: There are no put methods on the API
Additionally, these methods were wrappers on Seaport and can still be called by using sdkInstance.seaport_v1_5
- getDomain
- getDomains
- getNumberOfDomains
- setDomain
Renamed Functions and Properties
- Env var
API_KEY
renamed toOPENSEA_API_KEY
Network
enum renamed toChain
apiConfig.networkName
renamed toapiConfig.chain
Integration Tests
Integration test coverage has been dramatically improved. As of now, the integration tests include:
- getAsset
- getCollection
- createBuyOrder
- createSellOrder
- createCollectionOffer
- wrapEth
- unwrapEth
For more information on integration tests, see the README
Dependencies Removed
By removing the following dependencies, the package size was reduced by XX%.
- axios
- ethereumjs-abi
- ethereumjs-util
- safe-buffer
- web3
- wyvern-js
- ajv
- lodash
- bignumber.js
- fbemitter
There are now only 3 dependencies left! From 15 in opensea-js v5.
Compilation Target & Browser Build
The compilation target has been bumped from es5
to es6
and a browser build is now outputted to lib/bundle.js
.
TypeScript Compiler Config
esModuleInterop
and allowSyntheticDefaultImports
are now disabled by default. See reasoning here: https://www.semver-ts.org/#module-interop
v5.0.3
- Includes the src files which will make the package more easily consumed by tools like webpack
- Collection Verification Status (safelistRequestStatus) when getting a collection
- Animation URLs added when getting an asset
- Interface for OpenseaCollectionStats
- Various Dependency Updates
v5.0.0
This release uses the Seaport 1.5 protocol.
For more information, see our changelog announcement.
What's Changed
- Remove wyvern-schemas package by @JoshuaSchmidt-OpenSea in #872
- Remove Seaport 1.1 Logic by @JoshuaSchmidt-OpenSea in #880
- Remove some usage of wyvern-js by @JoshuaSchmidt-OpenSea in #884
- Remove wyvern usage for validating signatures and converting to base … by @JoshuaSchmidt-OpenSea in #891
- Removes Wyvern specific Functions by @JoshuaSchmidt-OpenSea in #892
- Build and Test Supported Node Versions by @montasaurus in #893
- Remove Wyvern Specific Functions by @JoshuaSchmidt-OpenSea in #894
- Update Node.js to v16.20.0 by @renovate in #898
- Fix Order Test Side by @montasaurus in #911
- Bump CodeQL by @montasaurus in #917
- Use Seaport v1.5 for Listings and Offers by @JoshuaSchmidt-OpenSea in #935
Full Changelog: 4.0.22...v5.0.0