From 2ee0581849e3c53d0699a8802712984538d486a7 Mon Sep 17 00:00:00 2001 From: Firekeeper <0xFirekeeper@gmail.com> Date: Fri, 7 Jun 2024 00:16:54 +0300 Subject: [PATCH] Unity 4.15.2 Docs (#454) Unity Rabby --- src/app/unity/sidebar.tsx | 4 ++ .../unity/wallets/actions/connect/page.mdx | 1 + .../wallets/providers/local-wallet/page.mdx | 6 +-- .../unity/wallets/providers/rabby/page.mdx | 45 +++++++++++++++++++ 4 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 src/app/unity/wallets/providers/rabby/page.mdx diff --git a/src/app/unity/sidebar.tsx b/src/app/unity/sidebar.tsx index e856ecf9..c8279266 100644 --- a/src/app/unity/sidebar.tsx +++ b/src/app/unity/sidebar.tsx @@ -34,6 +34,10 @@ const walletProviders: SidebarLink = (() => { name: "HyperPlay", href: `${parentSlug}/hyperplay`, }, + { + name: "Rabby", + href: `${parentSlug}/rabby`, + } ], }; })(); diff --git a/src/app/unity/wallets/actions/connect/page.mdx b/src/app/unity/wallets/actions/connect/page.mdx index 240a1b92..e203a91e 100644 --- a/src/app/unity/wallets/actions/connect/page.mdx +++ b/src/app/unity/wallets/actions/connect/page.mdx @@ -47,6 +47,7 @@ Available providers: - `WalletProvider.SmartWallet`: [Smart Wallet](/unity/wallets/providers/account-abstraction) - `WalletProvider.Hyperplay`: [Hyperplay](/unity/wallets/providers/hyperplay) - `WalletProvider.InAppWallet`: [In-App Wallet](/unity/wallets/providers/in-app-wallet) +- `WalletProvider.Rabby`: [Rabby](/unity/wallets/providers/rabby) #### chainId diff --git a/src/app/unity/wallets/providers/local-wallet/page.mdx b/src/app/unity/wallets/providers/local-wallet/page.mdx index 9bac2fbd..159ffa38 100644 --- a/src/app/unity/wallets/providers/local-wallet/page.mdx +++ b/src/app/unity/wallets/providers/local-wallet/page.mdx @@ -37,15 +37,15 @@ public async void ConnectWallet() ### WebGL -Prompts the user to connect their Metamask browser extension. +Automatically creates or loads a local wallet on the user's device. The wallet is encrypted with a password and stored in local storage. ### Standalone -Instantiates the customizable `WalletProvider_Metamask` UI prefab, displaying a QR code and deep link button. Scan the QR code with your Metamask mobile app to connect. +Automatically creates or loads a local wallet on the user's device. The wallet is encrypted with a password and stored in local storage. ### Mobile -Instantiates the customizable `WalletProvider_Metamask` UI prefab, displaying a QR code and deep link button. Click the deep link button to connect to your Metamask mobile app. +Automatically creates or loads a local wallet on the user's device. The wallet is encrypted with a password and stored in local storage. ## Miscellaneous diff --git a/src/app/unity/wallets/providers/rabby/page.mdx b/src/app/unity/wallets/providers/rabby/page.mdx new file mode 100644 index 00000000..d05e3d0b --- /dev/null +++ b/src/app/unity/wallets/providers/rabby/page.mdx @@ -0,0 +1,45 @@ +import { createMetadata } from "@doc"; + +export const metadata = createMetadata({ + title: "Rabby Wallet | thirdweb Unity SDK", + description: "Connect to Rabby Wallet with thirdweb Unity SDK", +}); + +# Rabby + +Prompt users to connect to your app with their [Rabby](https://rabby.io/) wallet. + +## Usage + +```csharp +using Thirdweb; + +public async void ConnectWallet() +{ + // Reference to your Thirdweb SDK + var sdk = ThirdwebManager.Instance.SDK; + + // Configure the connection + var connection = new WalletConnection( + provider: WalletProvider.Rabby, // The wallet provider you want to connect to (Required) + chainId: 1 // The chain you want to connect to (Required) + ); + + // Connect the wallet + string address = await sdk.Wallet.Connect(connection); +} +``` + +## Behavior + +### WebGL + +Connects to the Rabby Browser Extension, defaults to WalletConnect otherwise. + +### Standalone + +Not applicable, please use the WalletConnect provider instead which includes Rabby support. + +### Mobile + +Not supported. Please use the WalletConnect provider instead which includes Rabby support.