How to build a wallet
This guide shows how to build either an WebExtension Wallet or a iFrame-based Wallet.
WebExtension wallet
The full implementation of this example can be found here:
Note:
If you want to see a more advanced implementation you can take a look into the repository of the Superhero Wallet
1. Create bridge between extension and page
First you need to create a bridge between your extension and the page. This can be done as follows:
2. Initialize AeSdkWallet
class
AeSdkWallet
classThen you need to initialize AeSdkWallet
class in your extension and subscribe for new runtime
connections. After the connection is established you can share the wallet details with the application.
https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/examples/browser/wallet-web-extension/src/background.js#L1-L163
iFrame-based Wallet
The iFrame-based approach works similar to the WebExtension approach except that the connectionProxy
in between isn't needed.
You can take a look into the implementation of the following example to see how it works:
Last updated