Format de QR-Code de paiement commun entre Césium² & Gecko & Ginkgo

Bonjour,

L’application Ginkgo propose l’affichage d’un QR-Code de paiement créé par le vendeur et soumis à lecture par l’acheteur pour qu’il obtienne sur son appareil une transaction entièrement pré-renseignée, qu’il n’a plus qu’à contrôler avant de la régler.

Le QR-Code de paiement affiché actuellement contient une chaîne au format suivant :
“june://<clé public V1 du bénéficiaire>?amount=<montant à régler en Ğ1>”
Ex: “june://E6KPage4aoGSCJRbmh71nmrSKJc7Kd1EZuWbLfwrhmS1?amount=25.0”
Voir QR-Code de la capture 1, ci-dessous.

Il serait intéressant de faire évoluer ce format pour le mettre à niveau, et qu’il soit supporté par toutes les applications (à minima en lecture), pour faciliter les paiements sans erreurs (compte à régler, montant et unité envoyé par le vendeur).

Le format cible intéressant pourrait être :

  • “june://payment/<adresse public V2 du bénéficiaire>?amount=<montant à régler>&currency=<unité du montant à régler, ’G1’ ou ’DU’>”(&comment=)
    Ex:
    “june://payment/g1PNpJebwnr4fEQAFLNcqhsnKBZ4r866Vzyt3wxVRSJFQkdWg?amount=25.9&currency=G1”
    “june://payment/g1PNpJebwnr4fEQAFLNcqhsnKBZ4r866Vzyt3wxVRSJFQkdWg?amount=1.99&currency=DU&comment=2%20pots&20de&20confitures”

Pour l’instant, ni Gecko, ni Cesium² ne supportent le protocole V1 de Ginkgo.
Les deux affichent une erreur sur présentation d’un tel QR-Code :



3 Likes

The developer of Ginko, @vjrj, should create an RFC for this format and discuss it with other developers to reach agreement.

The prefix is problematic: “june” is not the correct name; it should be “g1”. Additionally, there have already been previous standardization attempts that should probably be reused: G1link syntax review / Choisissons la syntaxe G1Lien

cc @1000i100 @poka @kimamila is there already an RFC somewhere? I didn’t find it on documents / RFCs · GitLab

3 Likes

Hi @elois, I tried to follow what Cesium v1 supported at that time 2023 and what users and developers requested me for compatibility with not only Cesium but websites like gchange and others.

I remember many issues, commits, comments related to this like, “you should support this and that”:

and the requests of them are reflected in the tests of g1nkgo:

(GCHANGE comments and things that I never used, but people asked for support also). Just to say, that I didn’t remember to start using that urls but just follow advices (correct me if I don’t remember well). Probably @kimamilla remember it better because for some time I remember that we worked to make totally compatible in both apps and at some point that part was like stable and people didn’t complain (like this post).

G1nkgo nowadays maintain the same regexp and code to don’t break compatibility with v1 + regexp for v2 addresses.

And we can analyze the code of cesium v1 that should do still the same.

BTW: I think that we should have a table of v1 pub keys, v2 address, their qrcodes, new and olds one, and to verify that we can still read, search, etc. with all the v2 clients. I think that we should still scan old urls and pubkeys, for instance, because they are everywhere still, in markets, in papers, in websites, etc.

If something does not work some part of that matrix we should fill an issue.

PS: I didn’t find an RPC neither the other day that I was searching for.

Non, les préfixes ne peuvent pas avoir de chiffre, dans les lien profonds profond App. Cf ce post G1link syntax review / Choisissons la syntaxe G1Lien - #13 by kimamila ou j’explique les limitations que j’ai pu vérifier. D’où le june://

@tuxmain a débuté une RFC (cd post cité) mais il ne correspond pas exactement à ce que font Ginkgo et Cesium v1 (et gchange).

Je peux proposer une modification de ta RFC @tuxmain ? ou bien je fais une autre MR ?

2 Likes

Mais :
web+[a-z]+: Navigator.registerProtocolHandler() - Les API Web | MDN

Donc g1: est envisageable, mais web+june: marche dès aujourd’hui.
En revanche ce qui marche avec june: devrait marcher aussi bien avec g1: ce n’est que là où web+ est nécessaire que la version g1 ne marche pas.

3 Likes

This old issue is also related:

Not supported in G1nkgo but probably it was in Cesium. I think that should be included in the RFC.