Releases: thirdweb-dev/js
thirdweb@5.27.0
Minor Changes
-
#3181
a346111
Thanks @gregfromstl! - Adds headless functions for creating and managing a WalletConnect session with a connected walletcreateWalletConnectClient
import { createWalletConnectClient } from "thirdweb/wallets/wallet-connect"; createWalletConnectClient({ client: client, wallet: wallet, onConnect: (session: any) => { alert("Connected"); }, onDisconnect: (session: any) => { alert("Disconnected"); }, });
createWalletConnectSession
import { createWalletConnectSession } from "thirdweb/wallets/wallet-connect"; createWalletConnectSession({ walletConnectClient: wcClient, uri: "wc:...", });
getWalletConnectSessions
import { getWalletConnectSession, type WalletConnectSession, } from "thirdweb/wallets/wallet-connect"; const sessions: WalletConnectSession[] = await getWalletConnectSessions();
disconnectWalletConnectClient
import { disconnectWalletConnectClient } from "thirdweb/wallets/wallet-connect"; disconnectWalletConnectClient({ session, walletConnectClient: wcClient });
-
#3105
51e7ada
Thanks @joaquim-verges! - First party support for zkSync native account abstractionYou can now use smart accounts on zkSync and zkSync sepolia without any extra setup.
const wallet = smartWallet({ chain: zkSync, sponsorGas: true, }); const smartAccount = await wallet.connect({ client, personalAccount, }); // now your can perform transactions normally, gas will be sponsored sendTransaction({ transaction, account: smartAccount });
-
#3105
51e7ada
Thanks @joaquim-verges! - ZkSync transaction support
Patch Changes
- #3195
3f66945
Thanks @gregfromstl! - FixestimateGas
type resolution
@thirdweb-dev/wallets@2.5.31
Patch Changes
- Updated dependencies []:
- @thirdweb-dev/sdk@4.0.91
@thirdweb-dev/unity-js-bridge@0.6.40
Patch Changes
- Updated dependencies []:
- @thirdweb-dev/sdk@4.0.91
- @thirdweb-dev/wallets@2.5.31
- @thirdweb-dev/auth@4.1.89
@thirdweb-dev/sdk@4.0.91
@thirdweb-dev/react@4.6.30
Patch Changes
- Updated dependencies []:
- @thirdweb-dev/sdk@4.0.91
- @thirdweb-dev/react-core@4.6.30
- @thirdweb-dev/wallets@2.5.31
@thirdweb-dev/react-core@4.6.30
Patch Changes
- Updated dependencies []:
- @thirdweb-dev/sdk@4.0.91
- @thirdweb-dev/wallets@2.5.31
- @thirdweb-dev/auth@4.1.89
@thirdweb-dev/cli@0.14.4
Patch Changes
- Updated dependencies []:
- @thirdweb-dev/sdk@4.0.91
- @thirdweb-dev/wallets@2.5.31
- @thirdweb-dev/auth@4.1.89
@thirdweb-dev/auth@4.1.89
Patch Changes
- Updated dependencies []:
- @thirdweb-dev/wallets@2.5.31
thirdweb@5.26.0
Minor Changes
-
#3161
b569eb4
Thanks @gregfromstl! - Adds waitForBundle function to await a sendCalls bundle's complete confirmation.Usage
import { waitForBundle } from "thirdweb/wallets/eip5792"; const result = await waitForBundle({ client, chain, wallet, bundleId: "0x123...", });
-
#3161
b569eb4
Thanks @gregfromstl! - Adds EIP-5792 react hooksuseSendCalls
useSendCalls
will automatically revalidate all reads from contracts that are interacted with.import { useSendCalls } from "thirdweb/react"; const sendTx1 = approve({ contract: USDT_CONTRACT, amount: 100, spender: "0x33d9B8BEfE81027E2C859EDc84F5636cbb202Ed6", }); const sendTx2 = approve({ contract: USDT_CONTRACT, amount: 100, spender: "0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709", }); const { mutate: sendCalls, data: bundleId } = useSendCalls({ client }); await sendCalls({ wallet, client, calls: [sendTx1, sendTx2], });
Await the bundle's full confirmation:
const { mutate: sendCalls, data: bundleId } = useSendCalls({ client, waitForResult: true, }); await sendCalls({ wallet, client, calls: [sendTx1, sendTx2], });
Sponsor transactions with a paymaster:
const { mutate: sendCalls, data: bundleId } = useSendCalls(); await sendCalls({ client, calls: [sendTx1, sendTx2], capabilities: { paymasterService: { url: `https://${CHAIN.id}.bundler.thirdweb.com/${client.clientId}`, }, }, });
useCapabilities
import { useCapabilities } from "thirdweb/react"; const { data: capabilities, isLoading } = useCapabilities();
useCallsStatus
import { useCallsStatus } from "thirdweb/react"; const { data: status, isLoading } = useCallsStatus({ bundleId, client });
Patch Changes
-
#3178
3dca028
Thanks @joaquim-verges! - Fix gas estimation in transaction button -
#3187
874747b
Thanks @joaquim-verges! - Upgrade to latest coinbase wallet sdk -
#3186
123275b
Thanks @gregfromstl! - Catch any errors thrown while polling block numbers
@thirdweb-dev/wallets@2.5.30
Patch Changes
- Updated dependencies []:
- @thirdweb-dev/sdk@4.0.90