How to build a wallet
Last updated
Was this helpful?
Last updated
Was this helpful?
This guide shows how to build either an WebExtension Wallet or a iFrame-based 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
First you need to create a bridge between your extension and the page. This can be done as follows:
https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/examples/browser/wallet-web-extension/src/content-script.js#L1-L30
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
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: