Management API Reference

Branding - Wallet SDK

Personalize your wallet’s look and feel for your ecosystem.

ecosystem-rainbow-kit

When instantiating the Client SDK, you can pass in the appearance object to customize the appearance of the wallet. For wallet discovery, it will use EIP-6963 to embedded your branding. The appearance object has the following properties:

  • icon: a data url schema, compliant with RFC-2397.
  • logo: a URI pointing to an image. The image SHOULD be a square with 96x96px minimum resolution.
  • name: a human-readable local alias of the Wallet Provider to be displayed to the user on the DApp. (e.g. Example Wallet Extension or Awesome Example Wallet)
  • reverseDomainNameSystem: the Wallet MUST supply the rdns property which is intended to be a domain name from the Domain Name System in reverse syntax ordering such as com.example.subdomain. It’s up to the Wallet to determine the domain name they wish to use, but it’s generally expected the identifier will remain the same throughout the development of the Wallet. It’s also worth noting that similar to a user agent string in browsers, there are times where the supplied value could be unknown, invalid, incorrect, or attempt to imitate a different Wallet. Therefore, the DApp SHOULD be able to handle these failure cases with minimal degradation to the functionality of the DApp.
Getting the ecosystem id

When creating your client SDK you need to add the ecosystem ID. It can be found in their dashboard at the settings section. The ecosystemWalletDomain is the domain where your wallet UI is hosted.

Therefore, when creating your wallet SDK, you can pass in the appearance object to customize the appearance of the wallet.

index.ts

_38
// Set your ecosystem id. Remember to switch to your live secret key in production.
_38
// See your ecosystem id here: https://dashboard.openfort.xyz/settings/project/overview
_38
import { AppMetadata, Client } from '@openfort/ecosystem-js/client'
_38
class EcosystemWallet extends Client {
_38
constructor(appMetadata?: AppMetadata) {
_38
super({
_38
// Optional App Info
_38
appMetadata: appMetadata,
_38
baseConfig: {
_38
// URL where the UI wallet is hosted
_38
ecosystemWalletDomain: 'https://wallet.ecosystem.com',
_38
windowStrategy: 'iframe', // or 'popup'. Rendering strategy the wallet UI.
_38
},
_38
appearance: {
_38
icon: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAFwF52RAAAACXBIWXMAAAsTAAALEwEAmpwYAAABpElEQVQ4jZ2Sv0vDUBTFf4f9Cg',
_38
logo: 'https://www.example.com/logo.png',
_38
name: 'Cross-app Wallet',
_38
reverseDomainNameSystem: 'com.example.ecosystem.wallet'
_38
}
_38
});
_38
_38
// Use a Proxy to allow for new method additions
_38
return new Proxy(this, {
_38
get: (target, prop) => {
_38
if (prop in target) {
_38
const value = target[prop as keyof EcosystemWallet];
_38
return typeof value === 'function' ? value.bind(target) : value;
_38
}
_38
return undefined;
_38
}
_38
});
_38
}
_38
setPolicy(options?: { policy?: string; }): void {
_38
return super.setPolicy(options);
_38
}
_38
}
_38
_38
export default EcosystemWallet;

You can check all the available components in the Client SDK reference.