Releases: thirdweb-dev/js
[email protected]
Minor Changes
-
#5972
0b62397
Thanks @joaquim-verges! - Support multiple messages for Nebula API, updated input props.Some prop names have been updated:
prompt -> messsage
context -> contextFilter
Nebula.chat({ client, // prompt is now message message: "What's the total supply of this contract: 0xe2cb0eb5147b42095c2FfA6F7ec953bb0bE347D8", // contextFilter is now contextFilter contextFilter: { chains: [sepolia], }, });
The Nebula.chat and Nebula.execute functions now support multiple input messages, and the input properties have been updated to match the http API.
Nebula.chat({ client, // multi message format messages: [ { role: "user", content: "Tell me the name of this contract: 0xe2cb0eb5147b42095c2FfA6F7ec953bb0bE347D8", }, { role: "assistant", content: "The name of the contract is My NFT Collection", }, { role: "user", content: "What's the symbol of this contract?", }, ], contextFilter: { chains: [sepolia], }, });
Same changes apply to Nebula.execute.
Nebula.execute({ client, account, messages: [ { role: "user", content: "What's the address of vitalik.eth" }, { role: "assistant", content: "The address of vitalik.eth is 0xd8dA6BF26964aF8E437eEa5e3616511D7G3a3298", }, { role: "user", content: "Send them 0.0001 ETH" }, ], contextFilter: { chains: [sepolia], }, });
Patch Changes
-
#5966
4ffcf30
Thanks @MananTank! - Fix NFT components not displaying correct metadata if multiple contracts with same token id is rendered because of incorrect caching -
#5973
dbb64ea
Thanks @kumaryash90! - Update implementations -
#5982
b6d65cf
Thanks @gregfromstl! - Addedmode
as a predefined chain -
#5967
9cbcbe7
Thanks @gregfromstl! - Added overrides for Lumia Testnet to use pre-EIP1559 gas values
@thirdweb-dev/[email protected]
@thirdweb-dev/[email protected]
@thirdweb-dev/[email protected]
Minor Changes
- #5950
c290997
Thanks @nischitpra! - track usage call once per ratelimit window
[email protected]
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
@thirdweb-dev/[email protected]
@thirdweb-dev/[email protected]
[email protected]
@thirdweb-dev/[email protected]
@thirdweb-dev/[email protected]
[email protected]
Minor Changes
-
#5878
70b7b5c
Thanks @ElasticBottle! - Add support for backend wallets.This is useful is you have a backend that is connected to an that you want to have programmatic access to a wallet without managing private keys.
Here's how you'd do it:
const wallet = inAppWallet(); const account = await wallet.connect({ strategy: "backend", client: createThirdwebClient({ secretKey: "...", }), walletSecret: "...", }); console.log("account.address", account.address);
Note that
walletSecret
should be generated by you and securely stored to uniquely authenticate to the given wallet.
Patch Changes
- #5904
5e2eec3
Thanks @kumaryash90! - Fix batch fetch util for marketplace-v3
@thirdweb-dev/[email protected]
@thirdweb-dev/[email protected]
[email protected]
Minor Changes
-
#5801
429e112
Thanks @gregfromstl! - Feature: Adds beta support for EIP-7702 authorization listsimport { prepareTransaction, sendTransaction, signAuthorization, } from "thirdweb"; const authorization = await signAuthorization({ request: { address: "0x...", chainId: 911867, nonce: 100n, }, account: myAccount, }); const transaction = prepareTransaction({ chain: ANVIL_CHAIN, client: TEST_CLIENT, value: 100n, to: TEST_WALLET_B, authorizationList: [authorization], }); const res = await sendTransaction({ account, transaction, });
-
#5845
b058f68
Thanks @gregfromstl! - Feature: AddsdeploySmartAccount
function to force the deployment of a smart account.const account = await deploySmartAccount({ smartAccount, chain, client, accountContract, });
Fix: Uses 1271 signatures if the smart account is already deployed.