Releases: thirdweb-dev/js
[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); /// wallet that is have been auto connected. }, }); 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.
@thirdweb-dev/[email protected]
@thirdweb-dev/[email protected]
[email protected]
Minor Changes
- #5829
e01193a
Thanks @gregfromstl! - Feature: Adds getAdminAccount to inAppWallet interface for AA ecosystem wallets
Patch Changes
-
#5837
ce3e850
Thanks @kumaryash90! - Update implementations -
#5865
a9547c5
Thanks @gregfromstl! - SDK: Fix chain switching in smart account transactions -
#5879
810f319
Thanks @kien-ngo! - Add onTimeout callback to useAutoConnect -
#5605
e9c23ad
Thanks @kien-ngo! - - Add onClose callback to Connect Details modal<ConnectButton detailsModal={{ onClose: (screen: string) => { // The last screen name that was being shown when user closed the modal console.log({ screen }); }, }} />
- Small fix for ChainIcon: Always resolve IPFS URI
- Improve test coverage
-
#5869
273a320
Thanks @gregfromstl! - SDK: Removed co.lobstr from the available wallets (an unsupported non-EVM wallet) -
#5871
1e8ddcb
Thanks @gregfromstl! - SDK: Gracefully ignore chain with no chain ID infromEip1193Provider
@thirdweb-dev/[email protected]
@thirdweb-dev/[email protected]