You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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:
Embedding a deep link into a QR code or NFC tag to be scanned
Cross-platform authentication via isolated secret managers
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 or shimmer)
version - the version of the deep link, e.g. v1, v2
context - a context of functionality within the IOTA ecosystem
operation - an operation within a specific context
param - mostly operation-specific query parameters; some available in all deep links:
returnUrl - a URL for the handler application to navigate to upon completion of the operation indicated in the deep link
MAY be HTTP/S URL or another deep link
MUST be short enough to satisfy the 2,048-character limit for URLs
ℹ️ 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.
Other outputs in the ledger that are locked to the address of the NFT can only be unlocked by including the NFT itself in the transaction. If the NFT is burned, such funds are locked forever. It is strongly advised to always check and sweep what the NFT owns in the ledger before burning it.
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
Due to the constraint where only one app can be registered to handle a particular deep link scheme, allowing support for functionality intended to be covered by multiple types of applications (e.g. wallets, dapps, dexes) is difficult. One option is too have contexts split at the scheme level, i.e. iota-wallet, iota-foundry, iota-did, iota-governance, iota-node, but this itself has some drawbacks, such as needing to duplicate every context for its shimmer equivalent and potentially having many contexts in the future. The fragmentation makes it somewhat burdensome to develop and maintain.
Rationale and Alternatives
Although lacking in other URL schemes for cryptocurrencies like Bitcoin and Ethereum, integrating versioning into IOTA deep links makes sense as the protocol offers a suite of functionality just from Layer 1 alone, which while it has been maturing at an incredible pace, still has some more substantial upgrades to implement, which may contain some breaking changes.
The proposed design could be more abstracted in that instead of providing a base 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
Should return URLs be supported? While adding support for return URLs for applications to return to upon completion of the deep link operation would be somewhat straight-forward, is this something that should be implement in app-specific deep link schemes?
How and when should we support Layer 2? We will need to provide the ability to invoke smart contracts (both Layer 1 and Layer 2) with deep links. This could be done in a future tip, e.g. "Layer 2 Support in Deep Links", or just added to this one in a revised draft.
What would potential support for Stronghold look like? With the idea that deep links are intended for applications, what possible functionality could we offer a Stronghold application? What would be useful here?
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 a recipientType 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. ↩
Within the send context, it's possible to send a transaction without an amount specified when a user wants to send only native tokens/tag/metadata. Maybe the amount parameter should therefore not be required?
With regard to the storageDepositAmount, I think the client should calculate it, instead of the front-end/dapp generating the link. If we deem that it is still required in the links anyway, the validation should include the check if it's an integer.
Maybe it's worth mentioning support for scientific notation? All the referenced documents do and it provides a nice way of making the amount more legible for the user without supporting decimals.
Quoting EIP-681: In order to make sure that the amount transacted is the same as the amount intended, the amount communicated to the human user should be easily verifiable by inspection, including the order of magnitude. In case of ERC-20 token payments, if the payer client has access to the blockchain or some other trusted source of information about the token contract, the interface should display the amount in the units specified in the token contract. Otherwise, it should be displayed as expressed in the URL, possibly alerting the user to the uncertainty of the nominal unit. To facilitate human inspection of the amount, the use of scientific notation with an exponent corresponding to the nominal unit of the transacted token (e.g. 18 in case of ether) is advisable.
Within the send context, it's possible to send a transaction without an amount specified when a user wants to send only native tokens/tag/metadata. Maybe the amount parameter should therefore not be required?
Yes, that's true; I'll make an adjustment.
With regard to the storageDepositAmount, I think the client should calculate it, instead of the front-end/dapp generating the link. If we deem that it is still required in the links anyway, the validation should include the check if it's an integer.
Yes, that would be a better idea. It would protect users from sending more tokens than they should've either from themselves or a malicious dapp/website.
Maybe it's worth mentioning support for scientific notation? All the referenced documents do and it provides a nice way of making the amount more legible for the user without supporting decimals.
Ah yes, this would be required for native tokens at least since IOTA/SMR have their own denominations.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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 (iotaorshimmer)version- the version of the deep link, e.g.v1,v2context- 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 theoperationindicated 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
senddeep link:recipient2 - an identifier of the party receiving fundsThe following are optional parameters for
senddeep links:amount- the raw amount of tokens to transfer to the recipientMAX_BASE_TOKEN_SUPPLYexpirationDate- a Unix time from which the UTXO "expires"expirationReturnAddress- the return address that can be used to unlock a UTXO once it's "expired"expirationDateparameternativeTokenId- the identifier string indicating a native token to send0xprefixnativeTokenAmount- the amount of native tokens to sendnativeTokenIdparameterMAX_NATIVE_TOKEN_SUPPLYstorageDepositReturnAddress- the return address of the storage depositstorageDepositAmountparametertimelock- 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
claimdeep link:outputId- the identifier of the output(s) to be claimed0xprefix0x123abc,0xabc123Examples
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_SUPPLYThe 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 burn0xprefixamount- the amount of native tokens to burnnativeTokenIdparameternftId- 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
senddeep link:eventId- an identifier of the event to vote for0xprefixanswers- a list of answers to cast the vote foramount- the raw amount of tokens to vote withMAX_BASE_TOKEN_SUPPLYExamples
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 itsshimmerequivalent and potentially having many contexts in the future. The fragmentation makes it somewhat burdensome to develop and maintain.Rationale and Alternatives
sendURL, 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
recipientcan simply be a Bech32 address, however introducing arecipientTypewould open up the possibility of using INS-domains, Ed25519 addresses, etc. ↩There is an
address-parserlibrary that can help parse and validate Bech32 addresses. ↩All reactions