Management API Reference

Ecosystem wallet

Craft and customize your wallet

Openfort ecosystem wallets come with a default set of screens for authentication, session key confirmation, sign typed message, configuration, and transaction confirmation. These screens are designed to be customizable to fit your brand and user experience. Openfort provides helpers to the most popular frameworks to make it easier to integrate the ecosystem wallets.

ecosystem-architecture

Wallet Routes#

Whenever the users of a wallet make a request, this request is eventually received by the Wallet UI which is in charge of directing the user to the correct screen.

The Wallet UI expects the following routes to exist in your project:

RouteDescription
/sign/personal-signpersonal_sign
/sign/eth-sign-typed-data-v-4eth_signTypedData_v4
/sign/eth-send-transactioneth_signTransaction
/sign/eth-request-accountseth_requestAccounts
/sign/wallet-show-callswallet_showCallsStatus
/sign/wallet-send-callswallet_sendCalls
/sign/wallet-grant-permissionswallet_grantPermissions
/Loading screen

Wallet Window Strategy#

The Ecosystem SDK supports two window modes, popup and iframe, which can be configured through the prop windowStrategy when creating the wallet SDK with @openfort/ecosystem-js/client.

iframe#

The wallet is embedded in the page. In mobile no new tab is required to show the wallet action.

DESKTOPMOBILE

The wallet is opened in a new window both in mobile and desktop.

DESKTOPMOBILE

Here's how the windowStrategy is set in the Rapidfire ID sample wallet:

index.tsx

_43
import { AppMetadata, Client, ThirdPartyAuthProvider } from "@openfort/ecosystem-js/client";
_43
_43
class EcosystemWallet extends Client {
_43
constructor(appMetadata?: AppMetadata) {
_43
super({
_43
baseConfig: {
_43
ecosystemWalletDomain: 'https://id.sample.openfort.xyz',
_43
ecosystemId: 'test-226353cd-dd0e-4fba-8208-58dfe29d3581',
_43
windowStrategy: 'iframe',
_43
},
_43
appMetadata,
_43
appearance: {
_43
icon: 'data:image/...',
_43
logo: 'https://purple-magnificent-bat-958.mypinata.cloud/ipfs/QmfQrh2BiCzugFauYF9Weu9SFddsVh9qV82uw43cxH8UDV',
_43
name: 'Rapidfire ID',
_43
reverseDomainNameSystem: 'com.rapidfire.id'
_43
}
_43
});
_43
_43
// Use a Proxy to allow for new method additions
_43
return new Proxy(this, {
_43
get: (target, prop) => {
_43
if (prop in target) {
_43
const value = target[prop as keyof EcosystemWallet];
_43
return typeof value === 'function' ? value.bind(target) : value;
_43
}
_43
return undefined;
_43
}
_43
});
_43
}
_43
_43
authenticate(token: string) {
_43
return super.authenticateWithThirdPartyProvider({ token: token, provider: ThirdPartyAuthProvider.FIREBASE });
_43
}
_43
_43
// Add new methods here
_43
setPolicy(options?: { policy?: string; }): void {
_43
return super.setPolicy(options);
_43
}
_43
_43
}
_43
_43
export default EcosystemWallet;

Wallet UI Customization#

The Ecosystem SDK uses ConnectKit themes, and offers the same theming and customization options. You can edit fonts, colors, and other styling via the theme and customTheme props of EcosystemProvider. For more detail on themes, see the ConnectKit docs.

Themes