- Added a
sizefield to theMediaobject in the NFT metadata responses to indicate the size of the media in bytes.
- Added support for the
pageSizeparameter inGetNftsForOwnerOptionsto specify the number of NFTs fetched when usingalchemy.nft.getNftsForOwner(). - Added support for a Wallet object. This object is identical to the Ethers
Walletclass. - Added support for Arbitrum Goerli network via the
Network.ARB_GOERLIenum. - Added support for the AStar Mainnet network via the
Network.ASTAR_MAINNETenum. - Added typed request/response overloads for
CoreNamespace.getAssetTransfers()for when thewithMetadataparam is true. - Added support the
tokenUriTimeoutInMsparameter ongetNftsForOwner(),getNftMetadata(), andgetNftsForContract().
- Added the
transactnamespace for functionality relating to sending transactions. This includes the Flashbots methodssendPrivateTransactionandcancelPrivateTransaction.
- Removed the deprecated
TOKENenum fromAssetTransfersCategory. - Added support for Optimism Goerli network via the
Network.OPT_GOERLIenum. - Added the
pageSizeparameter inGetNftsForContractOptionsto specify the number of NFTs fetched when usingalchemy.nft.getNftsForContract. - Added correct
withMetadatatyping toAssetTransfersResponse.
- Added an optional
urlsetting toAlchemySettingsto allow specifying a custom hardcoded URL to send all requests to. - Fixed a bug where the SDK would incorrectly include a gzip header in browser environments
- Top level package has moved from
@alch/alchemy-sdktoalchemy-sdkfor convenience. New command to install isnpm install alchemy-sdk - Updated instantiation syntax:
initializeAlchemy(settings)is nownew Alchemy(settings) - Added three namespaces under the Alchemy object:
core,nft, andws. All Ethers.js provider methods and Alchemy Enhanced APIs (other than NFT) are undercore. - Moved top-level methods under the Alchemy object. Instead of
getNftsByOwner(alchemy, 'vitalik.eth'), now methods are called usingalchemy.nft.getNftsByOwner('vitalik.eth') - Ethers.js Alchemy Provider methods are now directly embedded under
alchemy.core - Ethers.js WebSocket Provider methods are now directly embedded under
alchemy.ws - The settings object is now a config module under
alchemy.config. - If necessary, the full Ethers.js Provider is now available under
alchemy.config.getProvider()as a promise to reduce bundle size. - If necessary, the full WebSocket Provider is now available under
alchemy.config.getWebSocketProvider()as a promise to reduce bundle size. - Dynamic imports for large methods (in particular, Ethers.js methods) are now supported. Initial package size for the Alchemy SDK is 20kB, and will only download Ethers.js packages when a relevant method is called.
- Methods including Collection in the NFT package have been renamed to
Contract: for instance,getNftsForCollectionis nowgetNftsForContract.