27 | {% endif %}
28 | {% endfor %}
29 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # AIPs
2 |
3 | ADAMANT Improvement Proposal (AIPs) repository describe standards for the ADAMANT Messenger platform, including core protocol specifications and client APIs.
4 |
5 | ## Contributing
6 |
7 | 1. Review [AIP-1](AIPS/aip-1.md).
8 | 2. Fork the repository by clicking "Fork" in the top right.
9 | 3. Add your AIP to your fork of the repository. There is a [template AIP here](aip-X.md).
10 | 4. Submit a Pull Request to ADAMANT's [AIPs repository](https://github.com/Adamant-im/AIPs).
11 |
12 | Your first PR should be a first draft of the final AIP. It must meet the formatting criteria enforced by the build (largely, correct metadata in the header). An editor will manually review the first PR for a new AIP and assign it a number before merging it. Make sure you include a `discussions-to` header with the URL to a discussion forum or open GitHub issue where people can discuss the AIP as a whole.
13 |
14 | If your AIP requires images, the image files should be included in a subdirectory of the `assets` folder for that AIP as follow: `assets/aip-X` (for aip **X**). When linking to an image in the AIP, use relative links such as `../assets/aip-X/image.png`.
15 |
16 | When you believe your AIP is mature and ready to progress past the draft phase, you should open a PR changing the state of your AIP to 'Accepted'. An editor will review your draft and ask if anyone objects to its being accepted. After that implementation will start. And state will be change to 'Final' as soon as implementation will be done and pushed live
17 |
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | # Welcome to Jekyll!
2 | #
3 | # This config file is meant for settings that affect your whole blog, values
4 | # which you are expected to set up once and rarely edit after that. If you find
5 | # yourself editing this file very often, consider using Jekyll's data files
6 | # feature for the data you need to update frequently.
7 | #
8 | # For technical reasons, this file is *NOT* reloaded automatically when you use
9 | # 'bundle exec jekyll serve'. If you change this file, please restart the server process.
10 |
11 | # Site settings
12 | # These are used to personalize your new site. If you look in the HTML files,
13 | # you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
14 | # You can create any custom variable you would like, and they will be accessible
15 | # in the templates via {{ site.myvariable }}.
16 | title: ADAMANT Improvement Proposals
17 | description: >-
18 | ADAMANT Improvement Proposals (AIPs) describe standards for the ADAMANT Messenger
19 | platform, including core protocol specifications and client APIs.
20 | url: "http://aips.adamant.im"
21 | twitter_username: adamant_im
22 | github_username: Adamant-im
23 | header_pages:
24 | - all.html
25 | - core.html
26 | - networking.html
27 | - interface.html
28 | - arc.html
29 | - api.html
30 | - informational.html
31 | - meta.html
32 |
33 | # Build settings
34 | markdown: kramdown
35 |
36 | kramdown:
37 | input: GFM
38 | theme: minima
39 | plugins:
40 | - jekyll-feed
41 |
42 | permalink: /:slug
43 |
44 | defaults:
45 | -
46 | scope:
47 | path: "AIPS"
48 | values:
49 | layout: "aip"
50 |
51 | exclude:
52 | - Gemfile
53 | - Gemfile.lock
54 | - node_modules
55 | - vendor/bundle/
56 | - vendor/cache/
57 | - vendor/gems/
58 | - vendor/ruby/
59 | - aip-X.md
60 |
--------------------------------------------------------------------------------
/_includes/header.html:
--------------------------------------------------------------------------------
1 |
2 |
33 |
34 |
--------------------------------------------------------------------------------
/AIPS/aip-15.md:
--------------------------------------------------------------------------------
1 | ---
2 | aip: 15
3 | title: QR codes for ADAMANT addresses
4 | author: Aleksei Lebedev (@adamant-al)
5 | discussions-to: https://github.com/Adamant-im/AIPs/issues/33
6 | status: Accepted
7 | requires: 8, 9
8 | type: Standards
9 | category: ARC
10 | created: 2019-02-20
11 | ---
12 |
13 |
14 |
15 | ## Simple Summary
16 |
17 | A standard way of generating ADAMANT QR codes with addresses.
18 |
19 | ## Abstract
20 |
21 |
22 | QR code is a convenient way for sharing ADAMANT address. General URI for addresses described in [AIP-8](https://aips.adamant.im/AIPS/aip-8) and [AIP-9](https://aips.adamant.im/AIPS/aip-9).
23 |
24 | ## Motivation
25 |
26 | Well known view of ADAMANT QR codes with addresses helps users to understand if QR code includes ADAMANT address or not.
27 |
28 | ## Specification
29 |
30 | QR code design must include informational part (URI) and ADAMANT logo in the center of QR.
31 |
32 | ### Examples
33 |
34 | 
35 |
36 | QR data contents: https://msg.adamant.im?address=U9821606738809290000&label=John+Doe&action=send_message&message=Just+say+hello
37 |
38 | ## Copyright
39 |
40 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
41 |
--------------------------------------------------------------------------------
/AIPS/aip-13.md:
--------------------------------------------------------------------------------
1 | ---
2 | aip: 13
3 | title: Public non-ADM wallet addresses
4 | author: Aleksei Lebedev
5 | discussions-to: https://github.com/Adamant-im/AIPs/issues/31
6 | status: Accepted
7 | type: Standards
8 | category: ARC
9 | created: 2019-02-20
10 | requires: 3
11 | ---
12 |
13 | Storing public non-ADM wallet addresses in the ADAMANT blockchain.
14 |
15 | ## Simple Summary
16 |
17 | Define a way to store non-ADM wallet addresses (i.e. Ether, DOGE) in the blockchain.
18 |
19 | ## Abstract
20 |
21 | Transferring tokens in chats is one of essential ADAMANT features. It allows to send different external (non-ADM) tokens to interlocutors without specifying any token addresses. To make storing and sending tokens secure, only user has control over private keys for these tokens. See [ADAMANT Messenger: Secure ETH Transfers](https://medium.com/adamant-im/adamant-messenger-secure-eth-transfers-b27984a3ce05) for details.
22 |
23 | In-chat payments are possible due to public wallet addresses stored in blockchain. Any client app can fetch user's wallet address and use it to send tokens in its own blockchain. E.g., to send Ethers to ADAMANT user U11977883563659338220 in chat, client app can fetch public record with ETH address of U11977883563659338220, and send correspondent transaction to Ethereum network.
24 |
25 | ## Specification
26 |
27 | Public wallet addresses are stored as JSON objects in the ADAMANT KVS as described in the [AIP-3](https://aips.adamant.im/AIPS/aip-3). This objects *must be public* and passed as `value` with `key` like `ticker:address`.
28 |
29 | ### Examples
30 |
31 | ``` json
32 | {
33 | "transaction": {
34 | "type": 9,
35 | "amount": 0,
36 | "senderId": "U11977883563659338220",
37 | "senderPublicKey": "d2cbc26c2ef6...",
38 | "asset": {
39 | "state": {
40 | "key": "eth:address",
41 | "value": "0xf4a2d5997eb0575b7ad7c10b0b178524c336f9e9",
42 | "type": 0
43 | }
44 | },
45 | "timestamp": 45603372,
46 | "signature": "86cbe525042bf83802..."
47 | }
48 | }
49 |
50 | ```
51 |
52 | This transaction write public Ether address for U11977883563659338220.
53 |
54 | ## Copyright
55 |
56 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
57 |
--------------------------------------------------------------------------------
/AIPS/aip-7.md:
--------------------------------------------------------------------------------
1 | ---
2 | aip: 7
3 | title: Contacts List
4 | author: Alexander Kiselev (@MaaKut)
5 | discussions-to: https://github.com/Adamant-im/AIPs/issues/11
6 | status: Accepted
7 | type: Standards
8 | category: ARC
9 | created: 2018-07-30
10 | requires: 3
11 | ---
12 |
13 | Storing Contacts list in the ADAMANT blockchain.
14 |
15 | ## Simple Summary
16 |
17 | Define a way to store Contacts (i.e. user-defined aliases for the ADAMANT addresses) in the blockchain.
18 |
19 | ## Abstract
20 |
21 | In order to improve user experience, ADAMANT clients should provide a way to assign aliases to the addresses user interacts with. These aliases needed to be stored in the ADAMANT blockchain in order to be accessible from any ADAMANT client.
22 |
23 | ## Specification
24 |
25 | Contacts list is stored as a JSON object in the ADAMANT KVS as described in the [AIP-3](https://aips.adamant.im/AIPS/aip-3). This object *must be encrypted* and passed as `value` with `key` = `contact_list`.
26 |
27 | The keys of the above JSON are ADAMANT UIDs, values are objects, where aliases are stored in the `displayName` property.
28 |
29 | Example of `value` object for storing Contact list:
30 |
31 | ``` json
32 | {
33 | "U9821606738809290000": {
34 | "displayName": "John Doe"
35 | },
36 | "U9821606738809290001": {
37 | "displayName": "Jane Doe"
38 | }
39 | }
40 | ```
41 |
42 | Other properties besides `displayName` may be added to values to store various contact details.
43 |
44 | Note, that contacts lists may contain sensitive info and, therefore, must be encrypted (see [AIP-3](https://aips.adamant.im/AIPS/aip-3)).
45 |
46 | ### Examples
47 |
48 | ``` json
49 | {
50 | "transaction": {
51 | "type": 9,
52 | "amount": 0,
53 | "senderId": "U15677078342684640219",
54 | "senderPublicKey": "e16e624fd0...",
55 | "asset": {
56 | "state": {
57 | "key": "contact_list",
58 | "value":"{
59 | \"message\": \"6df8c172feef228d930130...\",
60 | \"nonce\": \"f6c7b76d55db945bb026cd221d5...\"}",
61 | "type": 0
62 | }
63 | },
64 | "timestamp": 45603645,
65 | "signature": "dbafce549f1..."
66 | }
67 | }
68 | ```
69 |
70 | Sends private (encrypted) contact_list records for U15677078342684640219.
71 |
72 | ## Copyright
73 |
74 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
75 |
--------------------------------------------------------------------------------
/_layouts/aip.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | ---
4 |
5 |
--------------------------------------------------------------------------------
/assets/main.scss:
--------------------------------------------------------------------------------
1 | ---
2 | ---
3 |
4 | @import "{{ site.theme }}";
5 | @import url('https://fonts.googleapis.com/css?family=Montserrat');
6 |
7 |
8 | .wrapper {
9 | position: relative;
10 | max-width: -webkit-calc(960px - (30px * 2));
11 | max-width: calc(960px - (30px * 2));
12 | }
13 | .uk-position-top-left {
14 | top: 0.7rem;
15 | left: 30px;
16 | position: absolute;
17 | }
18 | .site-nav {
19 | z-index: 100;
20 | }
21 | .uk-adm-logo {
22 | border: solid #eee;
23 | border-width: 1px;
24 | background: rgba(255, 255, 255, 1);
25 | z-index: 1000;
26 | position: relative;
27 | box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
28 | border-radius: 50%;
29 | display: block;
30 | }
31 | .uk-adm-logo:hover {
32 | box-shadow: 0 0px 3px rgba(0, 0, 0, 0.1);
33 | }
34 | .site-title {
35 | float: right;
36 | }
37 | .site-header {
38 | padding-top: 20px;
39 | }
40 | .uk-responsive-height {
41 | max-height: 100%;
42 | width: auto;
43 | max-width: none;
44 | width: 78px;
45 | }
46 | body {
47 | background-color: white;
48 | background-image: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23eeeeee' fill-opacity='1' fill-rule='evenodd'%3E%3Cpath d='M5 0h1L0 6V5zM6 5v1H5z'/%3E%3C/g%3E%3C/svg%3E");
49 | font-family: 'Montserrat', sans-serif;
50 | }
51 |
52 | .uk-list {
53 | list-style: none;
54 | margin-left:0;
55 | }
56 | .uk-list-footer li {
57 | line-height: 40px;
58 | white-space: nowrap;
59 |
60 | }
61 |
62 | .uk-child-width-expand>:not([class*=uk-width]) {
63 | flex: 1;
64 | min-width: 0;
65 | flex-basis: 1px;
66 | }
67 | .uk-width-auto {
68 | width: auto;
69 | }
70 | [class*=uk-width] {
71 | box-sizing: border-box;
72 | width: 100%;
73 | max-width: 100%;
74 | }
75 | .uk-child-width-expand>* {
76 | width: 1px;
77 | }
78 | .uk-first-column {
79 | float: left;
80 | width: auto!important;
81 | padding-right: 1rem;
82 | max-height: 40px;
83 | }
84 | .uk-first-column svg {
85 | vertical-align:middle;
86 | }
87 | .footer-col-1 {
88 | width: -webkit-calc(50% - (30px / 2));
89 | width: calc(50% - (30px / 2));
90 | }
91 | [class*=uk-child-width]>* {
92 | box-sizing: border-box;
93 | width: 100%;
94 | }
95 | .uk-grid-small>* {
96 | padding-left: 20px;
97 | }
98 |
99 | @media screen and (max-width: 600px) {
100 | .uk-position-top-left {
101 | display:none;
102 | }
103 | .site-title {
104 | float:left;
105 | }
106 | }
107 |
--------------------------------------------------------------------------------
/AIPS/aip-6.md:
--------------------------------------------------------------------------------
1 | ---
2 | aip: 6
3 | title: Signal Messages
4 | author: Dmitriy Soloduhin (@zyuhel)
5 | discussions-to: https://github.com/Adamant-im/AIPs/issues/9
6 | status: Accepted
7 | type: Standards
8 | category: ARC
9 | created: 2018-06-09
10 | requires: 4
11 |
12 | ---
13 |
14 | Hidden (system) messages for different services.
15 |
16 | ## Abstract
17 |
18 | Sometimes it is needed to send encrypted messages, that shouldn't appear in chats (hidden). This system messages will be called Signals. Signals should be used for User-Service or Service-Service communications. Example is [Register for Push notifications message](https://medium.com/adamant-im/adamant-is-working-on-blockchain-messaging-platform-and-push-notifications-service-765972cce50e).
19 |
20 | ## Specification
21 |
22 | Signal messages follows encryption algorithm defined in [AIP-4](https://aips.adamant.im/AIPS/aip-4).
23 | Chat `type` of signal messages is `3`. This chat type should not be returned on chat endpoints on any compliant node, unless request for this chat type is forced by corresponding filter.
24 |
25 | Clients should not make be this messages visible in dialogs.
26 |
27 | ## Syntax
28 |
29 | Structure of transaction `asset`:
30 |
31 | ````
32 | chat: {
33 | message: "HEXIFIED_ENCRYPTED_MESSAGE"
34 | own_message: "HEXIFIED_NONCE"
35 | type: 3
36 | }
37 | ````
38 |
39 | ### Examples
40 |
41 | ```` json
42 | {
43 | "transaction": {
44 | "type": 8,
45 | "amount": 0,
46 | "senderId": "U15677078342684640219",
47 | "senderPublicKey": "e16e624fd0a5123294b448c21f30a07a043...",
48 | "asset": {
49 | "chat": {
50 | "message": "70cbd07ff2ceaf0fc38a01ef9...",
51 | "own_message": "e98794eaedf47e...",
52 | "type": 3
53 | }
54 | },
55 | "recipientId": "U10629337621822775991",
56 | "timestamp": 46116887,
57 | "signature": "8fc2a54604109a6fcdccec2..."
58 | }
59 | }
60 |
61 | ````
62 |
63 | Subscribes user iOS device for Push notifications. U10629337621822775991 is general iOS [Push Notification Service](https://github.com/Adamant-im/adamant-notificationService) address.
64 |
65 | ## Rationale
66 |
67 | Some sort of client-service communication is needed for internal processes, such as Push server registration. This process should take place on ADAMANT network itself, instead of relying of some third party transfer medium. This type of messages should follow all security guidelines, and must not disturb users with technic data.
68 |
69 | ## Copyright
70 |
71 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
72 |
--------------------------------------------------------------------------------
/AIPS/aip-5.md:
--------------------------------------------------------------------------------
1 | ---
2 | aip: 5
3 | title: Rich Content Messages
4 | author: Dmitriy Soloduhin (@zyuhel)
5 | discussions-to: https://github.com/Adamant-im/AIPs/issues/8
6 | status: Accepted
7 | type: Standards
8 | category: ARC
9 | created: 2018-06-09
10 | requires: 4
11 | ---
12 |
13 | Exchanging Rich Content Messages across different clients.
14 |
15 | ## Simple Summary
16 |
17 | Extending messages with Flexible Rich Content.
18 |
19 | ## Abstract
20 |
21 | Define a specification of Rich Content messages, so that various clients can handle them.
22 |
23 | ## Specification
24 |
25 | Rich messages are encrypted as specified in [AIP-4](https://aips.adamant.im/AIPS/aip-4).
26 |
27 | To mark message as Rich text, put `2` value in `type` field of transaction `asset`.
28 |
29 | Rich Message must be a JSON object, sent within `message` field of transaction `asset`. It required to have `type` field with string value, describing how to handle it. Additional AIPs should be created for different Rich Text `type` handlers. Optional field `text_fallback` can be added to show explanation text messages on clients that doesn't support this Message Type.
30 |
31 | Rich messages should be shown in chat streams as ordinary messages, but their content, and theirs rendering process will be defined by corresponding Rich Message `type`.
32 |
33 | Clients shouldn't render unsupported or unknown message types, instead they must show a message about unsupported rich message type and/or text fallback if it is available.
34 |
35 | ## Syntax
36 |
37 | Structure of transaction `asset`:
38 |
39 | ````
40 | chat: {
41 | message: "HEXIFIED_ENCRYPTED_MESSAGE"
42 | own_message: "HEXIFIED_NONCE"
43 | type: 2
44 | }
45 | ````
46 |
47 | Field `message` should contain encrypted JSON of Rich Text. Below shown a base structure of Rich Text JSON object. It may have any other fields, only `type` field is required.
48 |
49 | ````
50 | {
51 | type: "RICH_MESSAGE_TYPE",
52 | text_fallback: "OPTIONAL_FALLBACK_FOR_CLIENTS_NOT_SUPPORTING_THIS_MESSAGE_TYPE"
53 | }
54 | ````
55 |
56 | ### Examples
57 |
58 | ```` json
59 | {
60 | "transaction": {
61 | "type": 8,
62 | "amount": 0,
63 | "senderId": "U15677078342684640219",
64 | "senderPublicKey": "e16e624fd0a5123294b448c21f30a07a0435533c693b146b14e66830e4e20404",
65 | "asset": {
66 | "chat": {
67 | "message": "70cbd07ff2ceaf0fc38a01ef9...",
68 | "own_message": "e98794eaedf47e...",
69 | "type": 2
70 | }
71 | },
72 | "recipientId": "U7972131227889954319",
73 | "timestamp": 46116887,
74 | "signature": "8fc2a54604109a6fcdccec2..."
75 | }
76 | }
77 | ````
78 |
79 | Sends Rich message describing In-Chat Ether transfer.
80 |
81 | ## Rationale
82 |
83 | Rich messages, such as different objects/ media / crypto transfers, should be handled in same way between different clients.
84 |
85 | ## Copyright
86 |
87 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
88 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Home
4 | ---
5 |
6 |
AIPs
7 |
ADAMANT Improvement Proposals (AIPs) describe standards for the ADAMANT Messenger platform, including core protocol specifications, and client APIs.
8 |
9 |
Contributing
10 |
First review AIP-1. Then clone the repository and add your AIP to it. There is a template AIP here. Then submit a Pull Request to ADAMANT's AIPs repository.
11 |
12 |
AIP status terms
13 |
14 |
Draft: an AIP that is open for consideration
15 |
Accepted: an AIP that is planned for immediate adoption, i.e. expected to be included in the next hard fork
16 |
Final: an AIP that has been adopted in a previous hard fork
17 |
Deferred: an AIP that is not being considered for immediate adoption. May be reconsidered in the future for a subsequent hard fork
18 |
19 |
20 |
AIP Types
21 |
22 |
AIPs are separated into a number of types, and each has its own list of AIPs.
23 |
24 |
Standard ({{site.pages|where:"type","Standards"|size}})
Describes an ADAMANT design issue, or provides general guidelines or information to the community, but does not propose a new feature. Informational AIPs do not necessarily represent community consensus or a recommendation, so users and implementers are free to ignore Informational AIPs or follow their advice.
Describes a process surrounding ADAMANT or proposes a change to (or an event in) a process.
46 |
--------------------------------------------------------------------------------
/AIPS/aip-9.md:
--------------------------------------------------------------------------------
1 | ---
2 | aip: 9
3 | title: URI Format for ADAMANT
4 | author: Aleksei Lebedev
5 | discussions-to: https://github.com/Adamant-im/AIPs/issues/19
6 | status: Accepted
7 | extends: 2
8 | type: Standards
9 | category: ARC
10 | created: 2019-02-12
11 | ---
12 |
13 |
14 |
15 | ## Simple Summary
16 |
17 | A standard way of creating ADAMANT URIs for various use-cases.
18 |
19 | ## Abstract
20 |
21 | This AIP extends [AIP-2](https://aips.adamant.im/AIPS/aip-2) and adds new parameters.
22 |
23 | ## Motivation
24 |
25 | Propose parameters to include in URI actions and their parameters. Standartise QR-codes between different ADAMANT Messenger realizations.
26 |
27 | ## Specification
28 |
29 | URI can contain optional `parameters`:
30 |
31 | - `label` is a contact name as in [AIP-2](https://aips.adamant.im/AIPS/aip-2). If address has no name in KVS address book yet, app should name it.
32 | - `amount` is amount in ADM to send
33 | - `message` is a message which supposed to be sent to contact (or as a comment for a transfer)
34 |
35 | 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.
36 |
37 | ### Examples
38 |
39 | ```
40 | adm:U9821606738809290000?label=John+Doe&message=Just+say+hello
41 | ```
42 |
43 | 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.
44 |
45 | ```
46 | adm:U9821606738809290000?label=John+Doe&amount=1.12&message=Buy+a+beer
47 | ```
48 |
49 | 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".
50 | 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".
51 |
52 | ## Rationale
53 |
54 | Parameters allows to extend possibilities included in URIs, like in QR codes.
55 |
56 | ## Copyright
57 |
58 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
59 |
--------------------------------------------------------------------------------
/AIPS/aip-2.md:
--------------------------------------------------------------------------------
1 | ---
2 | aip: 2
3 | title: URI Format for ADAMANT
4 | author: Dmitriy Soloduhin (@zyuhel), Pavel Anokhov (@RealBonus)
5 | discussions-to: https://github.com/Adamant-im/AIPs/issues/2
6 | status: Accepted
7 | type: Standards
8 | category: ARC
9 | created: 2018-05-02
10 | ---
11 |
12 |
13 |
14 | ## Simple Summary
15 |
16 | A standard way of creating ADAMANT URIs for various use-cases.
17 |
18 | ## Abstract
19 |
20 | URIs embedded in QR-codes, hyperlinks in web-pages, emails or chat messages provide for robust cross-application signaling between very loosely coupled applications. A standardized URI format allows for instant invocation of the user’s preferred wallet application and simplifies usage.
21 |
22 | ## Motivation
23 |
24 | Help integrating ADAMANT into the World. Standartise QR-codes between different ADAMANT Messenger realizations.
25 |
26 | ## Specification
27 |
28 | ### Syntax
29 |
30 | ADAMANT URIs contain "adm" in their schema (protocol) part and are constructed as follows:
31 |
32 | ```
33 | request = "adm" ":" address [?parameters]
34 | address = string
35 | parameters = (argument=value[&])*
36 | argument = uri encoded string
37 | value = uri encoded string
38 | ```
39 |
40 | ### Semantics
41 |
42 | `address` is mandatory and starts with U letter. It should follow ADAMANT address format.
43 |
44 | `parameters` is optional argument-value pairs and defines specific actions to be done with following address. Some specifications should follow in consecutive ARCs.
45 |
46 | Commonly known parameters:
47 |
48 | - `label` is a contact name. Often used on business cards.
49 |
50 | ### Examples
51 |
52 | ```
53 | adm:U9821606738809290000?label=John+Doe
54 | ```
55 |
56 | ## Rationale
57 |
58 | This ARC is needed to ensure that all ADAMANT Messengers realizations support same URI format.
59 |
60 | ## Copyright
61 |
62 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
63 |
--------------------------------------------------------------------------------
/AIPS/aip-11.md:
--------------------------------------------------------------------------------
1 | ---
2 | aip: 11
3 | title: Behavior for KVS data
4 | author: Aleksei Lebedev
5 | discussions-to: https://github.com/Adamant-im/AIPs/issues/27
6 | requires: 3
7 | extends: https://aips.adamant.im/AIPS/aip-3
8 | status: Draft
9 | type: Standards
10 | category: ARC
11 | created: 2019-02-18
12 | ---
13 |
14 | ## Simple Summary
15 |
16 | Describes how clients should process stored data for different content, allowing to write and read it faster.
17 |
18 | ## Abstract
19 |
20 | As [AIP-3](https://aips.adamant.im/AIPS/aip-3) stands, users save its public and private information in ADAMANT blockchain. To write and read it faster and cheaper, different types of records should be introduced, including full re-write and incremental.
21 |
22 | ## Specification
23 |
24 |
25 | When sending KVS transaction, `type` field of `state` object must be as follows:
26 |
27 | - `0` for full re-writing of contents by specified `key` value
28 | - `1` for incremental appending contents
29 |
30 | Client apps should decide wether to use `0` or `1` write type by themselves. It depends on content type `key`, and volume of updated information. For example, if user updates one's contact name, it is faster and cheaper to store only updated record with `1` type. When significant quantity of contact names updated, it is reasonable to re-write all of contact list with single store transaction with `0` type.
31 |
32 | Nodes API should process KVS properly. Values `type` and `key` are public, so node must filter and return KVS records on client's demand. This will reduce traffic and processing time. For every `key` value, node must return latest transactions with `0` type, following updates with `1` type.
33 |
34 | Client app should process received KVS records in reasonable way.
35 |
36 | ### Examples
37 |
38 | ``` json
39 | {
40 | "transaction": {
41 | "type": 9,
42 | "amount": 0,
43 | "senderId": "U15677078342684640219",
44 | "senderPublicKey": "e16e624fd0...",
45 | "asset": {
46 | "state": {
47 | "key": "contact_list",
48 | "value":"{
49 | \"message\": \"6df8c172feef228d930130...\",
50 | \"nonce\": \"f6c7b76d55db945bb026cd221d5...\"}",
51 | "type": 0
52 | }
53 | },
54 | "timestamp": 45603645,
55 | "signature": "dbafce549f1..."
56 | }
57 | }
58 | ```
59 |
60 | Sends private (encrypted) full contact list for U15677078342684640219.
61 |
62 | ``` json
63 | {
64 | "transaction": {
65 | "type": 9,
66 | "amount": 0,
67 | "senderId": "U15677078342684640219",
68 | "senderPublicKey": "e16e624fd0...",
69 | "asset": {
70 | "state": {
71 | "key": "contact_list",
72 | "value":"{
73 | \"message\": \"6df8c172feef228d930130...\",
74 | \"nonce\": \"f6c7b76d55db945bb026cd221d5...\"}",
75 | "type": 1
76 | }
77 | },
78 | "timestamp": 45603645,
79 | "signature": "dbafce549f1..."
80 | }
81 | }
82 | ```
83 |
84 | Sends private (encrypted) updated contact records for U15677078342684640219.
85 |
86 | ## Rationale
87 |
88 | Using `type` of storing and reading KVS offers performance upgrade for client apps.
89 |
90 | ## Copyright
91 |
92 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
93 |
--------------------------------------------------------------------------------
/AIPS/aip-4.md:
--------------------------------------------------------------------------------
1 | ---
2 | aip: 4
3 | title: Basic Encrypted Messages
4 | author: Dmitriy Soloduhin (@zyuhel), Aleksei Lebedev (@adamant-al)
5 | discussions-to: https://github.com/Adamant-im/AIPs/issues/7
6 | requires: 10
7 | status: Accepted
8 | type: Standards
9 | category: ARC
10 | created: 2018-06-09
11 | ---
12 |
13 | Structure of basic encrypted messages in ADAMANT.
14 |
15 | ## Simple Summary
16 |
17 | Describing current structure of basic encrypted ADAMANT messages, so that extensions or alternative clients can rely on it.
18 |
19 | ## Abstract
20 |
21 | To standartize message exchange between different ADAMANT clients we need to describe how messages are stored and encrypted/decrypted.
22 |
23 | ## Specification
24 |
25 | Secure Message exchange is the base of ADAMANT messaging system.
26 |
27 | Messages are encrypted using curve25519xsalsa20poly1305 ([NaCl box](https://nacl.cr.yp.to/box.html)) algorithm. Box is created using sender's private key and recipient's public key. Recipient's public key is retrieved from network.
28 |
29 | Private and public keys of account are instances of Ed25519 signing keys, so they should be converted into Curve25519 Diffie-Hellman keys first.
30 |
31 | ## Syntax
32 |
33 | Transaction syntax is based on [AIP-10: General transaction structure](https://aips.adamant.im/AIPS/aip-10). Messaging blockchain transaction type is `8`.
34 |
35 | Here is transaction `asset` contents syntax:
36 |
37 | ````
38 | chat: {
39 | message: HEXIFIED_ENCRYPTED_MESSAGE
40 | own_message: HEXIFIED_NONCE
41 | type: 1
42 | }
43 | ````
44 |
45 | Value of chat `type` is `1` for basic encrypted message. For other types of messages should be described in future APIs.
46 |
47 | ### Examples
48 |
49 | ```json
50 | {
51 | "transaction": {
52 | "type": 8,
53 | "amount": 0,
54 | "senderId": "U15677078342684640219",
55 | "senderPublicKey": "e16e624fd0a5123294b448c21f30a07...",
56 | "asset": {
57 | "chat": {
58 | "message": "4bf88eb80f4710e5aec4...",
59 | "own_message": "9dded63b476e75a146e3f...",
60 | "type": 1
61 | }
62 | },
63 | "recipientId": "U7972131227889954319",
64 | "timestamp": 46115307,
65 | "signature": "aa468db9b70b731931308f7c7d0d1..."
66 | }
67 | }
68 | ```
69 |
70 | Sends message to U7972131227889954319.
71 |
72 | ```json
73 | {
74 | "transaction": {
75 | "type": 8,
76 | "amount": 49000000,
77 | "senderId": "U15677078342684640219",
78 | "senderPublicKey": "e16e624fd0a5123294b448c21f30a07...",
79 | "asset": {
80 | "chat": {
81 | "message": "4bf88eb80f4710e5aec4...",
82 | "own_message": "9dded63b476e75a146e3f...",
83 | "type": 1
84 | }
85 | },
86 | "recipientId": "U7972131227889954319",
87 | "timestamp": 46115307,
88 | "signature": "aa468db9b70b731931308f7c7d0d1..."
89 | }
90 | }
91 | ```
92 |
93 | Transfer of 0.49 ADM to U7972131227889954319 with comment.
94 |
95 | ## Rationale
96 |
97 | Currently used mechanisms should also be documented, to make process of extending and updating clearer.
98 |
99 | ## Copyright
100 |
101 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
102 |
--------------------------------------------------------------------------------
/_includes/social.html:
--------------------------------------------------------------------------------
1 |