Experimenting with AIOHA package & trying to integrate it in flutter project

Hello @techcoderx

Saw your annoucement that now you are @vibecoderx
& was april-fooled for almost 1 hour 🤣
Realized only after reading comments

Understanding Setup

Let's get to the subject. I am experimenting with AIOHA & trying to integrate it in Flutter project. As you know that, flutter project supports multiple platforms. My flutter project intends to support web, iOS & Android. To start with, I'm focusing on web support.

Here is how flutter-web-app folder structure looks like.

Screenshot 2025-04-19 at 5.52.31 AM.png

I have added following script tag in body.

<script type="module">
      import * as Aioha from "./aioha@1.6.0-beta.4.js";
      window.Aioha = Aioha;
      console.log("Aioha initialized", aioha);
      aiohaInitialized = true;
</script>

In another script tag, I've added following code to make sure that I access AIOHA only after it is available.

var aiohaInitialized = false;
let aioha = null;

async function someFunctionToUse(some, params) {
    if (!aiohaInitialized) {
        console.error("Aioha not initialized");
        // try again after few miliseconds when aioha@1.6.0-beta.4.js is available/downloaded
        return;
    }
    if (aioha === null) {
        // we have aioha.js, let's set up an aioha instance
        aioha = window.Aioha.initAioha({
            hiveauth: {
                name: "AiohaExperiments",
                description: "Testing aioha login - keychain & hiveauth methods",
            },
        });
    }
    // we are good to go to use aioha
}

Understanding Error

HiveKeychain based login works very well & I didn't face any error. However, HiveAuth started giving me error.

Aioha-HiveAuth

So, when I tried logging in with HiveAuth, I got error.

Error in HiveAuth

Error from console

HiveAuth-aes.bundle.js not on my server

Network Tab from Chrome Inspector

Network Tab from Chrome Inspector

Next Steps

  • I request @techcoderx to look into this issue.
  • I assume by bundling together, we can avoid that issue. I'm not js/front-end expert here so may be I am wrong.
  • Once, this issue is solved, I'll switch to iOS & Android integration

❤️ Love the work I do, support @threespeak & me ❤️

Support @sagarkothari88

Vote sagarkothari88 as Hive Witness

Support @threespeak

Vote for 3Speak as Witness



223
0
4.644 POB

13 comments

This post has been manually curated by @bhattg from Indiaunited community. Join us on our Discord Server.

Do you know that you can earn a passive income by delegating to @indiaunited. We share more than 100 % of the curation rewards with the delegators in the form of IUC tokens. HP delegators and IUC token holders also get upto 20% additional vote weight.

Here are some handy links for delegations: 100HP, 250HP, 500HP, 1000HP.

image.png

100% of the rewards from this comment goes to the curator for their manual curation efforts. Please encourage the curator @bhattg by upvoting this comment and support the community by voting the posts made by @indiaunited.

1
0
0.000 POB

Cool! 🎉 AIOHA in Flutter for web, iOS, & Android sounds ambitious. Excited to see your progress, especially web support! Keep us updated. 😉

0
0
0.000 POB

Aioha core is code-splitted by default to keep main bundle size as small as possible, dependencies from some providers are only loaded when it is being used. If you're not using the CDN or pnpm i you have to download all vendor bundles which are hiveauth-aes.bundle.js and ledger.bundle.js from the same place where you downloaded the main bundle.

1
0
0.000 POB

Hmm, wht new tools are you building now...

0
0
0.000 POB

3Speak Mobile Application - All over again
Packages/Libraries which I used have expired
For a new release, I must start from scratch

via Inbox

0
0
0.000 POB