From 9e40cee62a61032d99d291a9afbb32bdb881a638 Mon Sep 17 00:00:00 2001 From: ATXMJ <26630769+ATXMJ@users.noreply.github.com> Date: Mon, 6 Mar 2023 18:52:57 -0600 Subject: [PATCH] docs: add URI scheme and QR code standards (#68) * docs: add URI scheme and QR code standards * Update integrations.md * style: add table of contents, section spacers, and change heading levels * fix: update nano URI descriptions to match fields for clarity --------- Co-authored-by: mistakia <1823355+mistakia@users.noreply.github.com> --- docs/getting-started-devs/integrations.md | 231 +++++++++++++++++++++- src/views/components/menu/menu.js | 3 + 2 files changed, 231 insertions(+), 3 deletions(-) diff --git a/docs/getting-started-devs/integrations.md b/docs/getting-started-devs/integrations.md index 96cf29d4..aa94376f 100644 --- a/docs/getting-started-devs/integrations.md +++ b/docs/getting-started-devs/integrations.md @@ -1,7 +1,232 @@ --- -title: Integration +title: Integrations description: Integrating with Nano -tags: nano, integration, guide, building, development +tags: nano, integration, guide, building, development, uri, links, qr --- -# Integration +# Integrations + +### Table of Contents + +- [URI Scheme Standards](#uri-scheme-standards) +- [QR Code Standards](#qr-code-standards) + +--- + +## URI Scheme Standards + +Nano wallet clients should support handling of both URI scheme standards: the universal [`payto:` scheme](#payto-payment-invocation-uri-scheme), as well as the original [`nano:` scheme](#nano-payment-invocation-uri-scheme). + +Deep links for payment invocation should prefer the payto standard and use the format `payto://` rather than `payto:`. + +`amount` values must always default to [RAW units](https://docs.nano.org/protocol-design/distribution-and-units/). + +For the `payto:` scheme, other currencies or units may be manually specified (eg XNO, USD, EUR) using the `currency` option. + +### Table of Contents + +- [`payto:` URI scheme](#payto-payment-invocation-uri-scheme) +- [`nano:` URI scheme](#nano-payment-invocation-uri-scheme) + +--- + +## payto: Payment Invocation URI Scheme + +The `payto:` URI scheme, defined in [RFC-8905](https://www.rfc-editor.org/rfc/rfc8905.html) is a universal standard for designating targets for payments. + +### Syntax + +``` +payto:nano/nano_/[?][amount=[:]][&][receiver_name=][&][message=] +``` + +Note: Clients MUST accept URIs with options in any order. + +#### encoded_address (required) + +The recipient's [public Nano address](https://docs.nano.org/integration-guides/the-basics/#account-public-address) MUST be provided, and MUST be encoded using Nano's base32 encoding algorithm. + +#### currency + +The 3-letter [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) currency code (or `RAW` or `XNO`). The client SHOULD reference current exchange rates to convert the `amount` value to the currently corresponding amount in [RAW units](https://docs.nano.org/protocol-design/distribution-and-units/). If `XNO` is specified, the client MUST convert the `amount` value to `RAW` units. + +MUST default to `RAW` + +#### amount + +The amount to transfer. If a `currency` value is not provided, the client MUST default to [RAW units](https://docs.nano.org/protocol-design/distribution-and-units/). If `XNO` is specified, the client MUST convert the value to `RAW` units. + +MUST not occur more than once. + +#### receiver_name + +Name of the entity that receives the payment (creditor). + +Note: The Nano protocol does not support receiver names. The client may choose to use or ignore this option. + +#### message + +A short message to identify the purpose of the payment. + +Note: The Nano protocol does not support messages. The client may choose to use or ignore this option. + +--- + +## nano: Payment Invocation URI Scheme + +### Syntax + +``` +nano:nano_[?][amount=][&][label=