Releases: thirdweb-dev/js
@thirdweb-dev/service-utils@0.9.5
thirdweb@5.95.2
thirdweb@5.95.1
Patch Changes
- #6765
03e2385
Thanks @joaquim-verges! - Better fallbacks for live NFT data cache miss
thirdweb@5.95.0
Minor Changes
-
#6706
185d2f3
Thanks @joaquim-verges! - Expose getOwnedTokens, getOwnedNFTs and getTransaction functionsYou can now use Insight, our in-house indexer directly from the SDK with a simple API:
Get Owned ERC20 tokens
import { Insight } from "thirdweb"; const tokens = await Insight.getOwnedTokens({ client, ownerAddress, chains: [base, polygon, arbitrum], });
Get Owned NFTs (ERC721 and ERC1155)
import { Insight } from "thirdweb"; const nfts = await Insight.getOwnedNFTs({ client, ownerAddress, chains: [sepolia], });
Get Transactions for a given wallet address
import { Insight } from "thirdweb"; const transactions = await Insight.getTransactions({ client, walletAddress, chains: [sepolia], });
All functions come with extra query filters for more granular queries, refer to the documentation for more details.
Patch Changes
-
#6760
7ecfcb9
Thanks @joaquim-verges! - Add thirdweb branding to PayEmbed -
#6753
4cf15a2
Thanks @joaquim-verges! - Use insight for 1155 getNFTs, getOwnedNFTs and getNFT -
#6752
23d3757
Thanks @joaquim-verges! - Simplify RPC request handling -
#6741
8d4d991
Thanks @joaquim-verges! - Use insight for erc821/getNFT, erc721/getNFTs and erc721/getOwnedNFTsStandard ERC721 getNFT, getNFTs and getOwnedNFTs now use insight, our in house indexer by default. If indexer is not availbale, will fallback to RPC.
You can also use the indexer directly using the Insight API:
for an entire collection
import { Insight } from "thirdweb"; const events = await Insight.getContractNFTs({ client, chains: [sepolia], contractAddress: "0x1234567890123456789012345678901234567890", });
or for a single NFT
import { Insight } from "thirdweb"; const events = await Insight.getNFT({ client, chains: [sepolia], contractAddress: "0x1234567890123456789012345678901234567890", tokenId: 1n, });
-
#6683
a3e7300
Thanks @kumaryash90! - Get indexed events fromgetContractEvents
You can now automatically query indexed events on supported chains when calling getContractEvents
import { getContractEvents } from "thirdweb"; const events = await getContractEvents({ contract: DOODLES_CONTRACT, events: [transferEvent()], });
This method falls back to RPC eth_getLogs if the indexer is not available.
You can also use the dedicated indexer function via the Insight export
import { Insight } from "thirdweb"; const events = await Insight.getContractEvents({ client, chains: [sepolia], contractAddress: "0x1234567890123456789012345678901234567890", event: transferEvent(), decodeLogs: true, });
-
#6732
a45c558
Thanks @gregfromstl! - Improve pay error messages -
#6758
62ce05e
Thanks @joaquim-verges! - Better error message for getUser -
#6734
2a7df33
Thanks @joaquim-verges! - Better error messages for failed requests -
Updated dependencies [
185d2f3
]:- @thirdweb-dev/insight@1.0.0
@thirdweb-dev/wagmi-adapter@0.2.58
@thirdweb-dev/wagmi-adapter@0.2.58
@thirdweb-dev/wagmi-adapter@0.2.57
@thirdweb-dev/wagmi-adapter@0.2.57
@thirdweb-dev/wagmi-adapter@0.2.56
@thirdweb-dev/wagmi-adapter@0.2.56
@thirdweb-dev/service-utils@0.9.4
@thirdweb-dev/service-utils@0.9.3
@thirdweb-dev/service-utils@0.9.2
Patch Changes
- #6730
ec099a7
Thanks @arcoraven! - Update rate limit to sliding window