ecosystemWallet

Creates an Ecosystem Wallet based on various authentication methods. Full list of available authentication methods here .

Can also be configured to use Account Abstraction to directly connect to a ERC4337 smart account based on those authentication methods.

Refer to inAppWallet for detailed usage examples.

Example

Logging into an ecosystem wallet

Below is the general code snippet needed to connect via a given auth strategy to an ecosystem wallet. For more variants on the various auth strategies, refer to inAppWallet .

import { ecosystemWallet } from "thirdweb/wallets";
const wallet = ecosystemWallet("ecosystem.hooli");
const account = await wallet.connect({
client,
chain,
strategy: "google",
});

View all connection options .

Connect to a restricted ecosystem wallet with your designated partner ID

The parnter ID will be provided to you by the ecosystem with which you're integrating.

import { ecosystemWallet } from "thirdweb/wallets";
const wallet = ecosystemWallet("ecosystem.hooli", {
partnerId: "...",
});
function ecosystemWallet(
id: `ecosystem.${string}`,
): Wallet<EcosystemWalletId>;

Parameters

Type

let id: `ecosystem.${string}`;

Type

let options: {
auth?: {
defaultSmsCountryCode?: SupportedSmsCountry;
mode?: "popup" | "redirect" | "window";
redirectUrl?: string;
};
partnerId?: string;
};

Returns

let returnType: Wallet<EcosystemWalletId>;

The created ecosystem wallet.