- Added
HYPERLIQUIDtestnet. - Added
PLASMAmainnet. - Added
PLASMAtestnet.
Updates dependencies to resolve critical and high-severity security vulnerabilities:
- axios:
^1.7.4→^1.12.0(fixes SSRF and DoS vulnerabilities) - rollup:
^2.70.1→^2.79.2(fixes XSS vulnerability) - elliptic:
6.5.7→6.6.1(fixes 9 critical ECDSA vulnerabilities)
- Added Hyperliquid Mainnet
- Added Botanix Mainnet, Testnet; Humanity Mainnet; Rise Testnet
- Deprecated Celo Baklava; Fantom Testnet; Geist Mainnet, Polter
- Remove leading 0s in hex strings for polygon compatibility
- Added a new
PortfolioNamespacewith five new methods:getTokensByWallet(),getTokenBalancesByWallet(),getNftsByWallet(),getNftCollectionsByWallet(), andgetTransactionsByWallet(). Access these methods viaalchemy.portfolio.
- Removed batch operations for
getTokensForOwnerto fix support for newer networks
- Added Anime Mainnet and Sepolia, Story Mainnet and Aeneid, Megaeth Testnet
- Added Berachain Bepolia, Celo Baklava, Ethereum Hoodi, Gensyn Testnet, Lens Mainnet, Settlus Mainnet, Superseed Mainnet and Sepolia, Tea Sepolia
- Deprecated Berachain Bartio
- Replace
optimismwithopt-mainnet
- Added Solana address activity webhook
- Added animation to NFT type
- Added name to create-webhook
- Added
MONADtestnet. - Added
SETTLUStestnet (Sepolia).
- Added
SEImainnet.
- Added
RONINmainnet, testnet (Saigon).
- Added
ABSTRACTmainnet. - Added
UNICHAINmainnet. - Added
SEItestnet.
- Added
BERACHAINmainnet.
- Added many new networks
- Added a new
PricesNamespacewith three new methods:getTokenPriceByAddress(),getTokenPriceBySymbol(),getHistoricalPriceByAddress, andgetHistoricalPriceBySymbol(). Access these methods viaalchemy.prices.
- Added networks for
FLOW.
- Added networks for
ROOTSTOCK.
- Fixed webhook network parsing in
getAllWebhooksmethod for all supported networks.
- Fixed createWebhook's
skip_empty_messagesparam.
- Added networks for
WORLDCHAIN.
- Added networks for
SONEIUMandBERACHAIN. Note that these are primarily forCoreNamespacemethods. Not all namespaces will work with these networks.
- Addressed security vulnerabilities by adding overrides for
ellipticandwsdependencies. Specifically:- Updated
ellipticto version6.5.7(latest) to fix vulnerabilities related to EDDSA signature length checks and ECDSA BER-encoded signatures. - Updated
wsto version7.5.10to mitigate a potential DoS vulnerability. The latest major version ofwsis8.x, however,7.5.10is the most up-to-date version compatible withethers v5, which depends on7.xversions ofws.
- Updated
- Fixed a bug where the
openSeaMetadata?.safelistRequestStatuswas undefined in theNftobject that resulted in aCannot read properties of undefinederror (#416)
- Added networks for
SHAPE,LINEA,FANTOM,ZETACHAIN,ARBNOVA,BLAST,MANTLE,SCROLL,GNOSIS,BNB,AVAX,CELO,METIS,OPBNB. Note that these are primarily forCoreNamespacemethods. Not all namespaces will work these networks. - App IDs are now a required property when calling
NotifyNamespace.createWebhook()withWebhookType.GRAPHQL. This is not a Typescript breaking change, but rather a run-time breaking change. Calling the endpoint without an App ID will now throw an error instead of returning a 503.
- Fixed a bug with
NotifyNamespace.createWebhook()when usingWebhookType.GRAPHQL. Also added the option useskipEmptyMessageswhen creating graphQL webhooks to skip empty blocks. - Updated axios version to remove security warning (#443).
- Fixed a bug where the
openSeaMetadata?.safelistRequestStatuswas undefined in theNftobject that resulted in aCannot read properties of undefinederror (#416) - Added support
connectionInfoOverridesfield in theAlchemyconstructor. This allows you to override the ethers.jsConnectionInfoobject and specify custom connection information for the underlyingJsonRpcProvider.
- Added support for Zksync Mainnet and Sepolia via the
Network.ZKSYNC_MAINNETandNetwork.ZKSYNC_SEPOLIAenums.
- Added support for Arbitrum and Optimism Sepolia webhook creation.
- API error messages return the actual error instead of [Object object]
- Added support for Polygon Amoy network via the
Network.MATIC_AMOYenum.
- Upgraded the
axiosdependency tov1.6.5, fixing a vulnerable version #397. Thanks @mpsq for the contribution!
- Added endpoints for
isAirdropNft()andreportSpam()inNftNamespace. - Added a missing
marketplaceAddressfield to theNftSaleinNftNamespace.getNftSales(). - Fixed an incorrect field name for
bannerImageUrlinOpenSeaCollectionMetadata. Deprecated the old field nameimageBannerUrl. - Added support for Base networks in
NotifyNamespace.
- Added support for Optimism Sepolia and Base Sepolia via the
Network.OPT_SEPOLIAandNetwork.BASE_SEPOLIAenums.
- For a full list of changes to V3 from V2, please visit: https://docs.alchemy.com/reference/alchemy-sdk-v2-to-v3-migration-guide. There, you can also find the API reference for v2 endpoints as well. V3 primarily involves changes to use the V3 NFT API.
- Added support for Arbitrum Sepolia network via the
Network.ARB_SEPOLIAenum.
- Fixed a bug in the
Logobject where theremovedfield was not included in the response.
- Add support for Base
- Added a new method
CoreNamespace.isContractAddress()to easily check if an address is a contract or EOA. The method accepts a string address and returns a boolean value indicating if the given address is a contract address or not.
- Fixed a bug where
GetOwnersForContractResponsewas missing thepageKeyfield.
- Add the
refreshCacheparameter to NFT rarity endpoints to allow users to update stale rarity values. - Add the
includeCountparameter to getOwnersForContract.
- Fixed a bug with in
NftNamespace.getNftSales()in which there was a typo indecimalfield of theNftSaleFeeDataobject. The field is now correctly nameddecimals, anddecimalis marked deprecated to avoid a breaking change.
- Added redundancy to
CoreNamespace.getTokensForOwner()to handle failures when fetching token metadata. - Added support for the
acquiredAtfield for orderedgetNftsForOwnerqueries. Only available when specifyingorderBy: NftOrdering.TRANSFERTIMEin the request. - Added the
NftSaleMarketplace.BLURmarketplace enum to theNftNamespace.getNftSales()method return. - Added support for the
validAtresponse field toNftNamespace.getNftSales().
- Fixed a bug with
NotifyNamespacewhen creating webhooks on ETH_SEPOLIA, OPT_GOERLI, and ARB_GOERLI. - Fixed a bug with
Wallet.populateTransaction()where the method would never resolve. - Fixed a bug with
NftNamespace.getMintedNfts()andNftNamespace.getTransfersForOwner()where the method would always throw an error for certain addresses (#318).
- Moved the
exports.defaultfield to be the last field. This fixed a bug introduced in2.8.1that prevented certain frameworks from building (#313).
- Fixed a bug where the SDK was not compatible with
moduleResolution: bundlerwhen usingtypescriptatv5.0(#302). Thanks @florrdv! - Fixed a bug with
getTransfersForOwner()andgetTransfersForContract()methods in theNftNamespace, where some NFTs would not be returned if the NFT was transferred multiple times.
Added PolygonZkEvm Mainnet and Testnet limited support to the sdk
- Added
CustomGraphqlWebhookto be used with theNotifyNamespace. This webhook uses graphql to track any event on every block.
- Added support for a
pageKeyandpageSizeparameter inNftNamespace.getOwnersforNftto allow for pagination of the results.
- Added additional descriptive tokenTypes in NFT- and contract-level metadata, for contracts which don't support any NFT standard.
- Added the
titlefield toContractForOwnerto represent the title of the token held by the owner. - Fixed a bug where the
mediafield inContractForOwnerwas aMediaobject rather than aMedia[]array. - Added support for the Eth Sepolia network via the
Network.ETH_SEPOLIAenum.
- Added the
NftMetadataUpdateWebhookto be used with theNotifyNamespace. This webhook tracks all ERC721 and ERC1155 token metadata updates.
- Added
TransactNamespace.simulateAssetChangesBundle()to simulate a list of transactions in sequence and return a list of asset changes. - Added
TransactNamespace.simulateExecutionBundle()to simulate a list of transactions in sequence and return a list of decoded logs and traces. - Added
NftNamespace.getContractMetadataBatch()to get the metadata associated with multiple NFT contracts in a single request.
- Added exports for Ethers.js types and interfaces used by the SDK.
- Added the
pageSizeparameter to theNftNamespace.getContractsForOwner()method.
- Added a missing
gasfield in theDebugTransactioninterface to specify the gas provided for a transaction execution. - Fixed a bug with
NftNamespace.getMintedNfts(),NftNamespace.getTransfersForOwner(), andNftNamespace.getTransfersForContract()where the method would incorrectly error if the specified address had no transfers. - Added the
BigNumberethers export. You can access this by importingBigNumberalong with the other exports in the package.
- Added the
CoreNamespace.getTokensForOwner()method to get all the token balances and token metadata for a given address. - Added the
wyvernandcryptopunksmarketplaces in theNftSaleMarketplaceenum to theNftNamespace.getNftSales()method. - Added the
blockHashfield to theOwnedNftsResponsereturned byNftNamespace.getNftsForOwner()to track the block hash that the request was based on.
- Added the
NftNamespace.getTransfersForOwner()method to get all NFT transfers to or from a provided owner address. - Added the
NftNamespace.getTransfersForContract()method to all the NFT transfers for a provided NFT contract address. - Deprecated the
GetMintedNftsResponseinterface in favor of theTransfersNftResponse. TheTransfersNftResponsecontains the same properties as theGetMintedNftsResponseand includes additional fields about the transfer.
- Added
TransactNamespace.simulateAssetChanges()to simulate a transaction and return a list of asset changes. - Added
TransactNamespace.simulateExecution()to simulate a transaction and return a list of decoded logs and traces.
- Added support for passing in a
nulltokenIdwhen using NFT Webhook Filters, which allows you to listen to all token ids in a collection. - Added
NftNamespace.getMintedNfts()to fetch all the NFTs an owner address minted, optionally filtered by a set of specific NFT contracts. - Added the option to pass in an
EventFilterwith multiple addresses to theCoreNamespace.getLogs()method. - Fixed a bug where the
protocolFeewas not included in the response forNftNamespace.getNftSales(). Deprecated the existingmarketplaceFeeproperty in favor of the newprotocolFeeproperty.
- Added the
DebugNamespaceto the top-levelAlchemyobject. TheDebugNamespaceis used to replay and inspect transactions and mined blocks in greater detail.
- Added the
tokenUriTimeoutInMsoption toNftNamespace.getNftsForContract()to specify the timeout duration for fetching an NFT's underlying metadata. - Fixed a bug where using
AlchemySubscriptions.PENDING_TRANSACTIONSwith a string array input would throw an error (#222). - Added support for the
refreshCacheoption inNftNamespace.getNftMetadata(). This option is now available when using theoptionsoverload. The original method without theoptionsoverload is now deprecated. - Added support for the
requestTimeoutoption in theAlchemySettingsobject to configure a timeout forNftNamespaceandNotifyNamespacemethods. Thanks @Abbaskt! - Added the
contractDeployeranddeployedBlockNumberinto theNftContractobject. Methods that return NFTs such asNftNamespace.getNftsForOwner()andNftNamespace.getContractsForOwner()now include this information under thecontractfield.
- Added
NftNamespace.getContractsForOwner()to fetch all NFT contracts for a specified owner address.
- Fixed a bug in
NftNamespace.getNftsForOwner()where theopenSeametadata was not included in the returned NFT. - Marked the
NftExcludeFilterstype as deprecated. Please useNftFiltersinstead. - Added support for the
orderByparam toNftNamespace.getNftsForOwner()andNftNamespace.getContractsForOwner().
- Fixed a bug where
newHeadssubscriptions would error and crash when reconnecting to the websocket. - Fixed a bug where certain subscriptions would not reconnect after the websocket reconnected.
- Added exports for
toUtf8BytesandtoUtf8StringinUtils.
- Fixed a typo with the
AlchemySettings.batchRequestsproperty.
- Added support for ENS resolution to the
NotifyNamespaceandWebsocketNamespacemethods. - Added the
batchRequestssetting inAlchemySettings. Enabling this setting will automatically batch and send json-rpc requests to reduce network overhead. - Included new export for the
Interfaceclass from ethers to simplify encoding ABI when usingeth_call. - Added support for the
NftNamespace.getNftMetadataBatch()method to fetch metadata for multiple NFTs in a single call. - Added support for the
NftNamespace.getNftSales()method to fetch NFT sales across different marketplaces. Thanks @xeno097!
- Fixed a bug where
AlchemyConfig.getWebsocketProvider()was not exported as a public method. This method allows you get the underlyingWebsocketProviderthat is implemented by ethers. - Added the
NftNamespace.summarizeNftAttributes()method to get the summary of attribute prevalence for all NFTs in a contract. - Added the
NftNamespace.searchContractMetadata()method to search for a keyword across ERC721 and ERC1155 contract metadata. - Added support for ENS resolution on several
CoreNamespacemethods. You should now be able to pass in an ENS domain into any param that requires an owner address. - Added the
CoreNamespace.resolveName()andCoreNamespace.lookupAddress()methods to resolve and lookup ENS domains and their owner addresses. - Fixed a bug where the
Accept-Encodingheader was incorrectly included in requests that originated from the browser (#174). - Added the
openSearesponse toNftNamespace.getContractMetadata()to match the REST endpoint (#162).
- Added the
NotifyNamespaceto the top-levelAlchemyobject. TheNotifyNamespaceis used to perform CRUD operations on webhooks in the Notify API. - Added the
alchemy_minedTransactionssubscription event to theWebsocketNamespace. This subscription emits full transaction objects or hashes that are mined on the network based on provided filters. - Added the
NftNamespace.computeRarity()method to get the rarity attributes of the provided NFT. Thanks @xeno097!
- Added the
AIDROPSenum toNftNamespace.getNftsForOwner(). - Added the
spamInfofield to the response forgetNftsForOwner()andgetNftsForContract(). - Fixed a bug where type declarations were not available when using
NodeNextmodule resolution. Thanks @quentinverlhac! - Marked Ropsten, Rinkeby, and Kovan
Networkenums as deprecated. Please switch over to Sepolia.
- POTENTIALLY BREAKING: Fixed a typing bug where the
totalSupplyfield in anNftContractshould have typestringinstead ofnumber. - Updated the
Nftclass to include the contract metadata in theNft.contractfield. - Added commonly used utility methods from ethers.js into a top-level
Utilsexport. - Added the
NftNamespace.verifyNftOwnership()method to replace the deprecatedcheckNftOwnership()method. - Added
ContractandContractFactoryexports from ethers into the top-level exports.
- Added support for
withTokenBalancesinNftNamespace.getOwnersForContract(). - Added support for the
erc20token type and pagination forCoreNamespace.getTokenBalances(). - Added
bytesfield to theMediaobject in the NFT metadata responses to indicate the size of the media in bytes. Note that thesizefield is not supported by the backend and will be removed in the next version.
- Added a
sizefield to theMediaobject in the NFT metadata responses to indicate the size of the media in bytes. - Bumped
@ethersprojectdependencies tov5.7.0to supportsafeandfinalizedblocks.
- 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.