Submit Your Wallet
The Thirdweb Unity SDK comes with many built-in wallets, but you can add your own wallet to the SDK by following these steps.
Step 1 - WalletProvider
Add your wallet identifier to the WalletProvider enum in the Wallet.cs file. This enum represents the different wallet providers.
Step 2 - Implement IThirdwebWallet
Implement the IThirdwebWallet interface for your wallet. This interface defines the methods and properties required for wallet integration.
Step 3 - Instantiate Your Wallet in ThirdwebSession.Connect
In the ThirdwebSession.cs file, instantiate your wallet in the Connect method.
Advanced
WalletConnection
If your wallet implementation requires additional data for the constructor or connect methods, you can add fields to the WalletConnection
class in the Wallet.cs
file.
Nethereum Web3 Provider
All RPC calls will pass through Nethereum's Web3
provider.
You'll need four classes to fully implement the provider, here's a Smart Wallet example:
Extending IAccount
Extending ClientBase
Extending TransactionManagerBase
(not used in practice)
Finally, an extension to create a Web3
provider
Submitting Your Wallet
If you think your wallet implementation would be useful to others, please consider sharing it by opening a PR to the thirdweb-dev/unity-sdk
repository.
Unity SDK is open-source. You can view the source code and contribute to it on GitHub