Management API Reference

Craft and customize your wallet

Customize wallet screens and user flows for your brand.

Openfort cross-app 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 cross-app 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

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