Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Zenuml sequence macro lite
uuida8e67555-ec07-4772-98af-2b9dab781332
customContentId743571457
updatedAt2023-10-12T20:24:18Z

Inside SNAP Functionality

Visual

Functionality

FIO Handle Resolution

image-20240909-182644.pngImage Added
  • Overview

    • When user has the FIO Snap installed, FIO Handles will be resolved inside MetaMask on send.

  • Manifest spec - this ensures OnNameLookupHandler receives any data typed for any chain

Code Block
languagejson
"endowment:name-lookup": {}
  • Look-up logic

    • Verify that the string received matches the FIO Handle format

    • Convert chainID to chain_code and token_code - DEV NOTE: mapping static file TBD, e.g. eip155:1 is chain_code: ETH, token_code:ETH

    • Execute /get_pub_address

    • Return public address

    • Example OnNameLookupHandler

Code Block
languagetypescript
export const onNameLookup: OnNameLookupHandler = async (request) => {
  const { chainId, address, domain } = request;

  if (domain) {
    const resolvedAddress = '0xc0ffee254729296a45a3885639AC7E10F9d54979';
    return {
      resolvedAddresses: [{
        protocol: 'FIO Handle',
        resolvedAddress: resolvedAddress,
        domainName: domain,
      }]
    };
  }

  return null;
};

DEV NOTE: specification: https://metamask.github.io/SIPs/SIPS/sip-12

SNAP Home Page

No FIO Handle and No FIO Tokens and No Pending FIO Requests

image-20240422-164358.png

1+ FIO Handles and >0 FIO Tokens and 1+ FIO Requests

image-20240422-171619.png

Inside FIO App Functionality

Visual

Functionality

Authenticate

Image Modified

  • Set-up SNAP

    • Install FIO SNAP

    • Grant SNAP Permissions

  • Sign-in

    • Have user sign nonce with FIO Private Key

      • SNAP Message

        • Title: Sign-in to FIO App

        • Description:
          Please approve this nonce signature to sign-in to the FIO App. Nonce signature proves that you are the owner of the associated FIO Public Key.
          ------------------------------------
          Random nonce: XXX

  • If user rejects any of these steps display error message

Sign Transaction

Image Modified

Image Modified

  • Trigger transaction sign in Metamask

  • SNAP Message

    • Title: Sign FIO Transaction

    • Description:
      Please approve the following transaction.
      Transaction name: trnsfiopubky
      ------------------------------------
      FIO Chain: FIO Mainnet
      ------------------------------------
      Transaction details:
      tpid: dashboard@fiouat
      max_fee: 1500000000000
      amount: 100000000000000
      payee_public_key: FIO68bYHgYTqc17jz9MuprzvUY9D7Ud9UmLzruiNiFGkaHMZNUDv5

Decrypt Content

  • When decrypting content of FIO Request or FIO Data, trigger decrypt content transaction in Metamask. If

  • SNAP Message

    • Title: Decrypt FIO Data

    • Description:
      Please approve the decryption of FIO Data. For your security and privacy, FIO Data is always encrypted and has to be decrypted before viewing.

Sign out

FIO_Dashboard - 2023 Revised - MetaMask - Dashboard-20240216-194149.pngImage Modified

  • Replace Sign out with Disconnect button with icon