Resolve FIO Handle

Overview

The primary way you can integrate FIO, is to let your users use a FIO Handle (e.g. vitalik@safu) instead of a blockchain public address (e.g. 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045), when sending crypto assets.

Behind the scenes use a simple REST API call to get the associated public address on a specific blockchain for specific token and resume your standard flow.

Send this

curl --request POST \
     --url https://fio.blockpane.com/v1/chain/get_pub_address \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "fio_address": "vitalik@safu",
  "chain_code": "ETH",
  "token_code": "USDT"
}

Get this

{
  "public_address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
}

Chain and Token Codes

chain_code identifies the blockchain on which the token resides.

token_code identifies the specific token,

FIO maintains a list of chain codes as well as multi-level parameters which are used by other integrators. It is recommended that you follow this standard to ensure you get the correct public address back.

If you are using codes which are not yet part of the standard, please submit a pull request to the list to ensure other FIO Protocol integrators are using the same parameters.

Multi-level Addressing

Certain blockchains, or accounts on those blockchains, require the use of Multi-level Addressing, when, in addition to public address, additional piece of information is required to properly route a transaction.

The following are examples:

  • Destination Tags on Ripple
  • Memos on Stellar
  • Payment ID on Monero

There is not a clear standard on how to properly communicate these additional properties. The FIO Protocol supports both integrated addresses as well as URI Scheme as follows:

  • Integrated Address - an integrated address may be passed in just like standard public address. The FIO Protocol does not perform validation on the passed string.
  • URI Scheme - the FIO Protocol supports the formatting of public addresses using URI Schemes, where certain attributes are appended to the public address following a ‘?’ and delimited with ‘&’. The additional parameters are returned via URI parameters like this:
    public_address?parameter1=value1&parameter2=value2
    

FIO maintains a list of multi-level parameters that are being used by other FIO Protocol integrators.

If you are using codes which are not yet part of the standard, please submit a pull request to the list to ensure other FIO Protocol integrators are using the same parameters.

UX/UI Considerations

The UX/UI best practice is to allow the user to enter FIO Handle in the same field they enter a blockchain public address and simply resolve it and continue as usual.

Example

User can enter FIO Handle, ENS Name, or Public Address

User can enter FIO Handle, ENS Name, or Public Address

FIO Handle is resolved and flow resumes

FIO Handle is resolved and flow resumes

Examples

Resolve FIO Handle

This is a simple HTML/JavaScript example that will resolve the entered FIO Handle and return the public address if one is present. Click Result to run it right here.