Hi everyone, I’m looking for a simple solid example, could be repo, or docs, that demonstrates authenticating/connecting to web3 website with (superhero) wallet using js-sdk version 14. Thanks!
In mz opinion, it is quite easy to take the code from the boilerplate examples, here is one for angular: GitHub - aeternity/aepp-boilerplate-angular
react: GitHub - aeternity/aepp-boilerplate-react: A ReactJS boilerplate to build æpps in the æternity ecosystem.
vue: GitHub - aeternity/aepp-boilerplate-vue: A Vue.js boilerplate to build aepps in the æternity ecosystem.
the SDK versions are different there, but the wallet discovery works the same. Does any of that work for you ? Other than that, you can take a look at this simple NFT minter i’ve built some time ago, here is its wallet detection code: : nftminter/src/app/services/aeternity.service.ts at feat/material-theme · nikita-fuchs/nftminter · GitHub
Hi Nikita, thanks for replying. Before posting I had taken a look at these repos and not totally following. In my particular case I am simply wanting to detect if the visitor has a wallet (superhero) and if so connect them, get their public account information. I am using the v14 sdk, can you suggest one of these repos based on my use case? It seems like some of them attempt to create or instantiate a wallet with private key? Some are using an iframe? Sorry I’m a newb. So any more direction is appreciated. thanks again!
Hi Nikita, I’m continuing to have issues. The v14 SDK is different enough that none of those examples are helping. In v14 samples, aepp-sdk-js/examples/browser/aepp/src/components at 2f7a5c3a932d51a01481a737247490b713411b2d · aeternity/aepp-sdk-js · GitHub are any of these connections applicable to superhero wallet browser extension? Thanks for any help.
Update: still not getting it to work. The main issue now seems to be the sdk’s assumed context of running in a node environment vs browser. I’ve tried polyfills and shims and other approaches but unable to get it working as of yet in my nuxt 3 typescript app. Seeing v14 working in a browser would be super helpful.
OK it’s working. My main issue is my particular setup. Nuxt 3 in turborepo mono repo. For anyone else having issues this helped me out with v14 feaeder/ui/src/scripts/connect.ts at 567b26a63857589a6f3ca7b8235d2e61b8e29094 · devarogundade/feaeder · GitHub and thanks to Badi!