diff --git a/src/app/unity/blocks/getblock/page.mdx b/src/app/unity/blocks/getblock/page.mdx index 2151b05c..13d64734 100644 --- a/src/app/unity/blocks/getblock/page.mdx +++ b/src/app/unity/blocks/getblock/page.mdx @@ -13,5 +13,5 @@ Get block data by block number. ```csharp BigInteger blockNumber = 1234567; -var block = await Blocks.GetBlock(blockNumber); +var block = await ThirdwebManager.Instance.SDK.Blocks.GetBlock(blockNumber); ``` diff --git a/src/app/unity/blocks/getblockwithtransactions/page.mdx b/src/app/unity/blocks/getblockwithtransactions/page.mdx index 03e03974..da1509a6 100644 --- a/src/app/unity/blocks/getblockwithtransactions/page.mdx +++ b/src/app/unity/blocks/getblockwithtransactions/page.mdx @@ -13,5 +13,5 @@ Get block data by block number, including transaction data. ```csharp BigInteger blockNumber = 1234567; -var blockWithTransactions = await Blocks.GetBlockWithTransactions(blockNumber); +var blockWithTransactions = await ThirdwebManager.Instance.SDK.Blocks.GetBlockWithTransactions(blockNumber); ``` diff --git a/src/app/unity/blocks/getlatestblocknumber/page.mdx b/src/app/unity/blocks/getlatestblocknumber/page.mdx index ca910437..9e6f0541 100644 --- a/src/app/unity/blocks/getlatestblocknumber/page.mdx +++ b/src/app/unity/blocks/getlatestblocknumber/page.mdx @@ -12,5 +12,5 @@ Get the latest block number. ## Usage ```csharp -BigInteger blockNumber = await Blocks.GetLatestBlockNumber(); +BigInteger blockNumber = await ThirdwebManager.Instance.SDK.Blocks.GetLatestBlockNumber(); ``` diff --git a/src/app/unity/blocks/getlatestblocktimestamp/page.mdx b/src/app/unity/blocks/getlatestblocktimestamp/page.mdx index 45984429..02ed1c01 100644 --- a/src/app/unity/blocks/getlatestblocktimestamp/page.mdx +++ b/src/app/unity/blocks/getlatestblocktimestamp/page.mdx @@ -12,5 +12,5 @@ Get the latest block timestamp. ## Usage ```csharp -BigInteger blocktimestamp = await Blocks.GetLatestBlockTimestamp(); +BigInteger blocktimestamp = await ThirdwebManager.Instance.SDK.Blocks.GetLatestBlockTimestamp(); ``` diff --git a/src/app/unity/pay/buywithcrypto/page.mdx b/src/app/unity/pay/buywithcrypto/page.mdx index 60d35f6c..77daa541 100644 --- a/src/app/unity/pay/buywithcrypto/page.mdx +++ b/src/app/unity/pay/buywithcrypto/page.mdx @@ -16,7 +16,7 @@ using Thirdweb.Pay; public async void Buy() { - string txHash = await ThirdwebPay.BuyWithCrypto(_quote); + string txHash = await ThirdwebManager.Instance.SDK.Pay.BuyWithCrypto(_quote); ThirdwebDebug.Log($"Transaction hash: {txHash}"); } ``` diff --git a/src/app/unity/pay/buywithfiat/page.mdx b/src/app/unity/pay/buywithfiat/page.mdx index 481a9d92..3521ffd6 100644 --- a/src/app/unity/pay/buywithfiat/page.mdx +++ b/src/app/unity/pay/buywithfiat/page.mdx @@ -16,7 +16,7 @@ using Thirdweb.Pay; public async void Buy() { - string intentId = await ThirdwebPay.BuyWithFiat(_quote); + string intentId = await ThirdwebManager.Instance.SDK.Pay.BuyWithFiat(_quote); ThirdwebDebug.Log($"Intent ID: {intentId}"); } ``` diff --git a/src/app/unity/pay/getbuyhistory/page.mdx b/src/app/unity/pay/getbuyhistory/page.mdx index 1c60724e..ea142c42 100644 --- a/src/app/unity/pay/getbuyhistory/page.mdx +++ b/src/app/unity/pay/getbuyhistory/page.mdx @@ -18,10 +18,10 @@ public async void GetBuyHistory() { string connectedAddress = await ThirdwebManager.Instance.SDK.Wallet.GetAddress(); - BuyHistoryResult history = await ThirdwebPay.GetBuyHistory(walletAddress: connectedAddress, start: 0, count: 1); + BuyHistoryResult history = await ThirdwebManager.Instance.SDK.Pay.GetBuyHistory(walletAddress: connectedAddress, start: 0, count: 1); ThirdwebDebug.Log($"History: {JsonConvert.SerializeObject(history, Formatting.Indented)}"); - BuyHistoryResult historyNext = await ThirdwebPay.GetBuyHistory(walletAddress: connectedAddress, start: 1, count: 10, cursor: history.NextCursor, pageSize: null); + BuyHistoryResult historyNext = await ThirdwebManager.Instance.SDK.Pay.GetBuyHistory(walletAddress: connectedAddress, start: 1, count: 10, cursor: history.NextCursor, pageSize: null); ThirdwebDebug.Log($"History Next: {JsonConvert.SerializeObject(historyNext, Formatting.Indented)}"); } ``` diff --git a/src/app/unity/pay/getbuywithcryptoquote/page.mdx b/src/app/unity/pay/getbuywithcryptoquote/page.mdx index c8a6fc0b..91504286 100644 --- a/src/app/unity/pay/getbuywithcryptoquote/page.mdx +++ b/src/app/unity/pay/getbuywithcryptoquote/page.mdx @@ -27,7 +27,7 @@ public async void GetQuote() toAmount: "2" // I want to buy 2 WMATIC ); - BuyWithCryptoQuoteResult quote = await ThirdwebPay.GetBuyWithCryptoQuote(swapQuoteParams); + BuyWithCryptoQuoteResult quote = await ThirdwebManager.Instance.SDK.Pay.GetBuyWithCryptoQuote(swapQuoteParams); ThirdwebDebug.Log($"Quote: {JsonConvert.SerializeObject(quote, Formatting.Indented)}"); } ``` diff --git a/src/app/unity/pay/getbuywithcryptostatus/page.mdx b/src/app/unity/pay/getbuywithcryptostatus/page.mdx index 94935db0..4df9e905 100644 --- a/src/app/unity/pay/getbuywithcryptostatus/page.mdx +++ b/src/app/unity/pay/getbuywithcryptostatus/page.mdx @@ -16,7 +16,7 @@ using Thirdweb.Pay; public async void GetStatus() { - BuyWithCryptoStatusResult status = await ThirdwebPay.GetBuyWithCryptoStatus(_txHash); + BuyWithCryptoStatusResult status = await ThirdwebManager.Instance.SDK.Pay.GetBuyWithCryptoStatus(_txHash); if (status.Status == SwapStatus.FAILED.ToString()) ThirdwebDebug.LogWarning($"Failed! Reason: {status.FailureMessage}"); diff --git a/src/app/unity/pay/getbuywithfiatcurrencies/page.mdx b/src/app/unity/pay/getbuywithfiatcurrencies/page.mdx index 1591ab99..db57b1ef 100644 --- a/src/app/unity/pay/getbuywithfiatcurrencies/page.mdx +++ b/src/app/unity/pay/getbuywithfiatcurrencies/page.mdx @@ -17,7 +17,7 @@ using Thirdweb.Pay; [ContextMenu("Get Supported Currencies")] public async void GetSupportedCurrencies() { - List currencies = await ThirdwebPay.GetBuyWithFiatCurrencies(); + List currencies = await ThirdwebManager.Instance.SDK.Pay.GetBuyWithFiatCurrencies(); ThirdwebDebug.Log($"Supported Currencies: {JsonConvert.SerializeObject(currencies, Formatting.Indented)}"); } ``` diff --git a/src/app/unity/pay/getbuywithfiatquote/page.mdx b/src/app/unity/pay/getbuywithfiatquote/page.mdx index c361fd34..a6b7059a 100644 --- a/src/app/unity/pay/getbuywithfiatquote/page.mdx +++ b/src/app/unity/pay/getbuywithfiatquote/page.mdx @@ -26,7 +26,7 @@ public async void GetQuote() toAmount: "20" // I want to buy 20 MATIC ); - BuyWithFiatQuoteResult quote = await ThirdwebPay.GetBuyWithFiatQuote(fiatQuoteParams); + BuyWithFiatQuoteResult quote = await ThirdwebManager.Instance.SDK.Pay.GetBuyWithFiatQuote(fiatQuoteParams); ThirdwebDebug.Log($"Quote: {JsonConvert.SerializeObject(quote, Formatting.Indented)}"); } ``` diff --git a/src/app/unity/pay/getbuywithfiatstatus/page.mdx b/src/app/unity/pay/getbuywithfiatstatus/page.mdx index d09a2edc..0c63b9b6 100644 --- a/src/app/unity/pay/getbuywithfiatstatus/page.mdx +++ b/src/app/unity/pay/getbuywithfiatstatus/page.mdx @@ -16,7 +16,7 @@ using Thirdweb.Pay; public async void GetStatus() { - var status = await ThirdwebPay.GetBuyWithFiatStatus(_intentId); + var status = await ThirdwebManager.Instance.SDK.Pay.GetBuyWithFiatStatus(_intentId); if (status.Status == OnRampStatus.PAYMENT_FAILED.ToString() || status.Status == OnRampStatus.ON_RAMP_TRANSFER_FAILED.ToString()) ThirdwebDebug.LogWarning($"Failed! Reason: {status.FailureMessage}"); diff --git a/src/app/unity/wallets/prefab/page.mdx b/src/app/unity/wallets/prefab/page.mdx index f991a1f0..af4acbd3 100644 --- a/src/app/unity/wallets/prefab/page.mdx +++ b/src/app/unity/wallets/prefab/page.mdx @@ -35,7 +35,7 @@ From the `Inspector` window, you can configure the options for the `ConnectWalle The list of wallets you want to support. Each wallet you provide appears as a button in the dropdown. -Supports `EmbeddedWallet`, `MetaMask`, `Coinbase`, `WalletConnect`, `LocalWallet`, `HyperPlay`, `Injected` (window.ethereum). +Supports `InAppWallet`, `MetaMask`, `Coinbase`, `WalletConnect`, `LocalWallet`, `HyperPlay`, `Injected` (window.ethereum). Some wallet providers may not be supported on some native platforms. diff --git a/src/app/unity/wallets/providers/account-abstraction/page.mdx b/src/app/unity/wallets/providers/account-abstraction/page.mdx index 7ac58d4b..0e563840 100644 --- a/src/app/unity/wallets/providers/account-abstraction/page.mdx +++ b/src/app/unity/wallets/providers/account-abstraction/page.mdx @@ -104,6 +104,12 @@ var connection = new WalletConnection( var address = await sdk.Wallet.Connect(connection); ``` +## ZkSync Support + +ZkSync chains make use of native account abstraction, whereby the user's EOA is the smart account. We support this as well. + +The only difference is that no account factory or additional parameters are needed, simply set gasless to true, connect to ZkSync with a SmartWallet provider, and you're good to go. + ## Additional Options Smart accounts, through paymasters, can be seen as a "plugin" to your user wallets, whereby all gas fees can be sponsored onchain. diff --git a/src/app/unity/wallets/providers/in-app-wallet/page.mdx b/src/app/unity/wallets/providers/in-app-wallet/page.mdx index 53029a87..279fd947 100644 --- a/src/app/unity/wallets/providers/in-app-wallet/page.mdx +++ b/src/app/unity/wallets/providers/in-app-wallet/page.mdx @@ -22,7 +22,7 @@ var sdk = ThirdwebManager.Instance.SDK; // Configure the connection var connection = new WalletConnection( - provider: WalletProvider.EmbeddedWallet, + provider: WalletProvider.InAppWallet, chainId: 1, email: "email@email.com", ); @@ -41,7 +41,7 @@ var sdk = ThirdwebManager.Instance.SDK; // Configure the connection var connection = new WalletConnection( - provider: WalletProvider.EmbeddedWallet, + provider: WalletProvider.InAppWallet, chainId: 1, phoneNumber: "+1234567890", authOptions: new AuthOptions( @@ -67,7 +67,7 @@ var sdk = ThirdwebManager.Instance.SDK; // Configure the connection var connection = new WalletConnection( - provider: WalletProvider.EmbeddedWallet, + provider: WalletProvider.InAppWallet, chainId: 1, authOptions: new AuthOptions( authProvider: AuthProvider.Google, @@ -94,7 +94,7 @@ var sdk = ThirdwebManager.Instance.SDK; // Configure the connection var connection = new WalletConnection( - provider: WalletProvider.EmbeddedWallet, + provider: WalletProvider.InAppWallet, chainId: 1, authOptions: new AuthOptions( authProvider: AuthProvider.JWT, @@ -141,4 +141,4 @@ If using Custom Auth flow, attempts to connect directly after verifying the auth ## Miscellaneous -You may modify the `WalletProvider_EmbeddedWallet` prefab to fit your app's design, it is primarily used during the Email OTP process. +You may modify the `WalletProvider_InAppWallet` prefab to fit your app's design, it is primarily used during the Email OTP process.