Standardizing IOTA deep links #109
Replies: 1 comment 1 reply
-
Great work! I have some comments:
|
Beta Was this translation helpful? Give feedback.
-
Great work! I have some comments:
|
Beta Was this translation helpful? Give feedback.
-
Hello everyone,
I'd like to initiate some discussion around standardizing IOTA deep links to help foster some more interoperability for our ecosystem.
Deep links are a widely reaching topic and mechanism, so it would be great to hear from anyone who also has some thoughts about them.
This document (also available as HackMD doc) is still a WIP and may contain some errors around parameter requirements, rules, and sizes of various IDs, payloads, etc. Any feedback is appreciated 🙂
Summary
This document proposes a standardization of deep links to support functionality of the IOTA protocol.
It draws inspiration from the following standards and specifications:
Motivation
The overall aim of this standard is to provide slightly more interoperability between software that built on top of IOTA, ultimately to improve the user experience1 and by that also increase adoption. Additionally, developers will be afforded some expressivity in their applications with the exposed functionality of the IOTA protocol, which will potentially lead to interesting new developments.
Some examples of this include:
Detailed Design
The structure is as follows:
Base Scheme
The overall design takes inspiration from RPC-based APIs, where URLs are action-based and meant to expose functionality as execution calls that accept various parameters. This is combined with the notion that deep links correspond to in-app resources, like funds on an address in a wallet.
The following is a simplified syntax of how IOTA deep links are based:
protocol
- the particular base protocol to use (iota
orshimmer
)version
- the version of the deep link, e.g.v1
,v2
context
- a context of functionality within the IOTA ecosystemoperation
- an operation within a specific contextparam
- mostlyoperation
-specific query parameters; some available in all deep links:returnUrl
- a URL for the handler application to navigate to upon completion of theoperation
indicated in the deep linkℹ️ It is worth noting that all deep links should revolve around a process where private key signing is required. This theoretically allows the location of the secret manager to be in a separate, more secure place rather than placed say inside the app sending the originally triggering the deep link.
Wallet Context
Sending Transactions
ABNF Form
The following parameters are required when building a
send
deep link:recipient
2 - an identifier of the party receiving fundsThe following are optional parameters for
send
deep links:amount
- the raw amount of tokens to transfer to the recipientMAX_BASE_TOKEN_SUPPLY
expirationDate
- a Unix time from which the UTXO "expires"expirationReturnAddress
- the return address that can be used to unlock a UTXO once it's "expired"expirationDate
parameternativeTokenId
- the identifier string indicating a native token to send0x
prefixnativeTokenAmount
- the amount of native tokens to sendnativeTokenId
parameterMAX_NATIVE_TOKEN_SUPPLY
storageDepositReturnAddress
- the return address of the storage depositstorageDepositAmount
parametertimelock
- a Unix time from which the UTXO can be consumedExamples
Normal transaction:
Micro-transaction:
Expiry transaction:
Timelocked transaction:
Native token transaction:
Bundled transaction:
Claiming Transactions
ABNF Form
The following parameters are required when building a
claim
deep link:outputId
- the identifier of the output(s) to be claimed0x
prefix0x123abc,0xabc123
Examples
Claim output:
Foundry Context
Minting
ℹ️ Support for minting native NFTs is unclear at the moment, but will be possible.
ABNF Form
The following parameters are required:
aliasId
- the identifier of the alias to use in unlocking the foundry outputcirculatingSupply
- the total number of native tokens that will be mintedmaximumSupply
(defined below)maximumSupply
- the total number of native tokens that can be mintedMAX_NATIVE_TOKEN_SUPPLY
The following parameter(s) are optional:
foundryMetadata
- a string of metadata (exact format TBD)Examples
Minting native tokens:
Minting native NFTs:
Burning
ABNF Form
nativeTokenId
- the identifier string indicating the native token to burn0x
prefixamount
- the amount of native tokens to burnnativeTokenId
parameternftId
- the identifier string indicating the native NFT to burn🛑 As mentioned in TIP-0018:
Examples
Burning native tokens:
Burning native NFTs:
Governance Context
Voting
ABNF Form
The following parameters are required when building a
send
deep link:eventId
- an identifier of the event to vote for0x
prefixanswers
- a list of answers to cast the vote foramount
- the raw amount of tokens to vote withMAX_BASE_TOKEN_SUPPLY
Examples
Normal vote:
Security Concerns
Due to the fact that the deep links operations typically involve private key signing, applications MUST NOT allow the operations to be carried out automatically ever; they MUST require manual confirmation by the user and SHOULD be easily inspectable as not to maliciously deceive the user in sending more than they intend or to an unintended recipient.
Return URLs SHOULD be validated and if possible even white-listed to protect against attacks from sources where deep links are triggered. As mentioned above, these SHOULD also be easily viewable by the user to confirm that they understand where they'll be re-navigated to.
Drawbacks
iota-wallet
,iota-foundry
,iota-did
,iota-governance
,iota-node
, but this itself has some drawbacks, such as needing to duplicate every context for itsshimmer
equivalent and potentially having many contexts in the future. The fragmentation makes it somewhat burdensome to develop and maintain.Rationale and Alternatives
send
URL, we can provide additional URLs for specific types of "sends", e.g.sendTransaction
,sendExpiryTransaction
,sendTimelockTransaction
, etc. This is arguably more representative of a more standard RPC API. However, this particular abstraction layer could be placed in the parsing / building library as specific functions too, maintaining flexibility of the underlying deep link mechanism but giving developers an easy way to build and parse them.Unresolved Questions
Footnotes
We can also improve developer experience here by providing an incredibly simple library for building and parsing IOTA deep links, like this one (WIP). This especially makes sense along with this standard as our protocol contains lots of functionality, and putting the burden of domain knowledge onto the developers wanting to interact with the technology is NOT ideal. ↩
It is worth noting that initially
recipient
can simply be a Bech32 address, however introducing arecipientType
would open up the possibility of using INS-domains, Ed25519 addresses, etc. ↩There is an
address-parser
library that can help parse and validate Bech32 addresses. ↩Beta Was this translation helpful? Give feedback.
All reactions