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.

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

index.ts

_34
import { Client } from '@openfort/ecosystem-js/client'
_34
class EcosystemWallet extends Client {
_34
constructor({ clientId, redirectUri, logoutRedirectUri }: { clientId: string, redirectUri: string, logoutRedirectUri: string }) {
_34
super({
_34
publishableKey: clientId,
_34
redirectUri: redirectUri,
_34
logoutRedirectUri: logoutRedirectUri,
_34
...oidcConfig,
_34
baseConfig: {
_34
// The base URL for the wallet
_34
ecosystemWalletDomain: 'http://wallet.ecosystem.com',
_34
},
_34
appearance: {
_34
icon: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAFwF52RAAAACXBIWXMAAAsTAAALEwEAmpwYAAABpElEQVQ4jZ2Sv0vDUBTFf4f9Cg',
_34
logo: 'https://www.example.com/logo.png',
_34
name: 'Ecosystem Wallet',
_34
reverseDomainNameSystem: 'com.example.ecosystem.wallet'
_34
}
_34
});
_34
_34
// Use a Proxy to allow for new method additions
_34
return new Proxy(this, {
_34
get: (target, prop) => {
_34
if (prop in target) {
_34
const value = target[prop as keyof EcosystemWallet];
_34
return typeof value === 'function' ? value.bind(target) : value;
_34
}
_34
return undefined;
_34
}
_34
});
_34
}
_34
}
_34
_34
export default EcosystemWallet;

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