Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Adena] add support for GnoConnect (gnoweb) #3610

Open
moul opened this issue Jan 25, 2025 · 2 comments
Open

[Adena] add support for GnoConnect (gnoweb) #3610

moul opened this issue Jan 25, 2025 · 2 comments
Assignees

Comments

@moul
Copy link
Member

moul commented Jan 25, 2025

Update the Adena Wallet to detect and utilize the new gnoconnect:... metadata tags added to gnoweb-generated HTML. These metadata entries provide configuration details for seamless integration. Ideally, this should enable Adena to function on any testnet, as well as any devnet or localnet.

The wallet should parse the following <meta> tags present in the page's HTML:

<meta name="gnoconnect:rpc" content="127.0.0.1:26657" />
<meta name="gnoconnect:chainid" content="dev" />

Using these values, the wallet should recognize that the current webpage serves as a frontend for a Gno blockchain instance. We can envision the extension automatically including a "login" feature, such as checking if the current wallet has a balance. Ultimately, it will allow Adena to capture the current txlink, such as https://gno.land/r/demo/boards$help&func=CreateThread&bid=2, and intercept it to open the wallet window with a prefilled transaction. This will prevent redirection to the current gnoweb help page, which will remain the default for users without an installed gnoconnect wallet. We can also imagine additional features when someone opens a help page directly, such as adding a new "Run with Adena" option after the existing copy-paste transaction instruction.

Depends on #3609
Related with #2602
Related with #2799
Related with #3283
Related with onbloc/adena-wallet#302

@jinoosss
Copy link
Member

Hi @moul ,

Adena can:

  • parse the meta tag of gnoconnect and change the chain environment.
  • generate a injection pop-up that reads the parameters of gnoconnect and txlink to execute a transaction.

I have a few questions:

  1. What is the rule of generating a URL? I see the current one as https://gno.land/r/demo/boards$help&func=CreateThread&bid=2,
    but if Adena knows the rules for how URLs are reflected when parameters are entered into a transaction message, Adena can open a prefilled injection pop-up as soon as a txlink is opened.

  2. When the txlink feature is extended (Extend txlink, ?help, and Wallet Connect to Support maketx run #3283),
    it would be most user-friendly if users could create txlinks in Adena (Morgan's comment). But I don't think it's user-friendly to directly modify the content of the script, therefore, I think it would be best if Adena provide a selection of pre-defined functions from the selected realms from the UI (with a dropdown modal), and generate the transaction message for a txlink for users. How do you think about this approach?

moul added a commit that referenced this issue Jan 27, 2025
Adds before the `</head>`:

```html
  <meta name="gnoconnect:rpc" content="127.0.0.1:26657" />
  <meta name="gnoconnect:chainid" content="dev" />
```

Blocks #3610

Signed-off-by: moul <94029+moul@users.noreply.github.com>
@moul
Copy link
Member Author

moul commented Jan 27, 2025

Hey @jinoosss, please take a look at #3615 and let me know if you still have questions. If possible, ask them directly on #3615 if they are general to the specifications.

@moul moul changed the title [Adena] add support for GnoConnect [Adena] add support for GnoConnect (gnoweb) Feb 2, 2025
@Kouteki Kouteki moved this from Triage to Todo in 🧙‍♂️gno.land core team Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

3 participants