Management API Reference

Ecosystem wallet

Branding - Wallet SDK

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

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

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