AIP 9: URI Format for ADAMANT Source

Author Aleksei Lebedev
Discussions-To https://github.com/Adamant-im/AIPs/issues/19
Status Accepted
Type Standards
Category ARC
Created 2019-02-12

Simple Summary

A standard way of creating ADAMANT URIs for various use-cases.

Abstract

This AIP extends AIP-2 and adds new parameters.

Motivation

Propose parameters to include in URI actions and their parameters. Standartise QR-codes between different ADAMANT Messenger realizations.

Specification

URI can contain optional parameters:

  • label is a contact name as in AIP-2. If address has no name in KVS address book yet, app should name it.
  • amount is amount in ADM to send
  • message is a message which supposed to be sent to contact (or as a comment for a transfer)

It is up to application how to process parameters, it depends when user retrieves URL in the app. F. e., in In-Chat Send tokens screen, it can parse amount and message values.

Examples

adm:U9821606738809290000?label=John+Doe&message=Just+say+hello

App adds chat with U9821606738809290000, name him as “John Doe” if he is not named yet, and put message “Just say hello” to input field ready to send.

adm:U9821606738809290000?label=John+Doe&amount=1.12&message=Buy+a+beer

If user read this string from QR in Send Tokens screen, app fills to field with U9821606738809290000, amount with 1.12 ADM, and comment with “Buy a beer”. If app processes this string that received from outside, it adds chat with U9821606738809290000, name him as “John Doe” if he is not named yet, and put message “Buy a beer”.

Rationale

Parameters allows to extend possibilities included in URIs, like in QR codes.

Copyright and related rights waived via CC0.