thirdweb@5.84.0
Minor Changes
-
#5889
7a3dff0
Thanks @ElasticBottle! - Exposes autoConnect as a standalone function for use outside of react.import { autoConnect } from "thirdweb/wallets"; const autoConnected = await autoConnect({ client, onConnect: (wallet) => { console.log("wallet", wallet); }, }); console.log("isAutoConnected", isAutoConnected); // true or false
-
#5947
d1c03b0
Thanks @joaquim-verges! - IntroducingengineAccount()
for backend usageYou can now use
engineAccount()
on the backend to create an account that can send transactions via your engine instance.This lets you use the full catalog of thirdweb SDK functions and extensions on the backend, with the performance, reliability, and monitoring of your engine instance.
// get your engine url, auth token, and wallet address from your engine instance on the dashboard const engine = engineAccount({ engineUrl: process.env.ENGINE_URL, authToken: process.env.ENGINE_AUTH_TOKEN, walletAddress: process.env.ENGINE_WALLET_ADDRESS, }); // Now you can use engineAcc to send transactions, deploy contracts, etc. // For example, you can prepare extension functions: const tx = await claimTo({ contract: getContract({ client, chain, address: "0x..." }), to: "0x...", tokenId: 0n, quantity: 1n, }); // And then send the transaction via engine // this will automatically wait for the transaction to be mined and return the transaction hash const result = await sendTransaction({ account: engine, // forward the transaction to your engine instance transaction: tx, }); console.log(result.transactionHash);
-
#5948
b10f306
Thanks @joaquim-verges! - Introducing Nebula APIYou can now chat with Nebula and ask it to execute transactions with your wallet.
Ask questions about real time blockchain data.
import { Nebula } from "thirdweb/ai"; const response = await Nebula.chat({ client: TEST_CLIENT, prompt: "What's the symbol of this contract: 0xe2cb0eb5147b42095c2FfA6F7ec953bb0bE347D8", context: { chains: [sepolia], }, }); console.log("chat response:", response.message);
Ask it to execute transactions with your wallet.
import { Nebula } from "thirdweb/ai"; const wallet = createWallet("io.metamask"); const account = await wallet.connect({ client }); const result = await Nebula.execute({ client, prompt: "send 0.0001 ETH to vitalik.eth", account, context: { chains: [sepolia], }, }); console.log("executed transaction:", result.transactionHash);
Patch Changes
-
#5926
4b5661b
Thanks @MananTank! - ExporttoEventSelector
utility function from "thirdweb/utils" -
#5923
42a313f
Thanks @kumaryash90! - Fix deploy version for published contracts -
#5924
7fb5ce1
Thanks @joaquim-verges! - Ensure resetting deploy flag on bundler errors -
#5937
0e2b3df
Thanks @MananTank! - AddisValidENSName
utility function for checking if a string is a valid ENS name. It does not check if the name is actually registered, it only checks if the string is in a valid format.import { isValidENSName } from "thirdweb/utils"; isValidENSName("thirdweb.eth"); // true isValidENSName("foo.bar.com"); // true isValidENSName("foo"); // false
-
#5790
e331e43
Thanks @gregfromstl! - Migrated underlying functionality to Ox -
#5914
c5c6f9d
Thanks @MananTank! - Do not prompt user for signing message for SIWE auth in Connect UI for Ecosystem wallets