EcosystemWallet

EcosystemWallet is the ultimate persistent wallet provider option for your game. It supports email, phone, social and custom authentication schemes, and will persist across devices, platforms, and other SDKs.

It makes for a fantastic SmartWallet admin/signer and will make sure your users can have the same wallet address across all your games, apps and blockchains.

Ecosystem Wallets have a very similar API to the In-App Wallet but with the added benefit of being able to share your wallets with ecosystem partners through special identifiers that they can use, preserving the user's identity across not only your apps and games, but other ecosystem partners' as well. It is secure, easy to use, and use enclave technology to protect your user's data. All examples below can take in an ecosystemPartnerId if you are the ecosystem partner integrating with a third-party ecosystem.

Login Methods

Ecosystem Wallets support a variety of login methods:

  • Email (OTP Login)
  • Phone (OTP Login)
  • Socials (Google, Apple, Facebook, Telegram, Farcaster, Line etc.)
  • SIWE (Sign-In with Ethereum)
  • Custom Auth (OIDC Compatible)
  • Custom Auth (Generic Auth Endpoint)
  • Guest (Onboard easily, link other accounts later)

Login with Email

var ecosystemWalletOptions = new EcosystemWalletOptions(
ecosystemId: "ecosystem.your-ecosystem",
email: "myepicemail@domain.id"
);
var options = new WalletOptions(
provider: WalletProvider.EcosystemWallet,
chainId: 1,
ecosystemWalletOptions: ecosystemWalletOptions
);
var wallet = await ThirdwebManager.Instance.ConnectWallet(options);

Will instantiate EcosystemWalletModal or resume the session - a simple prefab that will verify the user OTP.

Login with Phone

var ecosystemWalletOptions = new EcosystemWalletOptions(
ecosystemId: "ecosystem.your-ecosystem",
phoneNumber: "+1234567890"
);
var options = new WalletOptions(
provider: WalletProvider.EcosystemWallet,
chainId: 1,
ecosystemWalletOptions: ecosystemWalletOptions
);
var wallet = await ThirdwebManager.Instance.ConnectWallet(options);

Will instantiate EcosystemWalletModal or resume the session - a simple prefab that will verify the user OTP.

Login with Socials (Google, Apple, Facebook, etc.)

var ecosystemWalletOptions = new EcosystemWalletOptions(
ecosystemId: "ecosystem.your-ecosystem",
authprovider: AuthProvider.Google
);
var options = new WalletOptions(
provider: WalletProvider.EcosystemWallet,
chainId: 1,
ecosystemWalletOptions: ecosystemWalletOptions
);
var wallet = await ThirdwebManager.Instance.ConnectWallet(options);

Will open a native browser or oauth session to authenticate the user and redirect back to the game.

Login with SIWE

var ecosystemWalletOptions = new EcosystemWalletOptions(
ecosystemId: "ecosystem.your-ecosystem",
authprovider: AuthProvider.Siwe,
siweSigner: anyExternalWallet
);
var options = new WalletOptions(
provider: WalletProvider.EcosystemWallet,
chainId: 1,
ecosystemWalletOptions: ecosystemWalletOptions
);
var wallet = await ThirdwebManager.Instance.ConnectWallet(options);

Will use the external wallet to sign a message and login to the EcosystemWallet.

Login with Custom Auth - OIDC Compatible

var ecosystemWalletOptions = new EcosystemWalletOptions(
ecosystemId: "ecosystem.your-ecosystem",
authprovider: AuthProvider.JWT,
jwtOrPayload: "myjwt"
);
var options = new WalletOptions(
provider: WalletProvider.EcosystemWallet,
chainId: 1,
ecosystemWalletOptions: ecosystemWalletOptions
);
var wallet = await ThirdwebManager.Instance.ConnectWallet(options);

Login with Custom Auth - Generic Auth Endpoint

var ecosystemWalletOptions = new EcosystemWalletOptions(
ecosystemId: "ecosystem.your-ecosystem",
authprovider: AuthProvider.AuthEndpoint,
jwtOrPayload: "mypayload"
);
var options = new WalletOptions(
provider: WalletProvider.EcosystemWallet,
chainId: 1,
ecosystemWalletOptions: ecosystemWalletOptions
);
var wallet = await ThirdwebManager.Instance.ConnectWallet(options);
var ecosystemWalletOptions = new EcosystemWalletOptions(
ecosystemId: "ecosystem.your-ecosystem",
authprovider: AuthProvider.Guest
);
var options = new WalletOptions(
provider: WalletProvider.EcosystemWallet,
chainId: 1,
ecosystemWalletOptions: ecosystemWalletOptions
);
var wallet = await ThirdwebManager.Instance.ConnectWallet(options);

Account Linking

EcosystemWallets support linking multiple authentication methods to a single wallet, for instance linking Google to your Email-based In-App-Wallet. This is useful to have a unified identity across platforms.

// Your main EcosystemWallet account, already authenticated and connected
EcosystemWallet mainEcosystemWallet = ...
// An EcosystemWallet with a new auth provider to be linked to the main account, not connected
EcosystemWallet walletToLink = await EcosystemWallet.Create(client: Client, ecosystemId: "ecosystem.your-ecosystem", authProvider: AuthProvider.Telegram);
// Link Account - Headless version
var linkedAccounts = await mainEcosystemWallet.LinkAccount(walletToLink: walletToLink);
// Link Account - Unity wrapper version
var linkedAccounts = await ThirdwebManager.Instance.LinkAccount(mainEcosystemWallet, walletToLink);
// You can also fetch linked accounts at any time
List<LinkedAccount> linkedAccounts = await mainEcosystemWallet.GetLinkedAccounts();

Learn more about EcosystemWallet