Aptos Wallet Adapter

Building a dapp requiers to provide a wallet for the user to interact with the Aptos chain, and for a good user experience, it requires to provide multiple wallets so users can chose the one they want to use.

Implementing wallet integration can be difficult for dapps in:

  1. Support and test all edge cases
  2. Implement and maintain different wallet APIs
  3. Provide users with needed functionality the wallet itself doesnt support
  4. Keep track on all the different wallets in our ecosystem

In addition, creating and implementing a wallet is also not an easy task,

  1. Provide a wallet that follows a known standard so it is easy to integrate with
  2. Getting visibility and exposure in the ecosystem among all the other wallets
  3. Dapp projects need to dedicate time and resource to integrate the wallet within their app

When we started building a wallet adapter, we wanted to provide an adapter that can be easy enough for wallets to integrate with and for dapps to use and implement.

For that, we provide an Aptos Wallet Adapter monorepo for wallet and dapps creators to ease development and ensure a smooth process in building projects on the Aptos network. The Aptos Wallet Adapter acts as a service between dapps and wallets and exposes APIs for dapps to interact with the wallets by following our Wallet Standard. This in turns allows dapps to support many wallets with minimal integration efforts, and for wallets to follow a known standard and gain visibility.

Adapter structure

The adapter has three different components, the:

  1. Adapter Core package
  2. Adapter React provider (for dapps)
  3. Adapter Template plugin (for wallets)

This structure offers the following benefits:

  • Modularity (separation of concerns) - separating the adapter into three components can help having more freedom in design, implementation, deployment and usage.
  • Wallets create and own their plugin implementation (instead of having all in the same monorepo):
    • Reduces the packages bundle size used by dapps.
    • Lets them be self-service and support themselves without too much friction.
    • Prevents build failures in case of any bugs/bad implementation/wrong config files/etc.
  • Simplicity - keeps the Provider package very light and small as the major logic is implemented in the core package.
  • Flexibility - for wallets in creating and implementing custom functions.
6 Likes